sing-box/experimental/libbox/platform.go

17 lines
499 B
Go
Raw Normal View History

2022-10-25 12:55:00 +08:00
package libbox
type PlatformInterface interface {
AutoDetectInterfaceControl(fd int32) error
2023-02-26 19:16:28 +08:00
OpenTun(options TunOptions) (int32, error)
2022-10-25 12:55:00 +08:00
WriteLog(message string)
UseProcFS() bool
FindConnectionOwner(ipProtocol int32, sourceAddress string, sourcePort int32, destinationAddress string, destinationPort int32) (int32, error)
PackageNameByUid(uid int32) (string, error)
UIDByPackageName(packageName string) (int32, error)
}
type TunInterface interface {
FileDescriptor() int32
Close() error
}