github.com/sagernet/sing-box@v1.9.0-rc.20/option/tun.go (about)

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