# Standalone

Support for standalone client challenge solvers.

class acme.standalone.TLSServer(*args: Any, **kwargs: Any)

  Generic TLS Server.

  server_bind() → None

    Called by constructor to bind the socket.

    May be overridden.

class acme.standalone.ACMEServerMixin

  ACME server common settings mixin.

class acme.standalone.BaseDualNetworkedServers(ServerClass: Type[socketserver.TCPServer], server_address: Tuple[str, int], *remaining_args: Any, **kwargs: Any)

  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() → None

    Wraps socketserver.TCPServer.serve_forever

  getsocknames() → List[Tuple[str, int]]

    Wraps socketserver.TCPServer.socket.getsockname

  shutdown_and_server_close() → None

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

class acme.standalone.TLSALPN01Server(server_address: Tuple[str, int], certs: List[Tuple[OpenSSL.crypto.PKey, OpenSSL.crypto.X509]], challenge_certs: Mapping[str, Tuple[OpenSSL.crypto.PKey, OpenSSL.crypto.X509]], ipv6: bool = False)

  TLSALPN01 Server.

class acme.standalone.HTTPServer(*args: Any, **kwargs: Any)

  Generic HTTP Server.

class acme.standalone.HTTP01Server(server_address: Tuple[str, int], resources: Set[acme.challenges.HTTP01], ipv6: bool = False, timeout: int = 30)

  HTTP01 Server.

class acme.standalone.HTTP01DualNetworkedServers(*args: Any, **kwargs: Any)

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

class acme.standalone.HTTP01RequestHandler(*args: Any, **kwargs: Any)

  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)
    chall

      Alias for field number 0

    response

      Alias for field number 1

    validation

      Alias for field number 2

  property timeout: int

    The default timeout this server should apply to requests. :return: timeout to apply :rtype: int

  log_message(format: str, *args: Any) → None

    Log arbitrary message.

  handle() → None

    Handle request.

  handle_index() → None

    Handle index page.

  handle_404() → None

    Handler 404 Not Found errors.

  handle_simple_http_resource() → None

    Handle HTTP01 provisioned resources.

  classmethod partial_init(simple_http_resources: Set[acme.challenges.HTTP01], timeout: int) → functools.partial[acme.standalone.HTTP01RequestHandler]

    Partially initialize this handler.

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