# Standalone

Support for standalone client challenge solvers.

class `acme.standalone.``TLSServer`(*args, **kwargs)

  Bases: `socketserver.TCPServer`

  Generic TLS Server.

  `server_bind`()

    Called by constructor to bind the socket.

    May be overridden.

class `acme.standalone.``ACMEServerMixin`

  Bases: `object`

  ACME server common settings mixin.

class `acme.standalone.``BaseDualNetworkedServers`(ServerClass, server_address, *remaining_args, **kwargs)

  Bases: `object`

  Base class for a pair of IPv6 and IPv4 servers that tries to do everything it’s asked for both servers, but where failures in one server don’t affect the other.

  If two servers are instantiated, they will serve on the same port.

  `serve_forever`()

    Wraps socketserver.TCPServer.serve_forever

  `getsocknames`()

    Wraps socketserver.TCPServer.socket.getsockname

  `shutdown_and_server_close`()

    Wraps socketserver.TCPServer.shutdown, socketserver.TCPServer.server_close, and threading.Thread.join

class `acme.standalone.``HTTPServer`(*args, **kwargs)

  Bases: `http.server.HTTPServer`

  Generic HTTP Server.

class `acme.standalone.``HTTP01Server`(server_address, resources, ipv6=False)

  Bases: `acme.standalone.HTTPServer`, `acme.standalone.ACMEServerMixin`

  HTTP01 Server.

class `acme.standalone.``HTTP01DualNetworkedServers`(*args, **kwargs)

  Bases: `acme.standalone.BaseDualNetworkedServers`

  HTTP01Server Wrapper. Tries everything for both. Failures for one don’t affect the other.

class `acme.standalone.``HTTP01RequestHandler`(*args, **kwargs)

  Bases: `http.server.BaseHTTPRequestHandler`

  HTTP01 challenge handler.

  Adheres to the stdlib’s `socketserver.BaseRequestHandler` interface.

  Variables: | simple_http_resources (set) – A set of `HTTP01Resource` objects. TODO: better name?

  class `HTTP01Resource`(chall, response, validation)

    Bases: `tuple`

    `chall`

      Alias for field number 0

    `response`

      Alias for field number 1

    `validation`

      Alias for field number 2

  `log_message`(format, *args)

    Log arbitrary message.

  `handle`()

    Handle request.

  `handle_index`()

    Handle index page.

  `handle_404`()

    Handler 404 Not Found errors.

  `handle_simple_http_resource`()

    Handle HTTP01 provisioned resources.

  classmethod `partial_init`(simple_http_resources)

    Partially initialize this handler.

    This is useful because `socketserver.BaseServer` takes uninitialized handler and initializes it with the current request.