mirror of
https://github.com/Justuser3310/jetwork.git
synced 2025-03-12 13:39:47 +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__":
|
if __name__ == "__main__":
|
||||||
# Запускаем главный процесс, чтобы потом легко убить его
|
# Запускаем главный процесс, чтобы потом легко убить его
|
||||||
|
@ -36,9 +36,12 @@ def port_gen(st = 25000, end = 25200):
|
|||||||
return port
|
return port
|
||||||
|
|
||||||
def server_http():
|
def server_http():
|
||||||
while True:
|
run = True
|
||||||
|
while run == True:
|
||||||
try:
|
try:
|
||||||
os.system("python -m http.server --directory cached")
|
os.system("python -m http.server --directory cached")
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
run = False
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("SERVER_HTTP FALLED")
|
print("SERVER_HTTP FALLED")
|
||||||
logging.critical(e, exc_info=True)
|
logging.critical(e, exc_info=True)
|
||||||
@ -122,7 +125,7 @@ def recv(s, data_out):
|
|||||||
data_out.put(data)
|
data_out.put(data)
|
||||||
|
|
||||||
# op = operation
|
# op = operation
|
||||||
def client(port, op = "ping", host = 'jetwork.404.mn'):
|
def client(port, op = "ping", host = 'bore.pub'):
|
||||||
# Если порт не определён
|
# Если порт не определён
|
||||||
if not port:
|
if not port:
|
||||||
return None
|
return None
|
||||||
|
28
setup.py
28
setup.py
@ -16,20 +16,20 @@ if name == "posix":
|
|||||||
import getpass
|
import getpass
|
||||||
user = getpass.getuser()
|
user = getpass.getuser()
|
||||||
|
|
||||||
system("mkdir ~/.streamlit")
|
#system("mkdir ~/.streamlit")
|
||||||
with open(f"/home/{user}/.streamlit/credentials.toml", "w") as f:
|
#with open(f"/home/{user}/.streamlit/credentials.toml", "w") as f:
|
||||||
f.write('[general]\nemail = "a@a.a"')
|
# f.write('[general]\nemail = "a@a.a"')
|
||||||
f.close()
|
#f.close()
|
||||||
elif name == "nt":
|
elif name == "nt":
|
||||||
from shutil import unpack_archive as unpack
|
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")
|
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")
|
unpack("bore.zip")
|
||||||
system("del bore.zip")
|
system("del bore.zip")
|
||||||
|
|
||||||
system("mkdir C:\\Users\\windows\\.streamlit")
|
#system("mkdir C:\\Users\\windows\\.streamlit")
|
||||||
with open("C:\\Users\\windows\\.streamlit\\credentials.toml", "w") as f:
|
#with open("C:\\Users\\windows\\.streamlit\\credentials.toml", "w") as f:
|
||||||
f.write('[general]\nemail = "a@a.a"')
|
# f.write('[general]\nemail = "a@a.a"')
|
||||||
f.close()
|
#f.close()
|
||||||
else:
|
else:
|
||||||
print("Увы, вероятно Ваша ОС не поддерживается.")
|
print("Увы, вероятно Ваша ОС не поддерживается.")
|
||||||
print("Завершение работы...")
|
print("Завершение работы...")
|
||||||
@ -40,12 +40,12 @@ system("mkdir cached")
|
|||||||
system("mkdir verify")
|
system("mkdir verify")
|
||||||
system("mkdir mysites")
|
system("mkdir mysites")
|
||||||
|
|
||||||
print("Максимальный размер для кэшированных файлов. (в гигабайтах)")
|
# TODO
|
||||||
print("Укажите 0 для отключения ограничения.")
|
#print("Максимальный размер для кэшированных файлов. (в гигабайтах)")
|
||||||
max = input(">> ")
|
#print("Укажите 0 для отключения ограничения.")
|
||||||
|
#max = input(">> ")
|
||||||
# Записываем в конфиг
|
# Записываем в конфиг
|
||||||
config["max"] = max
|
#config["max"] = max
|
||||||
write(config)
|
#write(config)
|
||||||
|
|
||||||
print("\nЧтобы подключится к jetwork выполните: python main.py")
|
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