v2rayA/v2rayA · error
outbound group is required
Error message
outbound group is required
What it means
A custom inbound must be bound to an outbound group; ci.Outbound names which group (e.g. "proxy" or "direct"-style group) the inbound traffic is fed into. PostCustomInbound rejects an empty Outbound field.
Source
Thrown at service/server/controller/customInbound.go:44
if ci.Protocol != "socks" && ci.Protocol != "http" {
common.ResponseError(ctx, logError(fmt.Errorf("protocol must be socks or http")))
return
}
if ci.Port <= 0 || ci.Port > 65535 {
common.ResponseError(ctx, logError(fmt.Errorf("invalid port")))
return
}
if ci.Tag == "" {
common.ResponseError(ctx, logError(fmt.Errorf("tag is required")))
return
}
if net.ParseIP("0.0.0.0:"+fmt.Sprint(ci.Port)) == nil {
// basic port check already done above
}
// Validate outbound binding
if ci.Outbound == "" {
common.ResponseError(ctx, logError(fmt.Errorf("outbound group is required")))
return
}
if ci.OutboundType != "direct" && ci.OutboundType != "routingA" {
common.ResponseError(ctx, logError(fmt.Errorf("outboundType must be 'direct' or 'routingA'")))
return
}
// Verify the outbound group exists
outbounds := configure.GetOutbounds()
outboundExists := false
for _, ob := range outbounds {
if ob == ci.Outbound {
outboundExists = true
break
}
}
if !outboundExists {
common.ResponseError(ctx, logError(fmt.Errorf("outbound group '%s' does not exist", ci.Outbound)))View on GitHub (pinned to 71e5442fc5)
Solutions
- Set outbound to an existing outbound group name (commonly "proxy")
- Update client payloads to always include the outbound field
- Check configure.GetOutbounds() (GET outbounds) for valid group names before posting
Example fix
// before
{"protocol":"socks","port":1080,"tag":"in1","outbound":"","outboundType":"direct"}
// after
{"protocol":"socks","port":1080,"tag":"in1","outbound":"proxy","outboundType":"direct"} Defensive patterns
Strategy: validation
Validate before calling
if ci.Outbound == "" { return errors.New("outbound group is required") } Type guard
func hasOutbound(ci CustomInbound) bool { return ci.Outbound != "" } Try / catch
if err := postCustomInbound(ci); strings.Contains(err.Error(), "outbound group is required") { ci.Outbound = "proxy"; retry } Prevention
- Default outbound to "proxy" in client payloads
- Fetch the outbound list first and pick from it
- Include outbound in every custom inbound payload
When it happens
Trigger: POST /custom-inbound with ci.Outbound == "" — the outbound field is omitted or explicitly empty.
Common situations: Clients unaware the outbound binding is mandatory; copying payloads from older API versions where the outbound defaulted implicitly.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- protocol must be socks or http
- invalid port
- tag is required
- outboundType must be 'direct' or 'routingA'
- routingA rules are required when outboundType is 'routingA'
AI-assisted analysis of v2rayA/v2rayA@71e5442fc5 (2026-09-05).
Data as JSON: /api/errors/f6f6bd80fde9206a.
Report an issue: GitHub.