Run core/format.go

This commit is contained in:
yuhan6665 2022-12-25 19:37:35 -05:00
parent c9b6fc0104
commit c4fbdf1b78
18 changed files with 76 additions and 67 deletions

View file

@ -78,11 +78,11 @@ func applyOutboundSocketOptions(network string, address string, fd uintptr, conf
}
}
if config.TcpCongestion != "" {
if err := syscall.SetsockoptString(int(fd), syscall.SOL_TCP, syscall.TCP_CONGESTION, config.TcpCongestion); err != nil {
return newError("failed to set TCP_CONGESTION", err)
}
}
if config.TcpCongestion != "" {
if err := syscall.SetsockoptString(int(fd), syscall.SOL_TCP, syscall.TCP_CONGESTION, config.TcpCongestion); err != nil {
return newError("failed to set TCP_CONGESTION", err)
}
}
}
if config.Tproxy.IsEnabled() {
@ -128,11 +128,11 @@ func applyInboundSocketOptions(network string, fd uintptr, config *SocketConfig)
}
}
if config.TcpCongestion != "" {
if err := syscall.SetsockoptString(int(fd), syscall.SOL_TCP, syscall.TCP_CONGESTION, config.TcpCongestion); err != nil {
return newError("failed to set TCP_CONGESTION", err)
}
}
if config.TcpCongestion != "" {
if err := syscall.SetsockoptString(int(fd), syscall.SOL_TCP, syscall.TCP_CONGESTION, config.TcpCongestion); err != nil {
return newError("failed to set TCP_CONGESTION", err)
}
}
}
if config.Tproxy.IsEnabled() {