|
|
@@ -11,13 +11,13 @@ import os
|
|
|
# --- CONFIGURACIÓN BASE ---
|
|
|
LISTENING_PORT = int(sys.argv[1]) if len(sys.argv) > 1 else 8080
|
|
|
SSH_HOST = '127.0.0.1'
|
|
|
-SSH_PORT = 22 # Compatible con Dropbear (22 o 223) y OpenSSH
|
|
|
+SSH_PORT = 227 # Compatible con Dropbear (22 o 223) y OpenSSH
|
|
|
LOG_FILE = "/root/proxy.log"
|
|
|
MAX_LOG_SIZE = 10 * 1024 * 1024 # 10MB
|
|
|
|
|
|
# --- CONFIGURACIÓN DE SEGURIDAD AVANZADA ---
|
|
|
MAX_CONNECTIONS = 1000
|
|
|
-CONNECTION_COOLDOWN = 0.5
|
|
|
+CONNECTION_COOLDOWN = 0.7
|
|
|
TIMEOUT = 60
|
|
|
BUFLEN = 16384
|
|
|
|
|
|
@@ -29,14 +29,12 @@ BAN_TIME = 3600 # Tiempo de baneo en segundos (3600s = 1 hora)
|
|
|
banned_ips_memory = {} # Diccionario: guarda la IP y su tiempo de expiración
|
|
|
ip_strikes = {}
|
|
|
|
|
|
-# --- SECCIÓN DE CUSTOM HEADERS (Inyectados en la respuesta 101) ---
|
|
|
+# --- SECCIÓN DE CUSTOM HEADERS (Inyectados en la respuesta) ---
|
|
|
CUSTOM_HEADERS = {
|
|
|
"Server": "nginx/1.21.0",
|
|
|
"X-Forwarded-For": "127.0.0.1",
|
|
|
"Content-Type": "text/html; charset=UTF-8",
|
|
|
"Proxy-Connection": "keep-alive",
|
|
|
- "X-Proxy-Agent": "Gemini-Ultra-Robust-v3",
|
|
|
- "X-Forwarded-For-Proxy": "True",
|
|
|
"Cache-Control": "no-cache"
|
|
|
}
|
|
|
|
|
|
@@ -44,20 +42,8 @@ CUSTOM_HEADERS = {
|
|
|
MENSAJES = [
|
|
|
"🚀 CONEXION ESTABLECIDA",
|
|
|
"🛡️ SEGURIDAD ACTIVA",
|
|
|
- "Pfsense",
|
|
|
- "OPNsense",
|
|
|
- "VyOS",
|
|
|
- "Claro",
|
|
|
- "Windows Server",
|
|
|
- "BSD Free",
|
|
|
- "VyOS",
|
|
|
- "Altice",
|
|
|
- "Viva",
|
|
|
- "Google",
|
|
|
- "VyOS",
|
|
|
- "TNSR",
|
|
|
"🔋 OPTIMIZACION SISTEMA",
|
|
|
- "🌐 ACCESO OK"
|
|
|
+ "🌐 ACCESO NETMOD OK"
|
|
|
]
|
|
|
mensaje_cycle = itertools.cycle(MENSAJES)
|
|
|
cycle_lock = threading.Lock()
|
|
|
@@ -137,14 +123,14 @@ class ConnectionHandler(threading.Thread):
|
|
|
ip_cooldowns[client_ip] = now
|
|
|
ip_strikes[client_ip] = 0 # Resetea strikes si conecta legalmente
|
|
|
|
|
|
- # 4. Leer payload inicial de Netmod (Absorción)
|
|
|
+ # 4. Leer payload inicial
|
|
|
self.client.settimeout(5)
|
|
|
try:
|
|
|
payload = self.client.recv(BUFLEN)
|
|
|
if not payload: return
|
|
|
|
|
|
- # 💡 Modo Sigilo: Si un navegador intenta acceder (ej. GET / HTTP/1.1) y NO es Netmod.
|
|
|
- # Puedes quitar el comentario de las 3 líneas de abajo para activarlo si quieres que Netmod sea obligatorio.
|
|
|
+ # 💡 Modo Sigilo: Si un navegador intenta acceder (ej. GET / HTTP/1.1) y NO es un inyector.
|
|
|
+ # Puedes quitar el comentario de las 3 lineas de abajo para activarlo si quieres que el Inyector sea obligatorio.
|
|
|
# if b"Upgrade: websocket" not in payload and b"HTTP/" in payload:
|
|
|
# self.client.sendall(b"HTTP/1.1 400 Bad Request\r\nServer: nginx\r\n\r\n")
|
|
|
# return
|