tuic.go 1.3 KB

123456789101112131415161718192021222324252627282930313233
  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. }
  12. type TUICUser struct {
  13. Name string `json:"name,omitempty"`
  14. UUID string `json:"uuid,omitempty"`
  15. Password string `json:"password,omitempty"`
  16. }
  17. type TUICOutboundOptions struct {
  18. DialerOptions
  19. ServerOptions
  20. UUID string `json:"uuid,omitempty"`
  21. Password string `json:"password,omitempty"`
  22. CongestionControl string `json:"congestion_control,omitempty"`
  23. UDPRelayMode string `json:"udp_relay_mode,omitempty"`
  24. UDPOverStream bool `json:"udp_over_stream,omitempty"`
  25. ZeroRTTHandshake bool `json:"zero_rtt_handshake,omitempty"`
  26. Heartbeat badoption.Duration `json:"heartbeat,omitempty"`
  27. Network NetworkList `json:"network,omitempty"`
  28. OutboundTLSOptionsContainer
  29. }