Refactor endpoint listen
This commit is contained in:
@@ -381,8 +381,8 @@ func (d *DefaultDialer) ListenSerialInterfacePacket(ctx context.Context, destina
|
||||
return d.trackPacketConn(packetConn, nil)
|
||||
}
|
||||
|
||||
func (d *DefaultDialer) WireGuardControl() control.Func {
|
||||
return d.udpListener.Control
|
||||
func (d *DefaultDialer) WireGuardControl() (control.Func, bool) {
|
||||
return d.udpListener.Control, d.autoDetectBindFunc != nil && d.netns == ""
|
||||
}
|
||||
|
||||
func (d *DefaultDialer) trackConn(conn net.Conn, err error) (net.Conn, error) {
|
||||
|
||||
@@ -5,5 +5,5 @@ import (
|
||||
)
|
||||
|
||||
type WireGuardListener interface {
|
||||
WireGuardControl() control.Func
|
||||
WireGuardControl() (control.Func, bool)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user