XTLS/Xray-core · error
target not specified.
Error message
target not specified.
What it means
Error "target not specified." thrown in XTLS/Xray-core.
Source
Thrown at proxy/socks/client.go:53
if err != nil {
return nil, errors.New("failed to get server spec").Base(err)
}
v := core.MustFromContext(ctx)
c := &Client{
server: server,
policyManager: v.GetFeature(policy.ManagerType()).(policy.Manager),
}
return c, nil
}
// Process implements proxy.Outbound.Process.
func (c *Client) Process(ctx context.Context, link *transport.Link, dialer internet.Dialer) error {
outbounds := session.OutboundsFromContext(ctx)
ob := outbounds[len(outbounds)-1]
if !ob.Target.IsValid() {
return errors.New("target not specified.")
}
ob.Name = "socks"
ob.CanSpliceCopy = 2
// Destination of the inner request.
destination := ob.Target
// Outbound server.
server := c.server
dest := server.Destination
// Connection to the outbound server.
var conn stat.Connection
if err := retry.ExponentialBackoff(5, 100).On(func() error {
rawConn, err := dialer.Dial(ctx, dest)
if err != nil {
return err
}
conn = rawConnView on GitHub (pinned to 7d214f8b09)
When it happens
Trigger: Thrown at proxy/socks/client.go:53 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of XTLS/Xray-core@7d214f8b09 (2026-08-15).
Data as JSON: /api/errors/f98f07d1bd2cc9dc.
Report an issue: GitHub.