Sockopt config: Add penetrate for XHTTP U-D-S, Remove tcpNoDelay

Now `sockopt` can be shared via `extra`, and be replaced with upload's forcibly.

Closes https://github.com/XTLS/Xray-core/issues/4227
This commit is contained in:
RPRX 2024-12-31 11:10:17 +00:00 committed by GitHub
parent 4ce65fc74c
commit 369d8944cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 39 additions and 59 deletions

View file

@ -103,11 +103,6 @@ func applyOutboundSocketOptions(network string, address string, fd uintptr, conf
}
}
if config.TcpNoDelay {
if err := syscall.SetsockoptInt(int(fd), syscall.IPPROTO_TCP, unix.TCP_NODELAY, 1); err != nil {
return errors.New("failed to set TCP_NODELAY", err)
}
}
if len(config.CustomSockopt) > 0 {
for _, custom := range config.CustomSockopt {
var level = 0x6 // default TCP