mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 17:38:41 +00:00
Sockopt: Fix Windows UDP interface
bind; Allow customSockopt
work for UDP (#4504)
This commit is contained in:
parent
1067171e6a
commit
b585b26f29
6 changed files with 169 additions and 137 deletions
|
@ -33,7 +33,7 @@ func applyOutboundSocketOptions(network string, address string, fd uintptr, conf
|
|||
if err != nil {
|
||||
return errors.New("failed to find the interface").Base(err)
|
||||
}
|
||||
isV4 := (network == "tcp4")
|
||||
isV4 := (network == "tcp4" || network == "udp4")
|
||||
if isV4 {
|
||||
var bytes [4]byte
|
||||
binary.BigEndian.PutUint32(bytes[:], uint32(inf.Index))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue