mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-22 21:56:09 +00:00
Allow overriding config with ENV (#506)
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)
This commit is contained in:
parent
207eba1af5
commit
3f46100d80
@ -1,4 +1,17 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
# This can also be replaced with another IP address.
|
# This can also be replaced with another IP address.
|
||||||
USE_SSL = True
|
USE_SSL = True
|
||||||
REMOTE_HOST = "127.0.0.1"
|
REMOTE_HOST = "localhost"
|
||||||
REMOTE_PORT = 443
|
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))
|
||||||
|
Loading…
Reference in New Issue
Block a user