Proxy: Add Hysteria outbound & transport (version 2, udphop) and Salamander udpmask (#5508)

https://github.com/XTLS/Xray-core/issues/3547#issuecomment-3549896520
https://github.com/XTLS/Xray-core/issues/2635#issuecomment-3570871754
This commit is contained in:
LjhAUMEM
2026-01-13 21:31:51 +08:00
committed by GitHub
parent 8a9dbd407f
commit 92ada2dd1d
47 changed files with 5818 additions and 243 deletions

View File

@@ -87,6 +87,16 @@ func PortListFromProto(l *PortList) MemoryPortList {
return mpl
}
func (l *PortList) Ports() []uint32 {
var ports []uint32
for _, r := range l.Range {
for i := uint32(r.From); i <= uint32(r.To); i++ {
ports = append(ports, i)
}
}
return ports
}
func (mpl MemoryPortList) Contains(port Port) bool {
for _, pr := range mpl {
if pr.Contains(port) {