Skip to content

feat(Surge): add AnyTLS protocol support for Surge export#58

Open
Margele wants to merge 1 commit into
MetaCubeX:masterfrom
Margele:feat/surge-anytls-export
Open

feat(Surge): add AnyTLS protocol support for Surge export#58
Margele wants to merge 1 commit into
MetaCubeX:masterfrom
Margele:feat/surge-anytls-export

Conversation

@Margele

@Margele Margele commented Jun 4, 2026

Copy link
Copy Markdown

What

Add AnyTLS protocol support to the Surge target in proxyToSurge.

Why

Surge added AnyTLS support (iOS 5.17.0+, Mac 6.4.3+, syntax Name = anytls, server, port, password=...). However proxyToSurge had no AnyTLS case, so AnyTLS nodes fell into default: continue; and were silently dropped. Converting an AnyTLS-only subscription to target=surge therefore produced empty output, while target=clash (which already supports AnyTLS) worked.

How

Emit a proper Surge AnyTLS line with password, optional sni and skip-cert-verify, gated on surge_ver >= 4 consistent with the existing TUIC / Hysteria2 cases. The common post-switch handling already appends udp-relay/tfo when defined.

🇭🇰 Hong Kong 01 = anytls, example.com, 4048, password=xxx, sni=xxx, skip-cert-verify=true, udp-relay=true

🤖 Generated with Claude Code

Surge added AnyTLS support (iOS 5.17.0+, Mac 6.4.3+). proxyToSurge
previously dropped AnyTLS nodes via the default case, producing empty
output for AnyTLS-only subscriptions. Emit the proper Surge line
(anytls, host, port, password=..., sni=..., skip-cert-verify=...),
gated on surge_ver >= 4 like TUIC/Hysteria2.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant