feat: Реализована веб-панель управления и интеграция Sing-box для настройки VPN.
This commit is contained in:
@@ -270,7 +270,7 @@
|
||||
class="max-w-[1400px] mx-auto px-6 flex justify-between items-center text-[9px] uppercase tracking-[0.2em] opacity-40 text-[#00ff41]">
|
||||
<div class="flex gap-6">
|
||||
<span>Core: 4.1.0-Release</span>
|
||||
<span>Proxy: HTTP/8082</span>
|
||||
<span>Proxy: HTTP/8080</span>
|
||||
</div>
|
||||
<div class="hidden md:flex gap-6">
|
||||
<span>AES-256-GCM</span>
|
||||
|
||||
@@ -17,7 +17,8 @@ import time
|
||||
from urllib.parse import parse_qs, unquote
|
||||
from pathlib import Path
|
||||
|
||||
PORT = 3456
|
||||
PORT = int(os.environ.get("PORT", 3456))
|
||||
PROXY_PORT = int(os.environ.get("PROXY_PORT", 8080))
|
||||
APP_NAME = "VPN-Proxy-Control by Dokril"
|
||||
APP_DIR = Path(__file__).parent
|
||||
BASE_DIR = APP_DIR.parent
|
||||
@@ -86,7 +87,7 @@ def measure_tcp_latency(host: str, port: int, timeout: float = 2.0) -> int:
|
||||
|
||||
def measure_proxy_performance(enable_speed_test: bool = False) -> dict:
|
||||
"""Measure proxy latency, speed and public IP via local proxy"""
|
||||
proxy_url = "http://127.0.0.1:8082"
|
||||
proxy_url = f"http://127.0.0.1:{PROXY_PORT}"
|
||||
proxies = {"http": proxy_url, "https": proxy_url}
|
||||
|
||||
# 1. Measure Latency (Ping)
|
||||
@@ -264,7 +265,7 @@ def generate_vless_config(vless_params: dict) -> dict:
|
||||
"sniff": True,
|
||||
"users": [],
|
||||
"listen": "0.0.0.0",
|
||||
"listen_port": 8082,
|
||||
"listen_port": PROXY_PORT,
|
||||
"set_system_proxy": False
|
||||
}
|
||||
],
|
||||
@@ -633,7 +634,7 @@ class ProxyControlHandler(http.server.BaseHTTPRequestHandler):
|
||||
"sniff": True,
|
||||
"users": [],
|
||||
"listen": "0.0.0.0",
|
||||
"listen_port": 8082,
|
||||
"listen_port": PROXY_PORT,
|
||||
"set_system_proxy": False
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user