MonkeyBusiness/config.py
2025-12-24 23:10:15 +00:00

25 lines
484 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import socket
# https://stackoverflow.com/a/28950776
def get_ip():
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.settimeout(0)
try:
s.connect(("10.254.254.254", 1))
IP = s.getsockname()[0]
except Exception:
IP = "127.0.0.1"
finally:
s.close()
return IP
ip = get_ip()
port = 8000
response_compression = False
verbose_log = True
arcade = ""
paseli = 10000
maintenance_mode = False