XTLS/Xray-core · error
unknown method
Error message
unknown method %s
What it means
Shadowsocks-2022 outbound constructor rejects the method because it is neither in the shadowaead-2022 list nor otherwise recognized; the method string is printed so the user can switch to a supported 2022 cipher.
Solutions
- Use a supported 2022 method name (e.g. 2022-blake3-aes-256-gcm)
- Move legacy shadowsocks ciphers to the non-2022 shadowsocks outbound
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at proxy/shadowsocks_2022/outbound.go:55 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/a14527eb649ff284.
Report an issue: GitHub.
Appendix: source
Thrown at proxy/shadowsocks_2022/outbound.go:55
o := &Outbound{
ctx: ctx,
server: net.Destination{
Address: config.Address.AsAddress(),
Port: net.Port(config.Port),
Network: net.Network_TCP,
},
}
if C.Contains(shadowaead_2022.List, config.Method) {
if config.Key == "" {
return nil, errors.New("missing psk")
}
method, err := shadowaead_2022.NewWithPassword(config.Method, config.Key, nil)
if err != nil {
return nil, errors.New("create method").Base(err)
}
o.method = method
} else {
return nil, errors.New("unknown method ", config.Method)
}
return o, nil
}
func (o *Outbound) Process(ctx context.Context, link *transport.Link, dialer internet.Dialer) error {
var inboundConn net.Conn
inbound := session.InboundFromContext(ctx)
if inbound != nil {
inboundConn = inbound.Conn
}
outbounds := session.OutboundsFromContext(ctx)
ob := outbounds[len(outbounds)-1]
if !ob.Target.IsValid() {
return errors.New("target not specified")
}
ob.Name = "shadowsocks-2022"
ob.CanSpliceCopy = 3View on GitHub (pinned to 7d214f8b09)