github.com/inazumav/sing-box@v0.0.0-20230926072359-ab51429a14f1/option/hysteria2.go (about)

     1  package option
     2  
     3  type Hysteria2InboundOptions struct {
     4  	ListenOptions
     5  	UpMbps                int                `json:"up_mbps,omitempty"`
     6  	DownMbps              int                `json:"down_mbps,omitempty"`
     7  	Obfs                  *Hysteria2Obfs     `json:"obfs,omitempty"`
     8  	Users                 []Hysteria2User    `json:"users,omitempty"`
     9  	IgnoreClientBandwidth bool               `json:"ignore_client_bandwidth,omitempty"`
    10  	TLS                   *InboundTLSOptions `json:"tls,omitempty"`
    11  	Masquerade            string             `json:"masquerade,omitempty"`
    12  }
    13  
    14  type Hysteria2Obfs struct {
    15  	Type     string `json:"type,omitempty"`
    16  	Password string `json:"password,omitempty"`
    17  }
    18  
    19  type Hysteria2User struct {
    20  	Name     string `json:"name,omitempty"`
    21  	Password string `json:"password,omitempty"`
    22  }
    23  
    24  type Hysteria2OutboundOptions struct {
    25  	DialerOptions
    26  	ServerOptions
    27  	UpMbps   int                 `json:"up_mbps,omitempty"`
    28  	DownMbps int                 `json:"down_mbps,omitempty"`
    29  	Obfs     *Hysteria2Obfs      `json:"obfs,omitempty"`
    30  	Password string              `json:"password,omitempty"`
    31  	Network  NetworkList         `json:"network,omitempty"`
    32  	TLS      *OutboundTLSOptions `json:"tls,omitempty"`
    33  }