tun.go 1.6 KB

123456789101112131415161718192021222324
  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. IncludeUID Listable[uint32] `json:"include_uid,omitempty"`
  12. IncludeUIDRange Listable[string] `json:"include_uid_range,omitempty"`
  13. ExcludeUID Listable[uint32] `json:"exclude_uid,omitempty"`
  14. ExcludeUIDRange Listable[string] `json:"exclude_uid_range,omitempty"`
  15. IncludeAndroidUser Listable[int] `json:"include_android_user,omitempty"`
  16. IncludePackage Listable[string] `json:"include_package,omitempty"`
  17. ExcludePackage Listable[string] `json:"exclude_package,omitempty"`
  18. EndpointIndependentNat bool `json:"endpoint_independent_nat,omitempty"`
  19. UDPTimeout int64 `json:"udp_timeout,omitempty"`
  20. Stack string `json:"stack,omitempty"`
  21. Platform *TunPlatformOptions `json:"platform,omitempty"`
  22. InboundOptions
  23. }