mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-07-16 21:09:44 +03:00
Add L3 routing support
This commit is contained in:
@@ -1,13 +1,23 @@
|
||||
package wireguard
|
||||
|
||||
import (
|
||||
"net/netip"
|
||||
|
||||
"github.com/sagernet/sing-tun"
|
||||
N "github.com/sagernet/sing/common/network"
|
||||
"github.com/sagernet/wireguard-go/tun"
|
||||
wgTun "github.com/sagernet/wireguard-go/tun"
|
||||
)
|
||||
|
||||
type Device interface {
|
||||
tun.Device
|
||||
wgTun.Device
|
||||
N.Dialer
|
||||
Start() error
|
||||
Inet4Address() netip.Addr
|
||||
Inet6Address() netip.Addr
|
||||
// NewEndpoint() (stack.LinkEndpoint, error)
|
||||
}
|
||||
|
||||
type NatDevice interface {
|
||||
Device
|
||||
CreateDestination(session tun.RouteSession, conn tun.RouteContext) tun.DirectDestination
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user