fix: protocol bugs in Loon, Stash, and Clash#818
Open
onesyue wants to merge 1 commit intocedar2025:masterfrom
Open
fix: protocol bugs in Loon, Stash, and Clash#818onesyue wants to merge 1 commit intocedar2025:masterfrom
onesyue wants to merge 1 commit intocedar2025:masterfrom
Conversation
Loon.php: - Fix Hysteria2 download bandwidth field: `bandwidth.download_bandwidth` → `bandwidth.down` - Add missing Hysteria2 obfs (salamander) support Stash.php: - Enable AnyTLS protocol support (was commented out) - Fix AnyTLS TLS field path: `tls_settings.server_name` → `tls.server_name` (AnyTLS uses `tls.*` not `tls_settings.*` like VMess/Trojan) - Add missing Hysteria2 obfs support Clash.php: - Add VLESS protocol support (with TLS/Reality/ws/grpc) - Add Hysteria/Hysteria2 protocol support (with obfs) - Add AnyTLS protocol support Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
bandwidth.download_bandwidth→bandwidth.down); add missing obfs (salamander) supporttls_settings.*→tls.*); add missing Hysteria2 obfs supportDetails
Loon.php — Hysteria2 bandwidth field name
The XBoard
protocol_settings.bandwidthobject usesup/downkeys (matching ClashMeta, Stash, SingBox), but Loon'sbuildHysteria()was readingbandwidth.download_bandwidthwhich doesn't exist, resulting in emptydownload-bandwidth=in the subscription output.Stash.php — AnyTLS commented out + wrong TLS path
handle()was fully commented out, so AnyTLS nodes were silently dropped from Stash subscriptions even thoughallowedProtocolsincluded it.buildAnyTLS()usedtls_settings.server_name/tls_settings.allow_insecure, but AnyTLS (like Hysteria/TUIC) stores TLS config undertls.*, nottls_settings.*. This caused SNI and skip-cert-verify to always be null/false.Stash.php + Loon.php — Missing Hysteria2 obfs
Neither file handled Hysteria2 obfs (salamander), so nodes with obfs enabled would connect without obfs and fail if the server requires it.
Clash.php — Missing VLESS/Hysteria/AnyTLS
allowedProtocolsonly listed ss/vmess/trojan/socks/http. Build methods for VLESS, Hysteria, and AnyTLS were missing entirely. Added them following the same patterns used in ClashMeta.php.Test plan
download-bandwidth=value for Hysteria2 nodes🤖 Generated with Claude Code