Salamander finalmask: Support packetSize (Gecko in Hysteria v2.9.2) (#6198)

And some other refinements

https://github.com/XTLS/Xray-core/pull/6198#issuecomment-4567438813

Example: https://github.com/XTLS/Xray-core/pull/6198#issue-4522226670
This commit is contained in:
LjhAUMEM
2026-05-29 16:36:45 +08:00
committed by RPRX
parent 36303694d1
commit 66a8100737
17 changed files with 587 additions and 361 deletions
+12 -4
View File
@@ -1811,13 +1811,21 @@ func (c *Aes128Gcm) Build() (proto.Message, error) {
}
type Salamander struct {
Password string `json:"password"`
Password string `json:"password"`
PacketSize *Int32Range `json:"packetSize"`
}
func (c *Salamander) Build() (proto.Message, error) {
config := &salamander.Config{}
config.Password = c.Password
return config, nil
if c.PacketSize != nil {
return &salamander.GeckoConfig{
Password: c.Password,
MinPacketSize: c.PacketSize.From,
MaxPacketSize: c.PacketSize.To,
}, nil
}
return &salamander.Config{
Password: c.Password,
}, nil
}
type Sudoku struct {