XTLS/Xray-core · error

unsupported uplink data placement:

Error message

unsupported uplink data placement: 

What it means

SplitHTTPConfig.Build() validates "uplinkDataPlacement" in a switch at transport_method.go:362-372. Empty defaults to PlacementAuto ("auto"); accepted values are the splithttp placement constants: "auto", "body", "cookie", "header". Any other string appends to this error. Placement is case-sensitive.

Source

Thrown at infra/conf/transport_method.go:371

	switch c.XPaddingMethod {
	case "":
		c.XPaddingMethod = "repeat-x"
	case "repeat-x", "tokenish":
	default:
		return nil, errors.New("unsupported padding method: " + c.XPaddingMethod)
	}

	switch c.UplinkDataPlacement {
	case "":
		c.UplinkDataPlacement = splithttp.PlacementAuto
	case splithttp.PlacementAuto, splithttp.PlacementBody:
	case splithttp.PlacementCookie, splithttp.PlacementHeader:
		if c.Mode != "packet-up" {
			return nil, errors.New("UplinkDataPlacement can be " + c.UplinkDataPlacement + " only in packet-up mode")
		}
	default:
		return nil, errors.New("unsupported uplink data placement: " + c.UplinkDataPlacement)
	}

	if c.UplinkHTTPMethod == "" {
		c.UplinkHTTPMethod = "POST"
	}
	c.UplinkHTTPMethod = strings.ToUpper(c.UplinkHTTPMethod)

	if c.UplinkHTTPMethod == "GET" && c.Mode != "packet-up" {
		return nil, errors.New("uplinkHTTPMethod can be GET only in packet-up mode")
	}

	switch c.SessionIDPlacement {
	case "":
		c.SessionIDPlacement = "path"
	case "path", "cookie", "header", "query":
	default:
		return nil, errors.New("unsupported session placement: " + c.SessionIDPlacement)
	}

View on GitHub (pinned to 7d214f8b09)

Solutions

  1. Use one of: "auto", "body", "cookie", "header" (lowercase)
  2. Omit the field to accept "auto"

Example fix

// before
"uplinkDataPlacement": "Header"
// after
"uplinkDataPlacement": "header"
Defensive patterns

Strategy: type-guard

Type guard

func validUplinkDataPlacement(p string) bool {
	switch p {
	case "", "auto", "body", "cookie", "header":
		return true
	}
	return false
}

Prevention

When it happens

Trigger: "uplinkDataPlacement": "Header" (wrong case), "headers", "BODY", or any unrecognized value in splithttp transportSettings.

Common situations: Case typos; guessing values; configs from generators targeting a different XHTTP version.

Related errors


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