tuic.go 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. package option
  2. import "github.com/sagernet/sing/common/json/badoption"
  3. type TUICInboundOptions struct {
  4. ListenOptions
  5. Users []TUICUser `json:"users,omitempty"`
  6. CongestionControl string `json:"congestion_control,omitempty"`
  7. AuthTimeout badoption.Duration `json:"auth_timeout,omitempty"`
  8. ZeroRTTHandshake bool `json:"zero_rtt_handshake,omitempty"`
  9. Heartbeat badoption.Duration `json:"heartbeat,omitempty"`
  10. InboundTLSOptionsContainer
  11. QUICOptions
  12. }
  13. type TUICUser struct {
  14. Name string `json:"name,omitempty"`
  15. UUID string `json:"uuid,omitempty"`
  16. Password string `json:"password,omitempty"`
  17. }
  18. type TUICOutboundOptions struct {
  19. DialerOptions
  20. ServerOptions
  21. UUID string `json:"uuid,omitempty"`
  22. Password string `json:"password,omitempty"`
  23. CongestionControl string `json:"congestion_control,omitempty"`
  24. UDPRelayMode string `json:"udp_relay_mode,omitempty"`
  25. UDPOverStream bool `json:"udp_over_stream,omitempty"`
  26. ZeroRTTHandshake bool `json:"zero_rtt_handshake,omitempty"`
  27. Heartbeat badoption.Duration `json:"heartbeat,omitempty"`
  28. Network NetworkList `json:"network,omitempty"`
  29. OutboundTLSOptionsContainer
  30. QUICOptions
  31. }