mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-05-18 10:08:41 +00:00
Merge branch 'XTLS:main' into happy
This commit is contained in:
commit
5840907b24
4 changed files with 26 additions and 8 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