XTLS/Xray-core · error
Shadowsocks server address is not set.
Error message
Shadowsocks server address is not set.
What it means
When the outbound's single server uses a Shadowsocks-2022 cipher (from shadowaead_2022.List), the client config requires a destination address. This check fires when the chosen server's 'address' field is nil before building the 2022 ClientConfig.
Source
Thrown at infra/conf/shadowsocks.go:221
{
Address: v.Address,
Port: v.Port,
Level: v.Level,
Email: v.Email,
Cipher: v.Cipher,
Password: v.Password,
},
}
}
if len(v.Servers) != 1 {
return nil, errors.New(`Shadowsocks settings: "servers" should have one and only one member. Multiple endpoints in "servers" should use multiple Shadowsocks outbounds and routing balancer instead`)
}
if len(v.Servers) == 1 {
server := v.Servers[0]
if C.Contains(shadowaead_2022.List, server.Cipher) {
if server.Address == nil {
return nil, errors.New("Shadowsocks server address is not set.")
}
if server.Port == 0 {
return nil, errors.New("Invalid Shadowsocks port.")
}
if server.Password == "" {
return nil, errors.New("Shadowsocks password is not specified.")
}
config := new(shadowsocks_2022.ClientConfig)
config.Address = server.Address.Build()
config.Port = uint32(server.Port)
config.Method = server.Cipher
config.Key = server.Password
return config, nil
}
}
config := new(shadowsocks.ClientConfig)View on GitHub (pinned to 7d214f8b09)
Solutions
- Add the 'address' field (IP or domain) to the servers entry.
- Verify templated variables for address are non-empty at render time.
- Use the field name 'address', not 'server'/'host'.
Example fix
// before
{"method": "2022-blake3-aes-256-gcm", "port": 443, "password": "..."}
// after
{"address": "example.com", "method": "2022-blake3-aes-256-gcm", "port": 443, "password": "..."} Defensive patterns
Strategy: validation
Validate before calling
func valid2022Server(s map[string]any) bool {
_, hasAddr := s["address"]
return hasAddr
} Prevention
- Check templated address variables resolve non-empty before deploy
When it happens
Trigger: A Shadowsocks outbound with a 2022 method (e.g. 2022-blake3-aes-256-gcm) where the servers[0] entry omits 'address': {"port": 443, "method": "2022-blake3-aes-256-gcm", "password": "..."}.
Common situations: Copy-paste from a classic example and deleting address; templating that injects the server host from an unset variable; domain field named 'server' instead of 'address'.
Related errors
- invalid redirect address: {}
- shadowsocks 2022 (relay): all users must have relay address
- Invalid Shadowsocks port.
- Shadowsocks 2022 accept no multi servers
- VLESS vnext: "address" is not set
AI-assisted analysis of XTLS/Xray-core@7d214f8b09 (2026-08-15).
Data as JSON: /api/errors/66cae7d4a4abf6ab.
Report an issue: GitHub.