mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-17 23:06:30 -05:00
Fix SO_MARK setting for UDP outbound connections
This commit is contained in:
parent
d8285161ba
commit
033d2264ff
@ -70,6 +70,11 @@ func applyOutboundSocketOptions(network string, address string, fd uintptr, conf
|
|||||||
}
|
}
|
||||||
|
|
||||||
func applyInboundSocketOptions(network string, fd uintptr, config *SocketConfig) error {
|
func applyInboundSocketOptions(network string, fd uintptr, config *SocketConfig) error {
|
||||||
|
if config.Mark != 0 {
|
||||||
|
if err := syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, syscall.SO_MARK, int(config.Mark)); err != nil {
|
||||||
|
return newError("failed to set SO_MARK").Base(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
if isTCPSocket(network) {
|
if isTCPSocket(network) {
|
||||||
switch config.Tfo {
|
switch config.Tfo {
|
||||||
case SocketConfig_Enable:
|
case SocketConfig_Enable:
|
||||||
|
Loading…
Reference in New Issue
Block a user