Update server.py

This commit is contained in:
Namhyeon Go 2024-03-04 23:54:45 +09:00 committed by GitHub
parent 699e455bef
commit b0e5280be5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -44,17 +44,17 @@ def extract_credentials(url):
return None, None, url return None, None, url
try: try:
listening_port = config('PORT', cast=int) listening_port = config('PORT', default=5555, cast=int)
_username, _password, server_url = extract_credentials(config('SERVER_URL')) _username, _password, server_url = extract_credentials(config('SERVER_URL', default='localhost'))
server_connection_type = config('SERVER_CONNECTION_TYPE') server_connection_type = config('SERVER_CONNECTION_TYPE', default='stateless')
cakey = config('CA_KEY') cakey = config('CA_KEY', default='')
cacert = config('CA_CERT') cacert = config('CA_CERT', default='')
certkey = config('CERT_KEY') certkey = config('CERT_KEY', default='')
certdir = config('CERT_DIR') certdir = config('CERT_DIR', default='')
openssl_binpath = config('OPENSSL_BINPATH') openssl_binpath = config('OPENSSL_BINPATH', default='openssl')
client_encoding = config('CLIENT_ENCODING') client_encoding = config('CLIENT_ENCODING', default='utf-8')
local_domain = config('LOCAL_DOMAIN') local_domain = config('LOCAL_DOMAIN', default='')
proxy_pass = config('PROXY_PASS') proxy_pass = config('PROXY_PASS', default='')
except KeyboardInterrupt: except KeyboardInterrupt:
print("\n[*] User has requested an interrupt") print("\n[*] User has requested an interrupt")
print("[*] Application Exiting.....") print("[*] Application Exiting.....")