mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 09:18:34 +00:00
parent
03b8c094de
commit
c8b4580869
4 changed files with 43 additions and 23 deletions
|
@ -155,6 +155,12 @@ func applyInboundSocketOptions(network string, fd uintptr, config *SocketConfig)
|
|||
}
|
||||
}
|
||||
|
||||
if config.V6Only {
|
||||
if err := syscall.SetsockoptInt(int(fd), syscall.SOL_IPV6, syscall.IPV6_V6ONLY, 1); err != nil {
|
||||
return newError("failed to set IPV6_V6ONLY", err)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue