mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 17:38:41 +00:00
Fix Trojan XTLS
This commit is contained in:
parent
decb012f9d
commit
2e942e0303
4 changed files with 50 additions and 31 deletions
|
@ -38,7 +38,7 @@ func init() {
|
|||
|
||||
xtlsShow := platform.NewEnvFlag("xray.trojan.xtls.show").GetValue(func() string { return defaultFlagValue })
|
||||
if xtlsShow == "true" {
|
||||
trojanXTLSShow = true
|
||||
xtls_show = true
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -219,7 +219,8 @@ func (s *Server) Process(ctx context.Context, network net.Network, conn internet
|
|||
}
|
||||
if xtlsConn, ok := iConn.(*xtls.Conn); ok {
|
||||
xtlsConn.RPRX = true
|
||||
xtlsConn.SHOW = trojanXTLSShow
|
||||
xtlsConn.SHOW = xtls_show
|
||||
xtlsConn.MARK = "XTLS"
|
||||
if clientReader.Flow == XRD {
|
||||
xtlsConn.DirectMode = true
|
||||
if sc, ok := xtlsConn.Connection.(syscall.Conn); ok {
|
||||
|
@ -230,11 +231,9 @@ func (s *Server) Process(ctx context.Context, network net.Network, conn internet
|
|||
return newError(`failed to use ` + clientReader.Flow + `, maybe "security" is not "xtls"`).AtWarning()
|
||||
}
|
||||
} else {
|
||||
return newError("unable to use ", clientReader.Flow).AtWarning()
|
||||
return newError(account.Password + " is not able to use " + clientReader.Flow).AtWarning()
|
||||
}
|
||||
case "":
|
||||
default:
|
||||
return newError("unsupported flow " + account.Flow).AtWarning()
|
||||
}
|
||||
|
||||
ctx = log.ContextWithAccessMessage(ctx, &log.AccessMessage{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue