mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-09-15 21:00:27 +00:00
Fix bind control for auto redirect
This commit is contained in:
@@ -382,7 +382,12 @@ func (d *DefaultDialer) ListenSerialInterfacePacket(ctx context.Context, destina
|
||||
}
|
||||
|
||||
func (d *DefaultDialer) UDPListenerControl() (control.Func, bool) {
|
||||
return d.udpListener.Control, d.autoDetectBindFunc != nil && d.netns == ""
|
||||
egressEnabled := d.autoDetectBindFunc != nil && d.netns == ""
|
||||
listenerControl := d.udpListener.Control
|
||||
if egressEnabled && d.networkManager.AutoRedirectOutputMark() != 0 {
|
||||
listenerControl = control.Append(listenerControl, control.UnbindFromInterface())
|
||||
}
|
||||
return listenerControl, egressEnabled
|
||||
}
|
||||
|
||||
func (d *DefaultDialer) trackConn(conn net.Conn, err error) (net.Conn, error) {
|
||||
|
||||
Reference in New Issue
Block a user