XTLS/Xray-core · error
Proxy tag is not set.
Error message
Proxy tag is not set.
What it means
Thrown by ProxyConfig.Build() when a proxy settings block is present but its "tag" field is empty. The tag is the identifier other config sections (inbounds/outbounds/rules) use to reference this proxy, so an empty tag makes the entry unusable and is rejected at build time.
Source
Thrown at infra/conf/transport_internet.go:322
MaxIncomingStreams: c.FinalMask.QuicParams.MaxIncomingStreams,
}
}
}
return config, nil
}
type ProxyConfig struct {
Tag string `json:"tag"`
// TransportLayerProxy: For compatibility.
TransportLayerProxy bool `json:"transportLayer"`
}
// Build implements Buildable.
func (v *ProxyConfig) Build() (*internet.ProxyConfig, error) {
if v.Tag == "" {
return nil, errors.New("Proxy tag is not set.")
}
return &internet.ProxyConfig{
Tag: v.Tag,
TransportLayerProxy: v.TransportLayerProxy,
}, nil
}
View on GitHub (pinned to 7d214f8b09)
Solutions
- Add a non-empty "tag" to the proxySettings block, e.g. the tag of the outbound that should handle the proxied traffic.
- Verify that tag exists in outbounds (or wherever it is meant to point).
- If proxying is not needed, remove the proxySettings block entirely.
Example fix
// before
"proxySettings": { "transportLayer": true }
// after
"proxySettings": { "tag": "warp", "transportLayer": true } Defensive patterns
Strategy: validation
Validate before calling
func proxyTagSet(ss map[string]any) bool {
ps, ok := ss["proxySettings"].(map[string]any)
if !ok { return true } // no block, fine
tag, _ := ps["tag"].(string)
return strings.TrimSpace(tag) != ""
} Type guard
func hasProxySettings(ss map[string]any) bool {
_, ok := ss["proxySettings"]
return ok
} Prevention
- Whenever proxySettings (or transportLayer) is added, immediately set tag to a real outbound tag.
- When renaming outbounds, grep for the old tag in proxySettings too.
- Validate tag non-emptiness in your config linter.
When it happens
Trigger: "streamSettings": { "sockopt"... } style block containing "proxySettings": { "transportLayer": true } without a "tag"; or an explicit "tag": "".
Common situations: Enabling transportLayer forwarding but forgetting to point it at an outbound tag; renaming/deleting the referenced outbound while leaving proxySettings; YAML-to-JSON conversions dropping empty strings differently than expected.
Related errors
- failed to get outbound handler with tag: ${tag}
- bridge tag is empty
- bridge domain is empty
- portal tag is empty
- portal domain is empty
AI-assisted analysis of XTLS/Xray-core@7d214f8b09 (2026-08-15).
Data as JSON: /api/errors/b583788e1283b048.
Report an issue: GitHub.