tun.go 1.7 KB

1234567891011121314151617181920212223242526
  1. package option
  2. type TunInboundOptions struct {
  3. InterfaceName string `json:"interface_name,omitempty"`
  4. MTU uint32 `json:"mtu,omitempty"`
  5. Inet4Address Listable[ListenPrefix] `json:"inet4_address,omitempty"`
  6. Inet6Address Listable[ListenPrefix] `json:"inet6_address,omitempty"`
  7. AutoRoute bool `json:"auto_route,omitempty"`
  8. StrictRoute bool `json:"strict_route,omitempty"`
  9. Inet4RouteAddress Listable[ListenPrefix] `json:"inet4_route_address,omitempty"`
  10. Inet6RouteAddress Listable[ListenPrefix] `json:"inet6_route_address,omitempty"`
  11. IncludeInterface Listable[string] `json:"include_interface,omitempty"`
  12. ExcludeInterface Listable[string] `json:"exclude_interface,omitempty"`
  13. IncludeUID Listable[uint32] `json:"include_uid,omitempty"`
  14. IncludeUIDRange Listable[string] `json:"include_uid_range,omitempty"`
  15. ExcludeUID Listable[uint32] `json:"exclude_uid,omitempty"`
  16. ExcludeUIDRange Listable[string] `json:"exclude_uid_range,omitempty"`
  17. IncludeAndroidUser Listable[int] `json:"include_android_user,omitempty"`
  18. IncludePackage Listable[string] `json:"include_package,omitempty"`
  19. ExcludePackage Listable[string] `json:"exclude_package,omitempty"`
  20. EndpointIndependentNat bool `json:"endpoint_independent_nat,omitempty"`
  21. UDPTimeout int64 `json:"udp_timeout,omitempty"`
  22. Stack string `json:"stack,omitempty"`
  23. Platform *TunPlatformOptions `json:"platform,omitempty"`
  24. InboundOptions
  25. }