none 9 months ago
parent edf76e0d4f
commit 12b70d4325

@ -24,6 +24,7 @@ def reverse_proxy(dest, port = 8000):
elif name == "nt": elif name == "nt":
system(f"bore.exe local {port} --to jetwork.404.mn --port {dest}") system(f"bore.exe local {port} --to jetwork.404.mn --port {dest}")
# Стартуем проброс порта # Стартуем проброс порта
# http сервер # http сервер
global http_port global http_port
@ -46,15 +47,15 @@ http.start()
sleep(1) sleep(1)
os.chdir("../") # возвращаемся в корень os.chdir("../") # возвращаемся в корень
# сервер для пинга # сервер для пинга
server = Thread(target = server, args=(serv_port,)) server = Thread(target = server, args=(http_port,))
server.start() server.start()
#print(client(8000, "ping")) #print(client(8000, "ping"))
#ports = port_check(serv_port) #ports = port_check(serv_port)
#print(ports) #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 = list(range(4000, 4200))
checks.remove(your_port) checks.remove(your_port)
for port in tqdm(range(4000, 4200)): for port in tqdm(checks):
if client(port, "ping"): if client(port, "ping"):
ports.append(port) ports.append(port)

@ -1,6 +1,6 @@
from os import system, mkdir from os import system, mkdir
from db import * from db import *
from shutil import copyfile, make_archive, rmtree from shutil import copyfile, make_archive, rmtree, copytree
from tqdm import tqdm from tqdm import tqdm
from verify import * from verify import *
@ -95,10 +95,11 @@ elif op == "3":
# Копируем файлы из mysites в cached # Копируем файлы из mysites в cached
copyfile(f"mysites/{domain}", "cached/{domain}") rmtree(f"cached/{domain}")
copyfile(f"mysites/{domain}.pem", "cached/{domain}.pem") copytree(f"mysites/{domain}", f"cached/{domain}")
copyfile(f"mysites/{domain}.sig", "cached/{domain}.sig") copyfile(f"mysites/{domain}.pem", f"cached/{domain}.pem")
copyfile(f"mysites/{domain}.zip", "cached/{domain}.zip") 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("Получаем все порты...") print("Получаем все порты...")
ports = port_check(serv_port) ports = port_check(serv_port)
print(ports)
print("Публикуем сайт...") print("Публикуем сайт...")
for port in tqdm(ports): for port in tqdm(ports):
client(port, f"publish_{domain}<>{http_port}") client(port, f"publish_{domain}<>{http_port}")

Loading…
Cancel
Save