XHTTP SSH

This commit is contained in:
2026-07-10 23:58:27 -03:00
parent cf49340b9a
commit 4e3c99650e
4 changed files with 72 additions and 8 deletions
+11
View File
@@ -728,6 +728,17 @@ func (ib *nativeInbound) dispatchXHTTPConn(xc net.Conn, remote net.Addr) {
ib.handleVLESS(xc, remote)
case "vmess":
ib.handleVMess(xc, remote)
case "ssh":
// XHTTP->SSH tunnel: the decoded stream is a raw SSH transport. Hand it to
// the same SSH handler the TLS/DNSTT listeners use so tunneled clients
// authenticate with ordinary SSH accounts. getSSHConfig() is the live,
// hot-reloadable config; it can be nil only before the SSH server is set up.
cfg := getSSHConfig()
if cfg == nil {
xrayLogf("native xray: inbound %q XHTTP->SSH has no SSH config available yet", ib.tag)
return
}
handleConn(xc, cfg)
default:
xrayLogf("native xray: inbound %q XHTTP protocol %q not supported", ib.tag, ib.protocol)
}