1
0
mirror of https://github.com/Grasscutters/Grasscutter.git synced 2025-02-25 13:24:29 +08:00
Grasscutter/proxy_config.py
66Leo66 3f46100d80
Allow overriding config with ENV ()
Allow overriding config with ENV (handy when running with docker or debugging without modifying script)
Also log proxy config for easier debugging (when sharing screenshots)
2022-05-05 15:22:29 +02:00

18 lines
538 B
Python

import os
# This can also be replaced with another IP address.
USE_SSL = True
REMOTE_HOST = "localhost"
REMOTE_PORT = 443
if os.getenv('MITM_REMOTE_HOST') != None:
REMOTE_HOST = os.getenv('MITM_REMOTE_HOST')
if os.getenv('MITM_REMOTE_PORT') != None:
REMOTE_PORT = int(os.getenv('MITM_REMOTE_PORT'))
if os.getenv('MITM_USE_SSL') != None:
USE_SSL = bool(os.getenv('MITM_USE_SSL'))
print('MITM Remote Host: ' + REMOTE_HOST)
print('MITM Remote Port: ' + str(REMOTE_PORT))
print('MITM Use SSL ' + str(USE_SSL))