mirror of
https://github.com/Justuser3310/jetwork.git
synced 2025-01-18 17:08:48 +00:00
up
This commit is contained in:
parent
edf76e0d4f
commit
12b70d4325
7
main.py
7
main.py
@ -24,6 +24,7 @@ def reverse_proxy(dest, port = 8000):
|
||||
elif name == "nt":
|
||||
system(f"bore.exe local {port} --to jetwork.404.mn --port {dest}")
|
||||
|
||||
|
||||
# Стартуем проброс порта
|
||||
# http сервер
|
||||
global http_port
|
||||
@ -46,15 +47,15 @@ http.start()
|
||||
sleep(1)
|
||||
os.chdir("../") # возвращаемся в корень
|
||||
# сервер для пинга
|
||||
server = Thread(target = server, args=(serv_port,))
|
||||
server = Thread(target = server, args=(http_port,))
|
||||
server.start()
|
||||
|
||||
#print(client(8000, "ping"))
|
||||
#ports = port_check(serv_port)
|
||||
#print(ports)
|
||||
|
||||
#client(4140, "ping")
|
||||
|
||||
#print(client(4015, "ping"))
|
||||
#print(client(4137, "is_just.jet"))
|
||||
|
||||
'''
|
||||
# Режим отладки
|
||||
|
@ -172,7 +172,7 @@ def port_check(your_port):
|
||||
|
||||
checks = list(range(4000, 4200))
|
||||
checks.remove(your_port)
|
||||
for port in tqdm(range(4000, 4200)):
|
||||
for port in tqdm(checks):
|
||||
if client(port, "ping"):
|
||||
ports.append(port)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
from os import system, mkdir
|
||||
from db import *
|
||||
from shutil import copyfile, make_archive, rmtree
|
||||
from shutil import copyfile, make_archive, rmtree, copytree
|
||||
from tqdm import tqdm
|
||||
|
||||
from verify import *
|
||||
@ -95,10 +95,11 @@ elif op == "3":
|
||||
|
||||
|
||||
# Копируем файлы из mysites в cached
|
||||
copyfile(f"mysites/{domain}", "cached/{domain}")
|
||||
copyfile(f"mysites/{domain}.pem", "cached/{domain}.pem")
|
||||
copyfile(f"mysites/{domain}.sig", "cached/{domain}.sig")
|
||||
copyfile(f"mysites/{domain}.zip", "cached/{domain}.zip")
|
||||
rmtree(f"cached/{domain}")
|
||||
copytree(f"mysites/{domain}", f"cached/{domain}")
|
||||
copyfile(f"mysites/{domain}.pem", f"cached/{domain}.pem")
|
||||
copyfile(f"mysites/{domain}.sig", f"cached/{domain}.sig")
|
||||
copyfile(f"mysites/{domain}.zip", f"cached/{domain}.zip")
|
||||
|
||||
|
||||
|
||||
@ -115,6 +116,8 @@ http_port = client(serv_port, f"is_{domain}")
|
||||
print("Получаем все порты...")
|
||||
ports = port_check(serv_port)
|
||||
|
||||
print(ports)
|
||||
|
||||
print("Публикуем сайт...")
|
||||
for port in tqdm(ports):
|
||||
client(port, f"publish_{domain}<>{http_port}")
|
||||
|
Loading…
Reference in New Issue
Block a user