XTLS/Xray-core · error
Config: unknown transport protocol: + p
Error message
Config: unknown transport protocol: + p
What it means
Thrown by TransportProtocol.Build() when the configured transport protocol string does not match any known value. Accepted values include tcp/raw, mkcp/kcp, websocket, httpupgrade, splithttp/xhttp, domainsocket, hysteria; 'h2'/'h3'/'http' and 'quic' are hard-removed features and produce dedicated removal errors instead. Anything else falls through to this unknown-protocol error.
Source
Thrown at infra/conf/transport_internet.go:40
case "kcp", "mkcp":
return "mkcp", nil
case "grpc":
errors.PrintNonRemovalDeprecatedFeatureWarning("gRPC transport (with unnecessary costs, etc.)", "XHTTP stream-up H2")
return "grpc", nil
case "ws", "websocket":
errors.PrintNonRemovalDeprecatedFeatureWarning("WebSocket transport (with ALPN http/1.1, etc.)", "XHTTP H2 & H3")
return "websocket", nil
case "httpupgrade":
errors.PrintNonRemovalDeprecatedFeatureWarning("HTTPUpgrade transport (with ALPN http/1.1, etc.)", "XHTTP H2 & H3")
return "httpupgrade", nil
case "h2", "h3", "http":
return "", errors.PrintRemovedFeatureError("HTTP transport (without header padding, etc.)", "XHTTP stream-one H2 & H3")
case "quic":
return "", errors.PrintRemovedFeatureError("QUIC transport (without web service, etc.)", "XHTTP stream-one H3")
case "hysteria":
return "hysteria", nil
default:
return "", errors.New("Config: unknown transport protocol: ", p)
}
}
type StreamConfig struct {
Address *Address `json:"address"`
Port uint16 `json:"port"`
Method *TransportProtocol `json:"method"`
Network *TransportProtocol `json:"network"`
Security string `json:"security"`
FinalMask *FinalMask `json:"finalmask"`
TLSSettings *TLSConfig `json:"tlsSettings"`
REALITYSettings *REALITYConfig `json:"realitySettings"`
RAWSettings *TCPConfig `json:"rawSettings"`
TCPSettings *TCPConfig `json:"tcpSettings"`
XHTTPSettings *SplitHTTPConfig `json:"xhttpSettings"`
SplitHTTPSettings *SplitHTTPConfig `json:"splithttpSettings"`
KCPSettings *KCPConfig `json:"kcpSettings"`
GRPCSettings *GRPCConfig `json:"grpcSettings"`View on GitHub (pinned to 7d214f8b09)
Solutions
- Correct the protocol name to a supported one: tcp, mkcp, websocket, httpupgrade, splithttp, etc.
- If you used 'h2', 'h3', 'http' or 'quic', migrate to splithttp (XHTTP H2/H3).
- Check for stray whitespace/case differences in the JSON value.
Example fix
// before "network": "http" // after "network": "splithttp"
Defensive patterns
Strategy: validation
Validate before calling
var known = map[string]bool{"tcp": true, "raw": true, "mkcp": true, "kcp": true, "websocket": true, "httpupgrade": true, "splithttp": true, "xhttp": true, "domainsocket": true, "hysteria": true}
if !known[strings.ToLower(p)] {
return fmt.Errorf("unsupported transport protocol %q", p)
} Prevention
- Maintain a whitelist of supported protocol names in config tooling.
- Reject removed protocols (http, h2, h3, quic) at generate time with a migration hint.
- Validate network/method fields before the core ever sees them.
When it happens
Trigger: Setting streamSettings.network (or method) to e.g. "tls", "grpc2", "TCP" (case-sensitive where not normalized), or a typo like "websockets" triggers this during StreamConfig build.
Common situations: Typos in protocol names; using a protocol removed in this fork (plain http/quic); copying configs from a client with different protocol naming.
Related errors
- gecko: invalid min/max packet size
- invalid scheme + u.Scheme
- empty stunServers
- bridge tag is empty
- bridge domain is empty
AI-assisted analysis of XTLS/Xray-core@7d214f8b09 (2026-08-15).
Data as JSON: /api/errors/ee69b6c5c852d97b.
Report an issue: GitHub.