来源: feat: add Snell v5 protocol support by winmin · Pull Request #2816 · MetaCubeX/mihomo · GitHub
Summary
Add Snell v5 protocol support with the following implementation details:
- AES-128-GCM AEAD with Argon2id KDF (t=3, m=8KiB, p=1)
- 16-byte salt per direction, independent key derivation
- 7-byte frame header:
[type, reserved(2), padding_len(2 BE), payload_len(2 BE)] - Padding with byte interleave swap obfuscation
- Lazy CONNECT response (server replies after first relay data)
- Status byte + initial relay data merged in first response frame
Files changed
transport/snell/v5.go— v5 protocol implementation (new file)adapter/outbound/snell.go— v5 adapter integrationtransport/snell/snell.go—Version5constant
Config example
- name: my-snell-v5
type: snell
server: example.com
port: 15398
psk: your_psk
version: 5
个人点评:
Snell v5 协议是 surge 专属的闭源协议,谁给逆向了