v62: fetch POST multipart/form-data вместо WebSocket+base64 — обход DPI

This commit is contained in:
“Naeel”
2026-05-22 18:19:19 +04:00
parent 1f3dce39a4
commit b71eb9a45f
7 changed files with 180 additions and 38 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env python3
"""Test: HTTP POST large JSON body — does it pass DPI?"""
import requests, base64, os, json, time
# Fake audio of various sizes
for kb in [30, 50, 70, 100, 150]:
audio_b64 = base64.b64encode(os.urandom(kb * 1024)).decode()
body = json.dumps({"audio_b64": audio_b64, "mime": "audio/webm"})
size = len(body)
t0 = time.time()
try:
r = requests.post(
"https://proxy.kube5s.ru/",
data=body,
headers={"Content-Type": "application/json"},
timeout=30
)
dt = time.time() - t0
print(f" {kb}KB audio → JSON {size/1024:.1f}KB: HTTP {r.status_code} in {dt:.1f}s ✅")
except requests.Timeout:
print(f" {kb}KB audio → JSON {size/1024:.1f}KB: TIMEOUT ❌")
except Exception as e:
print(f" {kb}KB audio → JSON {size/1024:.1f}KB: ERR {e}")
time.sleep(1)