XTLS/Xray-core · error
uplinkHTTPMethod can be GET only in packet-up mode
Error message
uplinkHTTPMethod can be GET only in packet-up mode
What it means
SplitHTTPConfig.Build() uppercases the uplink HTTP method (default "POST") and rejects "GET" outside packet-up mode at transport_method.go:374-381. GET requests have no body, so uplink data can only be carried in cookies/headers/URL — which is a packet-up concept. In stream modes the uplink body is required, hence POST.
Source
Thrown at infra/conf/transport_method.go:380
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)
}
switch c.SeqPlacement {
case "":
c.SeqPlacement = "path"
case "path", "cookie", "header", "query":
default:
return nil, errors.New("unsupported seq placement: " + c.SeqPlacement)
}
View on GitHub (pinned to 7d214f8b09)
Solutions
- Set "mode": "packet-up" alongside "uplinkHTTPMethod": "GET"
- Or remove/change uplinkHTTPMethod to "POST" for auto/stream modes
Example fix
// before "mode": "stream-up", "uplinkHTTPMethod": "GET" // after "mode": "packet-up", "uplinkHTTPMethod": "GET"
Defensive patterns
Strategy: validation
Validate before calling
// Go: GET uplink only in packet-up
m := strings.ToUpper(cfg.UplinkHTTPMethod)
if m == "" {
m = "POST"
}
mode := cfg.Mode
if mode == "" {
mode = "auto"
}
if m == "GET" && mode != "packet-up" {
return errors.New("uplinkHTTPMethod GET requires mode packet-up")
} Prevention
- GET uplink implies packet-up — set both or neither
- Casing does not matter (uppercased internally) but mode must be exact
When it happens
Trigger: "uplinkHTTPMethod": "get" or "GET" (uppercased at line 377, so any casing matches) combined with mode "auto"/"stream-up"/"stream-one" or mode omitted. Any other method value (PUT, DELETE) is accepted without a mode check.
Common situations: Tuning guides recommending GET-based uplink for CDN compatibility without noting the packet-up requirement; switching mode for troubleshooting and forgetting the method constraint.
Related errors
- unsupported mode:
- UplinkDataPlacement can be only in packet-up mode
- Can not use "downloadSettings" in "stream-one" mode.
- Failed to unmarshal "extra".
- "headers" can't contain "host"
AI-assisted analysis of XTLS/Xray-core@7d214f8b09 (2026-08-15).
Data as JSON: /api/errors/d14c4fb3856bead5.
Report an issue: GitHub.