mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 17:38:41 +00:00
XTLS protocol: Apply Vision's padding to XUDP Mux & Minor fixes
It's recommended to enable XUDP Mux when using XTLS Vision Thank @yuhan6665 for testing
This commit is contained in:
parent
b4c1a56026
commit
242f3b0e0b
3 changed files with 12 additions and 11 deletions
|
@ -135,13 +135,13 @@ func (h *Handler) Process(ctx context.Context, link *transport.Link, dialer inte
|
|||
fallthrough
|
||||
case vless.XRV:
|
||||
switch request.Command {
|
||||
case protocol.RequestCommandMux:
|
||||
requestAddons.Flow = "" // let server break Mux connections that contain TCP requests
|
||||
case protocol.RequestCommandUDP:
|
||||
if !allowUDP443 && request.Port == 443 {
|
||||
return newError("XTLS rejected UDP/443 traffic").AtInfo()
|
||||
}
|
||||
requestAddons.Flow = ""
|
||||
case protocol.RequestCommandMux:
|
||||
fallthrough // let server break Mux connections that contain TCP requests
|
||||
case protocol.RequestCommandTCP:
|
||||
var t reflect.Type
|
||||
var p uintptr
|
||||
|
@ -158,7 +158,7 @@ func (h *Handler) Process(ctx context.Context, link *transport.Link, dialer inte
|
|||
t = reflect.TypeOf(realityConn.Conn).Elem()
|
||||
p = uintptr(unsafe.Pointer(realityConn.Conn))
|
||||
} else {
|
||||
return newError("XTLS only supports TCP, mKCP and DomainSocket for now.").AtWarning()
|
||||
return newError("XTLS only supports TLS and REALITY directly for now.").AtWarning()
|
||||
}
|
||||
if sc, ok := netConn.(syscall.Conn); ok {
|
||||
rawConn, _ = sc.SyscallConn()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue