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

  1. Add a non-empty "tag" to the proxySettings block, e.g. the tag of the outbound that should handle the proxied traffic.
  2. Verify that tag exists in outbounds (or wherever it is meant to point).
  3. 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

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


AI-assisted analysis of XTLS/Xray-core@7d214f8b09 (2026-08-15). Data as JSON: /api/errors/b583788e1283b048. Report an issue: GitHub.