mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-12 14:56:04 +03:00
XHTTP server: Forbid Mux.Cool except pure XUDP (#4128)
https://github.com/XTLS/Xray-core/discussions/4113#discussioncomment-11491701
This commit is contained in:
parent
34141c940e
commit
46d8d9ef02
@ -7,6 +7,7 @@ import (
|
|||||||
"github.com/xtls/xray-core/app/proxyman"
|
"github.com/xtls/xray-core/app/proxyman"
|
||||||
"github.com/xtls/xray-core/common"
|
"github.com/xtls/xray-core/common"
|
||||||
"github.com/xtls/xray-core/common/errors"
|
"github.com/xtls/xray-core/common/errors"
|
||||||
|
"github.com/xtls/xray-core/common/net"
|
||||||
"github.com/xtls/xray-core/common/serial"
|
"github.com/xtls/xray-core/common/serial"
|
||||||
"github.com/xtls/xray-core/common/session"
|
"github.com/xtls/xray-core/common/session"
|
||||||
"github.com/xtls/xray-core/core"
|
"github.com/xtls/xray-core/core"
|
||||||
@ -158,6 +159,9 @@ func NewHandler(ctx context.Context, config *core.InboundHandlerConfig) (inbound
|
|||||||
Mark: streamSettings.SocketSettings.Mark,
|
Mark: streamSettings.SocketSettings.Mark,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
if streamSettings != nil && streamSettings.ProtocolName == "splithttp" {
|
||||||
|
ctx = session.ContextWithAllowedNetwork(ctx, net.Network_UDP)
|
||||||
|
}
|
||||||
|
|
||||||
allocStrategy := receiverSettings.AllocationStrategy
|
allocStrategy := receiverSettings.AllocationStrategy
|
||||||
if allocStrategy == nil || allocStrategy.Type == proxyman.AllocationStrategy_Always {
|
if allocStrategy == nil || allocStrategy.Type == proxyman.AllocationStrategy_Always {
|
||||||
|
Loading…
Reference in New Issue
Block a user