mirror of
https://github.com/Justuser3310/jetwork.git
synced 2025-01-18 17:08:48 +00:00
up
This commit is contained in:
parent
b559b7b659
commit
dbaded283b
BIN
__pycache__/db.cpython-311.pyc
Normal file
BIN
__pycache__/db.cpython-311.pyc
Normal file
Binary file not shown.
BIN
__pycache__/domain_check.cpython-311.pyc
Normal file
BIN
__pycache__/domain_check.cpython-311.pyc
Normal file
Binary file not shown.
BIN
__pycache__/network.cpython-311.pyc
Normal file
BIN
__pycache__/network.cpython-311.pyc
Normal file
Binary file not shown.
BIN
__pycache__/proxy.cpython-311.pyc
Normal file
BIN
__pycache__/proxy.cpython-311.pyc
Normal file
Binary file not shown.
BIN
__pycache__/status.cpython-311.pyc
Normal file
BIN
__pycache__/status.cpython-311.pyc
Normal file
Binary file not shown.
BIN
__pycache__/updater.cpython-311.pyc
Normal file
BIN
__pycache__/updater.cpython-311.pyc
Normal file
Binary file not shown.
BIN
__pycache__/verify.cpython-311.pyc
Normal file
BIN
__pycache__/verify.cpython-311.pyc
Normal file
Binary file not shown.
5
config.json
Normal file
5
config.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"ports": [
|
||||
25128
|
||||
]
|
||||
}
|
2
main.py
2
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__":
|
||||
# Запускаем главный процесс, чтобы потом легко убить его
|
||||
|
@ -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
|
||||
|
28
setup.py
28
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")
|
||||
|
8
stop.py.save
Normal file
8
stop.py.save
Normal file
@ -0,0 +1,8 @@
|
||||
#
|
||||
# Установка/проверка статуса завершения
|
||||
#
|
||||
|
||||
import os
|
||||
|
||||
if not os.path.exists('status'):
|
||||
|
Loading…
Reference in New Issue
Block a user