Add back port hopping to hysteria 1

This commit is contained in:
世界
2025-02-16 11:49:24 +08:00
parent 91c7b638e8
commit f18889369f
4 changed files with 77 additions and 12 deletions

View File

@@ -1,6 +1,9 @@
package option
import "github.com/sagernet/sing/common/byteformats"
import (
"github.com/sagernet/sing/common/byteformats"
"github.com/sagernet/sing/common/json/badoption"
)
type HysteriaInboundOptions struct {
ListenOptions
@@ -26,6 +29,8 @@ type HysteriaUser struct {
type HysteriaOutboundOptions struct {
DialerOptions
ServerOptions
ServerPorts badoption.Listable[string] `json:"server_ports,omitempty"`
HopInterval badoption.Duration `json:"hop_interval,omitempty"`
Up *byteformats.NetworkBytesCompat `json:"up,omitempty"`
UpMbps int `json:"up_mbps,omitempty"`
Down *byteformats.NetworkBytesCompat `json:"down,omitempty"`