Skip to content

Commit 0b14d86

Browse files
iPythoningclaude
andcommitted
v1.2.0: Add HTTPUpgrade, Hysteria2 port hopping, ECH (10 protocols)
- Add VLESS HTTPUpgrade on port 10443 (stealth HTTP transport + Reality) - Add Hysteria2 port hopping via iptables DNAT (UDP 20000-40000 → 8443) - Document ECH (auto-enabled by Cloudflare for CDN relay domains) - Total: 10 protocol configurations, ~60MB RAM Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6441354 commit 0b14d86

3 files changed

Lines changed: 88 additions & 13 deletions

File tree

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ Client ──→ Your Server (S-UI / sing-box)
2727
├─ Trojan Reality :8880/tcp ← classic
2828
├─ VLESS Reality WS :2083/tcp ← CDN compatible
2929
├─ VLESS CDN WS :2052/tcp ← CF CDN relay (IP hidden)
30-
└─ ShadowTLS v3+SS2022 :9443/tcp ← anti-DPI (stealth)
30+
├─ ShadowTLS v3+SS2022 :9443/tcp ← anti-DPI (stealth)
31+
├─ VLESS HTTPUpgrade :10443/tcp ← stealth HTTP
32+
└─ Hysteria2 PortHop :20000-40000/udp ← anti-QoS
3133
3234
3335
wireproxy (SOCKS5, ~4MB)
@@ -100,6 +102,8 @@ Import the links into your preferred client:
100102
| 6 | VLESS Reality WS | 2083/tcp | WebSocket | CDN/firewall bypass |
101103
| 7 | **VLESS CDN WS** | 2052/tcp | WS + CF CDN | **IP hidden behind Cloudflare** |
102104
| 8 | **ShadowTLS v3 + SS2022** | 9443/tcp | ShadowTLS | **Anti-DPI, looks like normal TLS** |
105+
| 9 | **VLESS HTTPUpgrade** | 10443/tcp | HTTPUpgrade + Reality | **Stealth HTTP, lighter than WS** |
106+
| 10 | **Hysteria2 Port Hopping** | 20000-40000/udp | QUIC | **Anti-QoS, port randomization** |
103107

104108
### CDN Relay (Protocol 7)
105109

