This commit is contained in:
parent
46b6b0daf2
commit
d6e507ad7f
1 changed files with 13 additions and 13 deletions
|
@ -759,12 +759,12 @@ def tcp_session(sock):
|
|||
print("Something went wrong...")
|
||||
print(traceback.format_exc())
|
||||
def ssl_session(sock2):
|
||||
context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
|
||||
context.load_cert_chain(ssl_cert, keyfile=ssl_pkey)
|
||||
with context.wrap_socket(sock2, server_side=True) as sock:
|
||||
while True:
|
||||
try:
|
||||
while opened:
|
||||
context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
|
||||
context.load_cert_chain(ssl_cert, keyfile=ssl_pkey)
|
||||
with context.wrap_socket(sock2, server_side=True) as sock:
|
||||
print("Waiting for connection...")
|
||||
connection, client = sock.accept()
|
||||
ip_to = restrict_ip
|
||||
|
|
Loading…
Add table
Reference in a new issue