XTLS/Xray-core · error
unknown protocol
Error message
unknown protocol: {protocol} What it means
SniffingConfig.Build rejects a destOverride entry that matches none of the supported sniffers (http, tls/https/ssl, quic, fakedns/fakedns+others) after lowercasing; the unknown protocol name is appended.
Solutions
- Use supported destOverride values: http, tls, quic, fakedns
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at infra/conf/xray.go:78 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of XTLS/Xray-core@7d214f8b09 (2026-08-15).
Data as JSON: /api/errors/0bfbda5550b99875.
Report an issue: GitHub.
Appendix: source
Thrown at infra/conf/xray.go:78
MetadataOnly bool `json:"metadataOnly"`
RouteOnly bool `json:"routeOnly"`
}
// Build implements Buildable.
func (c *SniffingConfig) Build() (*proxyman.SniffingConfig, error) {
var protocols []string
for _, protocol := range c.DestOverride {
switch strings.ToLower(protocol) {
case "http":
protocols = append(protocols, "http")
case "tls", "https", "ssl":
protocols = append(protocols, "tls")
case "quic":
protocols = append(protocols, "quic")
case "fakedns", "fakedns+others":
protocols = append(protocols, "fakedns")
default:
return nil, errors.New("unknown protocol: ", protocol)
}
}
domains, err := geodata.ParseDomainRules(c.DomainsExcluded, geodata.Domain_Substr)
if err != nil {
return nil, err
}
ips, err := geodata.ParseIPRules(c.IPsExcluded)
if err != nil {
return nil, err
}
return &proxyman.SniffingConfig{
Enabled: c.Enabled,
DestinationOverride: protocols,
DomainsExcluded: domains,
IpsExcluded: ips,View on GitHub (pinned to 7d214f8b09)