@@ -113,12 +117,24 @@ Performs a **real TLS handshake** with a legitimate site (e.g., `www.microsoft.c
113117

114118
**Client:** Requires sing-box based clients (NekoBox, sing-box CLI). Config saved to `/root/suiwarp-extra-links.txt`.
115119

120+
### VLESS HTTPUpgrade (Protocol 9)
121+
122+
Lighter than WebSocket — uses HTTP Upgrade mechanism with Reality TLS. Lower overhead, harder to fingerprint than standard WS.
123+
124+
### Hysteria2 Port Hopping (Protocol 10)
125+
126+
Server uses iptables DNAT to redirect UDP ports 20000-40000 to the Hysteria2 listener. Client randomly hops between ports, defeating QoS throttling and port-based blocking.
127+
128+
### ECH (Encrypted Client Hello)
129+
130+
Cloudflare automatically enables ECH for proxied domains. When using CDN relay (Protocol 7) with `sw.your-domain.com`, SNI is encrypted end-to-end on supported clients (Chrome 130+, Firefox 128+). No server config needed.
131+
116132
## Resource Usage
117133

118134
| Component | RAM | Description |
119135
|---|---|---|
120-
| S-UI (sing-box) | ~50MB | Panel + 7 protocol inbounds |
121-
| sing-box (ShadowTLS) | ~6MB | Standalone ShadowTLS v3 |
136+
| S-UI (sing-box) | ~50MB | Panel + 8 protocol inbounds |
137+
| sing-box (extra) | ~6MB | ShadowTLS v3 + HTTPUpgrade |
122138
| wireproxy | ~4MB | WARP tunnel |
123139
| **Total** | **~60MB** | Fits on 512MB VPS |
124140

@@ -179,6 +195,8 @@ Instead, wireproxy runs a ~4MB process that tunnels traffic through Cloudflare W
179195
| 2083/tcp | TCP | VLESS Reality WS |
180196
| 2052/tcp | TCP | VLESS CDN WS (CF relay) |
181197
| 9443/tcp | TCP | ShadowTLS v3 + SS2022 |
198+
| 10443/tcp | TCP | VLESS HTTPUpgrade |
199+
| 20000-40000/udp | UDP | Hysteria2 Port Hopping |
182200
| 2095/tcp | TCP | S-UI Panel |
183201
| 2096/tcp | TCP | Subscription Server |
184202

SKILL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ Client → S-UI (sing-box, 6 protocols) → wireproxy (SOCKS5 ~4MB) → Cloudfla
3333
| VLESS Reality WS | 2083/tcp | CDN/firewall bypass |
3434
| VLESS CDN WS | 2052/tcp | IP hidden behind Cloudflare CDN |
3535
| ShadowTLS v3 + SS2022 | 9443/tcp | Anti-DPI stealth (looks like real TLS) |
36+
| VLESS HTTPUpgrade | 10443/tcp | Stealth HTTP transport with Reality |
37+
| Hysteria2 Port Hopping | 20000-40000/udp | Anti-QoS, port randomization |
3638

3739
## Deployment
3840

setup.sh

Lines changed: 65 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,19 @@ SHADOWTLS_PORT=9443
4242
SHADOWTLS_SNI="www.microsoft.com"
4343
CDN_WS_PORT=2052
4444
CDN_WS_PATH="/cdn-ws"
45+
HTTPUPGRADE_PORT=10443
46+
HTTPUPGRADE_SNI="www.apple.com"
47+
HTTPUPGRADE_PATH="/xhttp"
48+
HY2_HOP_RANGE="20000:40000"
4549

4650
# ─── Step 1: System dependencies ────────────────────────────────────
47-
step "1/9 Installing dependencies"
51+
step "1/11 Installing dependencies"
4852
apt-get update -qq
4953
apt-get install -y -qq curl wget sqlite3 jq ufw > /dev/null 2>&1
5054
info "Dependencies installed"
5155

5256
# ─── Step 2: Swap (if not present) ──────────────────────────────────
53-
step "2/9 Configuring swap"
57+
step "2/11 Configuring swap"
5458
if [[ ! -f /swapfile ]]; then
5559
TOTAL_MEM_MB=$(awk '/MemTotal/ {print int($2/1024)}' /proc/meminfo)
5660
if [[ $TOTAL_MEM_MB -lt 4096 ]]; then
@@ -71,7 +75,7 @@ else
7175
fi
7276

7377
# ─── Step 3: Install S-UI ───────────────────────────────────────────
74-
step "3/9 Installing S-UI"
78+
step "3/11 Installing S-UI"
7579
if systemctl is-active --quiet s-ui 2>/dev/null; then
7680
info "S-UI already running, skipping installation"
7781
else
@@ -90,7 +94,7 @@ S_UI_DB="/usr/local/s-ui/db/s-ui.db"
9094
[[ ! -f "$S_UI_DB" ]] && error "S-UI database not found at $S_UI_DB"
9195

9296
# ─── Step 4: Generate Reality keypair & configure inbounds ──────────
93-
step "4/9 Configuring S-UI inbounds"
97+
step "4/11 Configuring S-UI inbounds"
9498

9599
# Generate Reality keypair
96100
REALITY_OUTPUT=$(/usr/local/s-ui/sui generate reality-keypair 2>/dev/null || echo "")
@@ -346,7 +350,7 @@ conn.close()
346350
PYEOF
347351

348352
# ─── Step 5: Install wireproxy + WARP ───────────────────────────────
349-
step "5/9 Setting up WARP via wireproxy"
353+
step "5/11 Setting up WARP via wireproxy"
350354

351355
# Install wgcf
352356
if ! command -v wgcf &>/dev/null; then
@@ -440,7 +444,7 @@ else
440444
fi
441445

442446
# ─── Step 6: Wire WARP into S-UI ────────────────────────────────────
443-
step "6/9 Connecting S-UI to WARP exit"
447+
step "6/11 Connecting S-UI to WARP exit"
444448

445449
python3 << PYEOF
446450
import sqlite3, json
@@ -503,7 +507,7 @@ else
503507
fi
504508

505509
# ─── Step 7: CDN Relay (VLESS WS) ───────────────────────────────────
506-
step "7/9 Adding CDN relay inbound"
510+
step "7/11 Adding CDN relay inbound"
507511

508512
python3 << PYEOF
509513
import sqlite3, json
@@ -548,7 +552,7 @@ info "CDN relay inbound ready on port ${CDN_WS_PORT}"
548552
info "To enable: add CF DNS A record pointing to ${SERVER_IP} (Proxied)"
549553

550554
# ─── Step 8: ShadowTLS v3 ───────────────────────────────────────────
551-
step "8/9 Setting up ShadowTLS v3"
555+
step "8/11 Setting up ShadowTLS v3"
552556

553557
# Install standalone sing-box for ShadowTLS
554558
if ! command -v sing-box &>/dev/null; then
@@ -620,8 +624,55 @@ else
620624
warn "ShadowTLS may need a moment to start"
621625
fi
622626

623-
# ─── Step 9: Firewall ───────────────────────────────────────────────
624-
step "9/9 Configuring firewall"
627+
# ─── Step 9: VLESS HTTPUpgrade (stealth HTTP transport) ─────────────
628+
step "9/11 Adding VLESS HTTPUpgrade"
629+
630+
# Add HTTPUpgrade inbound to the standalone sing-box config
631+
python3 << PYEOF
632+
import json
633+
with open("/etc/suiwarp/shadowtls.json") as f: cfg = json.load(f)
634+
# Check if already added
635+
tags = [ib["tag"] for ib in cfg["inbounds"]]
636+
if "vless-httpupgrade-in" not in tags:
637+
cfg["inbounds"].append({
638+
"type": "vless", "tag": "vless-httpupgrade-in",
639+
"listen": "::", "listen_port": ${HTTPUPGRADE_PORT},
640+
"users": [{"uuid": "${UUID}", "flow": ""}],
641+
"tls": {"enabled": True, "server_name": "${HTTPUPGRADE_SNI}",
642+
"reality": {"enabled": True,
643+
"handshake": {"server": "${HTTPUPGRADE_SNI}", "server_port": 443},
644+
"private_key": "${PRIVATE_KEY:-}",
645+
"short_id": ["${SHORT_ID}", ""]}},
646+
"transport": {"type": "httpupgrade", "path": "${HTTPUPGRADE_PATH}", "host": "${HTTPUPGRADE_SNI}"}
647+
})
648+
with open("/etc/suiwarp/shadowtls.json", "w") as f: json.dump(cfg, f, indent=2)
649+
print("Added HTTPUpgrade inbound")
650+
else:
651+
print("HTTPUpgrade already configured")
652+
PYEOF
653+
654+
systemctl restart suiwarp-shadowtls
655+
sleep 2
656+
info "VLESS HTTPUpgrade on port ${HTTPUPGRADE_PORT}"
657+
658+
# ─── Step 10: Hysteria2 Port Hopping ────────────────────────────────
659+
step "10/11 Configuring Hysteria2 port hopping"
660+
661+
# DNAT UDP port range to Hysteria2 port
662+
IFACE=$(ip route show default | awk '{print $5}' | head -1)
663+
if ! iptables -t nat -L PREROUTING -n 2>/dev/null | grep -q "8443"; then
664+
iptables -t nat -A PREROUTING -i "$IFACE" -p udp --dport ${HY2_HOP_RANGE} -j DNAT --to-destination :8443
665+
ip6tables -t nat -A PREROUTING -i "$IFACE" -p udp --dport ${HY2_HOP_RANGE} -j DNAT --to-destination :8443 2>/dev/null
666+
mkdir -p /etc/iptables
667+
iptables-save > /etc/iptables/rules.v4 2>/dev/null
668+
ip6tables-save > /etc/iptables/rules.v6 2>/dev/null
669+
info "Hysteria2 port hopping: UDP ${HY2_HOP_RANGE} → 8443"
670+
else
671+
info "Port hopping DNAT already configured"
672+
fi
673+
674+
# ─── Step 11: Firewall ──────────────────────────────────────────────
675+
step "11/11 Configuring firewall"
625676

626677
# Detect SSH port
627678
SSH_PORT=$(ss -tlnp | grep sshd | awk '{print $4}' | grep -oP '\d+$' | head -1)
@@ -640,6 +691,8 @@ ufw allow 8880/tcp comment "Trojan-Reality" > /dev/null 2>&1
640691
ufw allow 2083/tcp comment "VLESS-Reality-WS" > /dev/null 2>&1
641692
ufw allow 2052/tcp comment "VLESS-CDN-WS" > /dev/null 2>&1
642693
ufw allow 9443/tcp comment "ShadowTLS-v3" > /dev/null 2>&1
694+
ufw allow 10443/tcp comment "VLESS-HTTPUpgrade" > /dev/null 2>&1
695+
ufw allow 20000:40000/udp comment "Hysteria2-PortHop" > /dev/null 2>&1
643696
ufw allow 2095/tcp comment "S-UI-Panel" > /dev/null 2>&1
644697
ufw allow 2096/tcp comment "S-UI-Sub" > /dev/null 2>&1
645698

@@ -693,6 +746,8 @@ ${BOLD}│${NC} 5. Trojan Reality :8880/tcp ${BOLD}│
693746
${BOLD}${NC} 6. VLESS Reality WS :2083/tcp ${BOLD}${NC}
694747
${BOLD}${NC} 7. VLESS CDN WS :2052/tcp (CF relay) ${BOLD}${NC}
695748
${BOLD}${NC} 8. ShadowTLS v3 + SS2022 :9443/tcp (anti-DPI) ${BOLD}${NC}
749+
${BOLD}${NC} 9. VLESS HTTPUpgrade :10443/tcp (stealth) ${BOLD}${NC}
750+
${BOLD}${NC} 10. Hysteria2 PortHop :20000-40000/udp ${BOLD}${NC}
696751
${BOLD}${NC} ${BOLD}${NC}
697752
${BOLD}${NC} Client links: ${YELLOW}/root/suiwarp-client-links.txt${NC}
698753
${BOLD}${NC} ShadowTLS: ${YELLOW}/root/suiwarp-extra-links.txt${NC}

0 commit comments

Comments
 (0)