Export interface for WireGuard

This commit is contained in:
世界 2024-11-21 18:12:21 +08:00
parent 8a18f0c99e
commit 4ebeb2fa86
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
11 changed files with 269 additions and 49 deletions

3
tun.go
View file

@ -1,6 +1,7 @@
package tun
import (
"github.com/sagernet/sing/common/control"
"io"
"net"
"net/netip"
@ -54,6 +55,7 @@ type Options struct {
MTU uint32
GSO bool
AutoRoute bool
InterfaceScope bool
Inet4Gateway netip.Addr
Inet6Gateway netip.Addr
DNSServers []netip.Addr
@ -74,6 +76,7 @@ type Options struct {
IncludeAndroidUser []int
IncludePackage []string
ExcludePackage []string
InterfaceFinder control.InterfaceFinder
InterfaceMonitor DefaultInterfaceMonitor
FileDescriptor int
Logger logger.Logger