naive.go 1.6 KB

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