simple.go 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. package option
  2. import (
  3. "github.com/sagernet/sing/common/auth"
  4. "github.com/sagernet/sing/common/json/badoption"
  5. )
  6. type SocksInboundOptions struct {
  7. ListenOptions
  8. Users []auth.User `json:"users,omitempty"`
  9. }
  10. type HTTPMixedInboundOptions struct {
  11. ListenOptions
  12. Users []auth.User `json:"users,omitempty"`
  13. SetSystemProxy bool `json:"set_system_proxy,omitempty"`
  14. InboundTLSOptionsContainer
  15. }
  16. type SOCKSOutboundOptions struct {
  17. DialerOptions
  18. ServerOptions
  19. Version string `json:"version,omitempty"`
  20. Username string `json:"username,omitempty"`
  21. Password string `json:"password,omitempty"`
  22. Network NetworkList `json:"network,omitempty"`
  23. UDPOverTCP *UDPOverTCPOptions `json:"udp_over_tcp,omitempty"`
  24. }
  25. type HTTPOutboundOptions struct {
  26. DialerOptions
  27. ServerOptions
  28. Username string `json:"username,omitempty"`
  29. Password string `json:"password,omitempty"`
  30. OutboundTLSOptionsContainer
  31. Path string `json:"path,omitempty"`
  32. Headers badoption.HTTPHeader `json:"headers,omitempty"`
  33. }