Skip to content

feat(hy2): support salamander obfuscation#66

Open
darkworon wants to merge 1 commit into
daeuniverse:mainfrom
darkworon:hy2-salamander-hardening
Open

feat(hy2): support salamander obfuscation#66
darkworon wants to merge 1 commit into
daeuniverse:mainfrom
darkworon:hy2-salamander-hardening

Conversation

@darkworon

Copy link
Copy Markdown

Summary

  • add Hysteria2 Salamander obfuscation support for obfs=salamander&obfs-password=...
  • wrap QUIC packets with the Hysteria v2 [8-byte salt][payload] format using BLAKE2b-256 over PSK+salt
  • validate obfuscation settings, accept plain, normalize method casing, and preserve URI export
  • add focused tests for round-trip obfuscation, short PSK rejection, oversized packet handling, and generic PacketConn capabilities

Context

This covers the same feature area as #57, with a couple of hardening changes from testing against sing-box/Hysteria2 servers:

  • avoid exposing UDP-specific buffer/syscall methods from the generic obfs wrapper
  • validate the PSK before starting the QUIC handshake so invalid configuration fails fast instead of timing out
  • normalize the obfs method case before validation/dialing

Test

  • go test ./protocol/hysteria2/client ./dialer/hysteria2

@darkworon darkworon requested a review from a team as a code owner May 4, 2026 19:02
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