Files
sing-box-extended-mirror/option/naive.go
T

41 lines
1.6 KiB
Go
Raw Normal View History

2022-08-10 20:19:16 +08:00
package option
2025-12-12 15:02:08 +08:00
import (
"github.com/sagernet/sing/common/auth"
2026-02-27 15:34:16 +08:00
"github.com/sagernet/sing/common/byteformats"
2025-12-12 15:02:08 +08:00
"github.com/sagernet/sing/common/json/badoption"
)
2022-08-10 20:19:16 +08:00
2025-12-18 17:08:36 +08:00
type QuicheCongestionControl string
const (
QuicheCongestionControlDefault QuicheCongestionControl = ""
QuicheCongestionControlBBR QuicheCongestionControl = "TBBR"
QuicheCongestionControlBBRv2 QuicheCongestionControl = "B2ON"
QuicheCongestionControlCubic QuicheCongestionControl = "QBIC"
QuicheCongestionControlReno QuicheCongestionControl = "RENO"
)
2022-08-10 20:19:16 +08:00
type NaiveInboundOptions struct {
ListenOptions
2025-12-18 17:08:36 +08:00
Users []auth.User `json:"users,omitempty"`
Network NetworkList `json:"network,omitempty"`
QUICCongestionControl string `json:"quic_congestion_control,omitempty"`
2023-12-11 18:36:06 +08:00
InboundTLSOptionsContainer
2022-08-10 20:19:16 +08:00
}
2025-12-12 15:02:08 +08:00
type NaiveOutboundOptions struct {
DialerOptions
ServerOptions
2026-02-27 15:34:16 +08:00
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
InsecureConcurrency int `json:"insecure_concurrency,omitempty"`
ExtraHeaders badoption.HTTPHeader `json:"extra_headers,omitempty"`
ReceiveWindow *byteformats.MemoryBytes `json:"stream_receive_window,omitempty"`
UDPOverTCP *UDPOverTCPOptions `json:"udp_over_tcp,omitempty"`
QUIC bool `json:"quic,omitempty"`
QUICCongestionControl string `json:"quic_congestion_control,omitempty"`
QUICSessionReceiveWindow *byteformats.MemoryBytes `json:"quic_session_receive_window,omitempty"`
2025-12-12 15:02:08 +08:00
OutboundTLSOptionsContainer
}