Update WireGuard and Tailscale

This commit is contained in:
世界
2025-09-15 19:52:28 +08:00
parent 12b055989b
commit 7f3ea8dbd8
8 changed files with 21 additions and 40 deletions

View File

@@ -14,6 +14,7 @@ import (
"unsafe"
"github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/common/dialer"
"github.com/sagernet/sing-tun"
"github.com/sagernet/sing/common"
E "github.com/sagernet/sing/common/exceptions"
@@ -153,9 +154,9 @@ func (e *Endpoint) Start(resolve bool) error {
return nil
}
var bind conn.Bind
wgListener, isWgListener := common.Cast[conn.Listener](e.options.Dialer)
wgListener, isWgListener := common.Cast[dialer.WireGuardListener](e.options.Dialer)
if isWgListener {
bind = conn.NewStdNetBind(wgListener)
bind = conn.NewStdNetBind(wgListener.WireGuardControl())
} else {
var (
isConnect bool