naive.go 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. package option
  2. import (
  3. "github.com/sagernet/sing/common/auth"
  4. "github.com/sagernet/sing/common/json/badoption"
  5. )
  6. type QuicheCongestionControl string
  7. const (
  8. QuicheCongestionControlDefault QuicheCongestionControl = ""
  9. QuicheCongestionControlBBR QuicheCongestionControl = "TBBR"
  10. QuicheCongestionControlBBRv2 QuicheCongestionControl = "B2ON"
  11. QuicheCongestionControlCubic QuicheCongestionControl = "QBIC"
  12. QuicheCongestionControlReno QuicheCongestionControl = "RENO"
  13. )
  14. type NaiveInboundOptions struct {
  15. ListenOptions
  16. Users []auth.User `json:"users,omitempty"`
  17. Network NetworkList `json:"network,omitempty"`
  18. QUICCongestionControl string `json:"quic_congestion_control,omitempty"`
  19. InboundTLSOptionsContainer
  20. }
  21. type NaiveOutboundOptions struct {
  22. DialerOptions
  23. ServerOptions
  24. Username string `json:"username,omitempty"`
  25. Password string `json:"password,omitempty"`
  26. InsecureConcurrency int `json:"insecure_concurrency,omitempty"`
  27. ExtraHeaders badoption.HTTPHeader `json:"extra_headers,omitempty"`
  28. UDPOverTCP *UDPOverTCPOptions `json:"udp_over_tcp,omitempty"`
  29. QUIC bool `json:"quic,omitempty"`
  30. QUICCongestionControl string `json:"quic_congestion_control,omitempty"`
  31. OutboundTLSOptionsContainer
  32. }