diff --git a/__pycache__/db.cpython-311.pyc b/__pycache__/db.cpython-311.pyc new file mode 100644 index 0000000..8878504 Binary files /dev/null and b/__pycache__/db.cpython-311.pyc differ diff --git a/__pycache__/domain_check.cpython-311.pyc b/__pycache__/domain_check.cpython-311.pyc new file mode 100644 index 0000000..3d10095 Binary files /dev/null and b/__pycache__/domain_check.cpython-311.pyc differ diff --git a/__pycache__/network.cpython-311.pyc b/__pycache__/network.cpython-311.pyc new file mode 100644 index 0000000..06d0389 Binary files /dev/null and b/__pycache__/network.cpython-311.pyc differ diff --git a/__pycache__/proxy.cpython-311.pyc b/__pycache__/proxy.cpython-311.pyc new file mode 100644 index 0000000..ea6ce08 Binary files /dev/null and b/__pycache__/proxy.cpython-311.pyc differ diff --git a/__pycache__/status.cpython-311.pyc b/__pycache__/status.cpython-311.pyc new file mode 100644 index 0000000..fc06ac5 Binary files /dev/null and b/__pycache__/status.cpython-311.pyc differ diff --git a/__pycache__/updater.cpython-311.pyc b/__pycache__/updater.cpython-311.pyc new file mode 100644 index 0000000..4c11edc Binary files /dev/null and b/__pycache__/updater.cpython-311.pyc differ diff --git a/__pycache__/verify.cpython-311.pyc b/__pycache__/verify.cpython-311.pyc new file mode 100644 index 0000000..3b284fc Binary files /dev/null and b/__pycache__/verify.cpython-311.pyc differ diff --git a/bore b/bore new file mode 100755 index 0000000..753ed34 Binary files /dev/null and b/bore differ diff --git a/config.json b/config.json new file mode 100644 index 0000000..562a00f --- /dev/null +++ b/config.json @@ -0,0 +1,5 @@ +{ + "ports": [ + 25128 + ] +} \ No newline at end of file diff --git a/main.py b/main.py index 062d28c..3d420cf 100644 --- a/main.py +++ b/main.py @@ -51,7 +51,7 @@ def main(): # !!! ИДЁТ ПЕРЕРАБОТКА !!! # Стартуем интерфейс - #system(f"python -m streamlit run --server.address=127.0.0.1 interface.py {serv_port}") + system(f"python -m streamlit run --server.address=127.0.0.1 interface.py {serv_port}") if __name__ == "__main__": # Запускаем главный процесс, чтобы потом легко убить его diff --git a/network.py b/network.py index 5a7d5c4..55ca3cf 100644 --- a/network.py +++ b/network.py @@ -36,9 +36,12 @@ def port_gen(st = 25000, end = 25200): return port def server_http(): - while True: + run = True + while run == True: try: os.system("python -m http.server --directory cached") + except KeyboardInterrupt: + run = False except Exception as e: print("SERVER_HTTP FALLED") logging.critical(e, exc_info=True) @@ -122,7 +125,7 @@ def recv(s, data_out): data_out.put(data) # op = operation -def client(port, op = "ping", host = 'jetwork.404.mn'): +def client(port, op = "ping", host = 'bore.pub'): # Если порт не определён if not port: return None diff --git a/setup.py b/setup.py index 89ac5ab..029bce2 100644 --- a/setup.py +++ b/setup.py @@ -16,20 +16,20 @@ if name == "posix": import getpass user = getpass.getuser() - system("mkdir ~/.streamlit") - with open(f"/home/{user}/.streamlit/credentials.toml", "w") as f: - f.write('[general]\nemail = "a@a.a"') - f.close() + #system("mkdir ~/.streamlit") + #with open(f"/home/{user}/.streamlit/credentials.toml", "w") as f: + # f.write('[general]\nemail = "a@a.a"') + #f.close() elif name == "nt": from shutil import unpack_archive as unpack download("https://github.com/ekzhang/bore/releases/download/v0.5.0/bore-v0.5.0-x86_64-pc-windows-msvc.zip", "bore.zip") unpack("bore.zip") system("del bore.zip") - system("mkdir C:\\Users\\windows\\.streamlit") - with open("C:\\Users\\windows\\.streamlit\\credentials.toml", "w") as f: - f.write('[general]\nemail = "a@a.a"') - f.close() + #system("mkdir C:\\Users\\windows\\.streamlit") + #with open("C:\\Users\\windows\\.streamlit\\credentials.toml", "w") as f: + # f.write('[general]\nemail = "a@a.a"') + #f.close() else: print("Увы, вероятно Ваша ОС не поддерживается.") print("Завершение работы...") @@ -40,12 +40,12 @@ system("mkdir cached") system("mkdir verify") system("mkdir mysites") -print("Максимальный размер для кэшированных файлов. (в гигабайтах)") -print("Укажите 0 для отключения ограничения.") -max = input(">> ") - +# TODO +#print("Максимальный размер для кэшированных файлов. (в гигабайтах)") +#print("Укажите 0 для отключения ограничения.") +#max = input(">> ") # Записываем в конфиг -config["max"] = max -write(config) +#config["max"] = max +#write(config) print("\nЧтобы подключится к jetwork выполните: python main.py") diff --git a/status b/status new file mode 100644 index 0000000..a340c10 --- /dev/null +++ b/status @@ -0,0 +1 @@ +work \ No newline at end of file diff --git a/stop.py.save b/stop.py.save new file mode 100644 index 0000000..b9db295 --- /dev/null +++ b/stop.py.save @@ -0,0 +1,8 @@ +# +# Установка/проверка статуса завершения +# + +import os + +if not os.path.exists('status'): +