A VLESS link with security=tls carries its ECH config list in the ech
query parameter. The service dropped it on import, so the stored node,
the generated core config and the exported share link all lost it, and
the server editor dropped it again when a node was edited and saved.
Parse ech into the stored node, pass it to the core as the TLS
settings' echConfigList, and write it back to share links when the
node uses TLS, in the service and in the editor's codec. The service
reads ech from the raw query so that an unescaped "+" in the base64
list stays a "+" instead of becoming a space. The VLESS
encryption half of the original change landed in 3e374af9.
Closes#2093
Xray v26.10.31 rejects VLESS with encryption none and no TLS or REALITY on public addresses, so post-quantum encryption strings must reach the core. Parse, generate and export the vless encryption and pqv share-link parameters, and expose both in the server editor with translations for all locales.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
A Shadowsocks link with a stream cipher (rc4-md5, aes-128-cfb, aes-256-cfb,
chacha20-ietf) or with none/plain imported without complaint and failed at
core start with "unknown cipher method", so the user saw a broken core rather
than a refused node. xray-core dropped the stream ciphers in 2021 and never
took none or plain in the shadowsocks outbound; these are also the ciphers
ShadowsocksR providers hand out.
ParseSSURL now refuses them with LINK_UNSUPPORTED_CIPHER, which NewFromLink
passes through instead of calling the link malformed; subscriptions skip such
nodes with a warning as they skip other unparseable ones, and the Clash
importer goes through the same parser. The node form drops none and plain and
offers xchacha20-ietf-poly1305, which the core does accept. The six locales
carry the message, and the quick-start pages say which ciphers work.
- A page's late /touch response no longer writes the store after the page is
gone: useNodes marks itself disposed with its scope and apply() drops the
result, so leaving Subscriptions for Proxies while a request is in flight
cannot hand a batch action a stale member list.
- The dashboard's subscription card links go to the Subscriptions page, not
Proxies, which no longer lists subscriptions.
- Page shortcuts stay quiet while a menu is open (Escape dismissed the batch
menu and cleared the selection in one stroke) and treat checkboxes as
buttons, not text entry; the node checkboxes drop a keydown.stop that only
served the row activation that is gone.
- Submissions in flight are not started twice from the new Enter shortcuts:
GFWList update, subscription save, excluded domains, whitelist IPs.
- Choosing Documentation in the phone's app bar menu closes the menu.
- The Clash importer no longer writes allow_insecure into anytls and tuic
links (nothing reads it since 1c392550); the core's example configs drop the
stale key.
v2rayA dropped allowInsecure years ago: VMess, VLESS and Trojan links carrying it
are parsed and the flag ignored, and a self-signed server is reached by pinning
its certificate. The three native protocols added in May brought the switch back
in their own config, service objects and forms. It goes everywhere: the core's
dialers verify or pin (the proto field 5 is reserved), the service no longer
parses, stores or exports allow_insecure for them, the forms lose the switch,
the codec ignores the parameter, and the quick-start docs say so in six locales.
Certificate pinning stays as it was.
A VLESS or VMess link with type=raw — xray's new name for the tcp
transport — was rejected with "unexpected transport type: raw"
(discussion #1999). A vmess JSON whose port, aid or v is a number was
dropped as "not a JSON object"; v2rayN writes strings but most other
exporters write numbers, and one public subscription lost 152 of its
1625 nodes to it (#1957).
PostImport, PutPorts, PutDnsRules, PutRoutingA, PutGFWList,
DeleteGFWList, PutDomainsExcluded, PutTproxyWhiteIpGroups, PostOutbound
and PutOutbound wrote the store and regenerated the core outside the
mutation turn, so two of them could interleave core restarts with each
other or with a latency test. They take it like the rest.
ParseSSURL and ParseVmessURL sliced past the end of a link shorter than
its scheme prefix ("ss:", "vmess:x"), a panic reachable from a
subscription line.
The core has no ShadowsocksR outbound and the plugin that once served
one was removed in May, so every SSR node has been dead since. Instead
of keeping a protocol that cannot connect: an ssr:// link is refused at
import with "ShadowsocksR is not supported" and the Clash converter
skips ssr entries. A node stored by an earlier release still decodes so
it keeps its place in the list and its group ordinal; it shows as
"SSR (unsupported)", cannot be configured and can be deleted. Both
READMEs list the protocols the current core actually speaks. The GUI
side of the removal is in the GUI change that follows.
A custom latency test URL that http.NewRequest rejects made a spawned
goroutine dereference nil and exit the process; the URL is validated
before any goroutine starts and the request error is handled. A
Shadowsocks link whose plugin field has no ";" panicked the parser, and
from the automatic subscription update that goroutine was unrecovered;
the parser accepts it and each updater recovers and logs.
The DNS module took the last non-bootstrap upstream as the fallback
while the template emitted upstreams in rule order with deduplication,
so a catch-all rule anywhere but last, or one whose upstream was
deduplicated, was not the fallback. The template names the fallback in
a new default_upstream field and the module honours it.
PUT /routingA stored the rules without regenerating the running core.
It goes through ApplyCoreConfig like the other config writers, with
restore on failure. UpdateSubscription logged a failed core reload and
answered success; it returns the error. PATCH /subscription joins the
mutation turn.
Subscription fetching retried through a direct connection when the
selected proxy failed, leaking the subscription URL; it returns the
error. Subscription documents are capped at 32 MiB and downloaded
assets at 256 MiB. PUT /gfwList validates the downloaded file as a
geosite list before replacing the working one.
The login handler took its one-at-a-time semaphore before reading the
body, so a client sending headers and no body blocked every login; the
body is read first and the HTTP server has header and idle timeouts.
Share links: a VLESS or VMess link without a numeric port is rejected
at parse time instead of producing port 0; an SSR link with a password
that is not base64 is rejected instead of importing empty; the SIP003
path gets its leading slash prepended, not a trailing one appended.
The macOS system proxy quoted shell arguments with strconv.Quote,
which leaves $(...) live; values are single-quoted. The Windows system
proxy snapshot includes AutoConfigURL, which teardown deleted and never
restored. Latency test responses with a non-2xx status are closed. The
version response carries the docker flag the GUI's port hints read.
Commit 0baefc45 (2026-05-03) removed the plugin layer under
service/pkg/plugin and the code that started a plugin per node, but
left the HTTP and ShadowsocksR node types producing what that layer
consumed: a socks outbound to 127.0.0.1:<plugin port> plus a plugin
chain nothing reads. Every http/https proxy node and every SSR node
imported since then connected to a closed local port.
HTTP and HTTPS nodes now produce the core's native http outbound with
the credentials and, for https, TLS to the server name; they no longer
ask for a plugin port. The core has no ShadowsocksR outbound, so an SSR
node's configuration returns an "unsupported" error the latency test
and the automatic selection already understand; the node still parses,
displays and exports so nothing is lost from the store.
The shadowsocks userinfo, the vmess body and the SSR link trimmed a single "="
from their base64, so a value that needed two padding characters was exported
with one left over. A strict decoder rejects that, and a lenient one decodes
the stray character as data: editing such a shadowsocks node in the GUI turned
its password into "test\r..." because the escaped "=" reached the decoder.
Defaulting the port made an absent port legal, and with it a link that carries
no host at all: `socks5://` was accepted and stored as a node with an empty
server, where the previous port conversion had rejected it.
A Reality VLESS proxy carries reality-opts.spider-x and a TLS VMess proxy
carries client-fingerprint; both were dropped by the mapping, so the imported
node handshook with an empty spider path and the default fingerprint and the
provider's server could refuse it.
The GUI shows backend error text as is, so errors were never localized.
common.Coded wraps an error with a stable code and scalar parameters;
ResponseError adds "errorCode" and "params" next to the unchanged English
"message" when the chain carries one. Thirty-two user-facing errors are
coded (no server selected, core start failure, port occupied, malformed
link with protocol and detail, subscription fetch failure with host,
server/subscription not found with ids, bad request with the field,
credentials, session, admin, request in progress, GFW list missing,
invalid config, asset download, transparent setup, mux range, custom
inbound fields). logError now keeps the error chain instead of
flattening it. Messages, status codes and control flow are unchanged; the
two strings the GUI matches on stay as they are.
tools_test.go becomes an external test package so the common tests
compile again; its FillEmpty equality assertion, which never ran before,
is skipped with the reason.
Errors that reach the GUI were written for the log: "ResolveURL failed:
invalid parameters", "httpGetUsingSpecificClient: response is nil",
"LocateServerRaw: invalid TYPE", "bad request", "illegal base64 data at
input byte 18". Reword the messages that can reach a user so each names
the input that was rejected (link scheme, missing password, port, server
id, request field), states the expected form for malformed input, drops
Go function names, keeps the %w chain so errors.Is/As still work, and
never echoes passwords, tokens or full share links (hosts only).
Messages the GUI string-matches ("invalid config", "the last request is
being processed") are unchanged.
ParseSSURL read the userinfo re-percent-escaped through u.User.String()
and decoded only the URL-safe alphabet, so SIP002 links with a standard
alphabet failed and keys containing "/" were stored encoded; accept both
alphabets, padded or not, and the raw method:password form. ParseSocksURL
ran Atoi on the port before its 1080 default, rejecting socks5://host.
ParseVlessURL stored the id re-escaped, so non-UUID ids with spaces or
non-ASCII were hashed encoded and double-encoded on export. The VLESS
exporter dropped idleTimeout, healthCheckTimeout, permitWithoutStream and
initialWindowsSize for gRPC although the parser reads them. Tests cover
each case.
ParseTuicURL read the certificate pin and name verification only as
pinnedPeerCertSha256/verifyPeerCertByName while the GUI form and other
clients emit pinned_peer_cert_sha256/verify_peer_cert_by_name, so a pin
typed into the form was dropped. ParseTrojanURL read host only for the
trojan-go scheme although ConfigurationMC uses it as the WebSocket Host
header for plain trojan as well.
ImportSubscription redeclared err with := inside the block, so a failure
of AppendSubscriptions was assigned to the shadow and the function
returned nil.
ParseHttpURL ran strconv.Atoi on the port before the per-scheme default,
so a link without a port failed with "invalid parameters" and the
Port == 0 branches were unreachable. Parse the port only when present.
A proxy link never carries a path or query; one that does is a
subscription URL pasted into the server box. Reject it with a message
that says so instead of the bare parameter error.
A subscription that serves a Clash config went through the line parser,
which picked up a stray URL from the rules and produced a "successful"
subscription holding one bogus http node. Detect a YAML body with a
proxies list and map each proxy onto the share link v2rayA already parses
for its type: anytls, trojan, vless, vmess, ss (obfs and v2ray-plugin),
ssr, hysteria2, tuic, socks5 and http. Unsupported types are counted in
the log; a config with no usable proxy fails the import instead of
storing an empty subscription.
u.User.String() returns URL-encoded userinfo, causing the password to be
incorrectly stored when it contains special characters like '/'. For
example, a password of '/' would be stored as '%2F'.
Switch to u.User.Password() which returns the decoded password directly,
consistent with how juicity, hysteria2, http, and socks5 handle it.