Sockopt: Cancel dialing after failed to bind interface, external controllers included such as TUN inbound's (#7173)

https://github.com/XTLS/Xray-core/pull/7161#issuecomment-6185101741

Fixes https://github.com/XTLS/Xray-core/issues/7160#issuecomment-6200788453

---------

Co-authored-by: Gleb <a1212gleb@gmail.com>
This commit is contained in:
风扇滑翔翼
2026-10-16 06:37:52 +00:00
committed by GitHub
co-authored by Gleb
parent d15966c76c
commit fe2ae23f42
6 changed files with 66 additions and 28 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ func applyOutboundSocketOptions(network string, address string, fd uintptr, conf
if config.Interface != "" {
if err := syscall.BindToDevice(int(fd), config.Interface); err != nil {
return errors.New("failed to set Interface").Base(err)
return NewBindError(errors.New("failed to set Interface").Base(err))
}
}