set the home domain instead of IP (#231)

* set the home domain

set the home domain for the proxy, has an influence only on the log message

* fixed a bug
This commit is contained in:
Erfan
2020-08-09 13:21:43 +04:30
committed by GitHub
parent 15a8f607ca
commit 0283d6264a

View File

@@ -196,6 +196,9 @@ def init_config():
# the next host to forward bad clients # the next host to forward bad clients
conf_dict.setdefault("MASK_HOST", conf_dict["TLS_DOMAIN"]) conf_dict.setdefault("MASK_HOST", conf_dict["TLS_DOMAIN"])
# set the home domain for the proxy, has an influence only on the log message
conf_dict.setdefault("MY_DOMAIN", False)
# the next host's port to forward bad clients # the next host's port to forward bad clients
conf_dict.setdefault("MASK_PORT", 443) conf_dict.setdefault("MASK_PORT", 443)
@@ -2104,9 +2107,12 @@ def print_tg_info():
print("Since you have TLS only mode enabled the best port is 443", flush=True) print("Since you have TLS only mode enabled the best port is 443", flush=True)
print_default_warning = True print_default_warning = True
ip_addrs = [ip for ip in my_ip_info.values() if ip] if not config.MY_DOMAIN:
if not ip_addrs: ip_addrs = [ip for ip in my_ip_info.values() if ip]
ip_addrs = ["YOUR_IP"] if not ip_addrs:
ip_addrs = ["YOUR_IP"]
else:
ip_addrs = [config.MY_DOMAIN]
proxy_links = [] proxy_links = []