a }|gi$ @ s^ d Z ddlZddlZddlZddlmZ ddlmZ ddlmZ ddlmZ ddlm Z ddlm Z dd lmZ dd lmZ ddlm Z ddlmZ dd lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ee Z!er$eej"eej# f Z$G dd dZ%G dd dej&ej'Z'ej(ddddZ)dS )zStandalone Authenticator. N)Any)Callable)DefaultDict)Dict)Iterable)List)Mapping)Set)Tuple)Type) TYPE_CHECKING)crypto) challenges) standalone)achallenges)errors) interfaces)util)commonc @ s e Zd ZdZeeeejej f f e ejj ddddZdeeej eejddd Zedd ddZeeejf d ddZdS ) ServerManagera Standalone servers manager. Manager for `ACMEServer` and `ACMETLSServer` instances. `certs` and `http_01_resources` correspond to `acme.crypto_util.SSLSocket.certs` and `acme.crypto_util.SSLSocket.http_01_resources` respectively. All created servers share the same certificates and resources, so if you're running both TLS and non-TLS instances, HTTP01 handlers will serve the same URLs! N)certshttp_01_resourcesreturnc C s i | _ || _|| _d S N) _instancesr r )selfr r r H/usr/lib/python3.9/site-packages/certbot/_internal/plugins/standalone.py__init__1 s zServerManager.__init__ )portchallenge_type listenaddrr c C s || j v r| j | S ||f}zt|| j}W n0 ty^ } zt||W Y d}~n d}~0 0 | | d d }|| j |<