mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 09:18:34 +00:00
Chore: Update gVisor to the latest version; Fmt .go files (#4663)
This commit is contained in:
parent
16641fc4b5
commit
19ba9cbe91
3 changed files with 7 additions and 7 deletions
|
@ -112,7 +112,7 @@ func applyOutboundSocketOptions(network string, address string, fd uintptr, conf
|
|||
|
||||
if len(config.CustomSockopt) > 0 {
|
||||
for _, custom := range config.CustomSockopt {
|
||||
if custom.System != "" && custom.System != runtime.GOOS{
|
||||
if custom.System != "" && custom.System != runtime.GOOS {
|
||||
errors.LogDebug(context.Background(), "CustomSockopt system not match: ", "want ", custom.System, " got ", runtime.GOOS)
|
||||
continue
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ func applyOutboundSocketOptions(network string, address string, fd uintptr, conf
|
|||
// network might be tcp4 or tcp6
|
||||
// use HasPrefix so that "tcp" can match tcp4/6 with "tcp" if user want to control all tcp (udp is also the same)
|
||||
// if it is empty, strings.HasPrefix will always return true to make it apply for all networks
|
||||
if !strings.HasPrefix(network, custom.Network){
|
||||
if !strings.HasPrefix(network, custom.Network) {
|
||||
continue
|
||||
}
|
||||
var level = 0x6 // default TCP
|
||||
|
@ -218,7 +218,7 @@ func applyInboundSocketOptions(network string, fd uintptr, config *SocketConfig)
|
|||
}
|
||||
if len(config.CustomSockopt) > 0 {
|
||||
for _, custom := range config.CustomSockopt {
|
||||
if custom.System != "" && custom.System != runtime.GOOS{
|
||||
if custom.System != "" && custom.System != runtime.GOOS {
|
||||
errors.LogDebug(context.Background(), "CustomSockopt system not match: ", "want ", custom.System, " got ", runtime.GOOS)
|
||||
continue
|
||||
}
|
||||
|
@ -226,7 +226,7 @@ func applyInboundSocketOptions(network string, fd uintptr, config *SocketConfig)
|
|||
// network might be tcp4 or tcp6
|
||||
// use HasPrefix so that "tcp" can match tcp4/6 with "tcp" if user want to control all tcp (udp is also the same)
|
||||
// if it is empty, strings.HasPrefix will always return true to make it apply for all networks
|
||||
if !strings.HasPrefix(network, custom.Network){
|
||||
if !strings.HasPrefix(network, custom.Network) {
|
||||
continue
|
||||
}
|
||||
var level = 0x6 // default TCP
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue