Update server.py
All checks were successful
/ check (push) Successful in 23s

This commit is contained in:
Nova Cat 2025-01-26 13:21:02 -08:00
parent 7d211f7cf7
commit 0e5d974900

View file

@ -172,6 +172,9 @@ for i in mods['command']:
commandProviders.append(i.IRCatModule(**requires))
sockets = {}
sockets_ssl = {}
context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
context.minimum_version = ssl.TLSVersion.TLSv1
context.set_ciphers('DEFAULT:@SECLEVEL=0')
# Open the specified non-SSL sockets.
for i in restrict_ip.split(" "):
sockets[i] = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
@ -763,7 +766,6 @@ def ssl_session(sock):
while True:
try:
while opened:
context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
context.load_cert_chain(ssl_cert, keyfile=ssl_pkey)
print("Waiting for connection...")
connection, client = sock.accept()