Commit Graph

4075 Commits

Author SHA1 Message Date
Nethmina Yasas e95d17a7db feat(groups): assign host rules from client groups (#7064)
Host rules could only be given to clients one by one, so giving a set of customers their own endpoints meant editing every client. A client group can now carry host rules, chosen when the group is created, from its edit dialog or from a quick-assign action on the Groups page.

A subscription resolves a client's hosts in this order: the client's own host rules, then the host rules of its group, then the inbound's default pool. A group whose bound rules are all disabled or excluded from the requested format renders nothing for that inbound instead of falling back to the default pool. Binding a rule to a group narrows what its members get; other clients still see that rule in the default pool.

Group names are now matched case-insensitively. On upgrade, labels that differ only in case (VIP and vip) are merged into one group, the first by name order.

Adds POST /panel/api/clients/groups/:name/hosts and an optional hostGroupIds on group create and rename.
2026-11-25 15:51:43 +03:30
Aleksey Fedorov 4013219698 fix(settings): wait for the panel to answer before reloading after a restart (#7205)
After Restart Panel, and after a database import, the page slept a fixed 5 seconds and reloaded. When the panel took longer to come back, the reload reached a reverse proxy with nothing listening upstream and the browser showed its 502/504 page.

Keep the 5 second delay, then poll the address the page is about to open every 2 seconds until it answers below 500, and give up after 90 seconds so the page never hangs. A new port or protocol is probed with no-cors; an https page whose target is http would be blocked as mixed content, so it probes its own origin, which is the proxy that answers 502 while the panel is down.

Closes #7190
2026-11-25 15:38:34 +03:30
Hamed efb6c6d579 perf(traffic): skip unchanged client lifecycle writes (#7204)
A full inbound save ran the lifecycle UPDATE on client_traffics for every client of the inbound, even when quota, expiry, renewal settings and the enable flag already matched. On PostgreSQL each of those is a new row version and WAL, on every stream-settings edit of a large inbound.

Guard the same UPDATE with a NULL-safe IS DISTINCT FROM over the eight columns it assigns, so the database writes only a row that actually differs and still repairs one that drifted. The PostgreSQL CI job runs the lifecycle suite, including a row-lock check on a second connection.

Closes #7202
2026-11-25 15:23:19 +03:30
Бат-Орших 64ca67706f fix(sub): show the MTProto inbound's remark in the sub page Configs tab (#7206)
tg://proxy links carry no #remark on purpose, so the Configs tab of the subscription page had nothing to title an MTProto row with and fell back to "Link N" on the raw, JSON and Clash pages.

While the page data is built, record each MTProto link's remark and send it to the page as linkRemarks, aligned with links; the tab uses it when the link itself has no name. The link, the subscription bodies and the ?format=info JSON are unchanged.

Closes #7198
2026-11-25 15:11:44 +03:30
Hamed c12a4f72c7 perf(subscription): batch render settings per request (#7203)
Every raw, JSON and Clash subscription request read its eight presentation settings (host sort mode, datepicker, identity and info-node toggles, the expired and depleted templates, inclusive expiry and its timezone) with one query each.

Read them in one query per request preparation. Missing keys, stored empty strings, duplicate keys and malformed booleans resolve as the single-key getters did, and a failed batch falls back to those getters so a readable setting keeps its value.

Closes #7201
2026-11-25 15:01:54 +03:30
Hamed 8fb6418c77 perf(iplimit): stop scanning after the first limited client (#7200)
The IP-limit job asks every 10 seconds whether any client carries an IP limit. The probe was a COUNT with LIMIT 1, and the limit applies to the one-row aggregate, so the database still read the whole clients table on every run.

Ask with SELECT EXISTS instead, so the scan stops at the first client with limit_ip > 0. The predicate and the fail-to-false behaviour are unchanged; the probe test now also runs in the PostgreSQL scanner suite.

Closes #7199
2026-11-25 12:51:47 +03:30
Mahdi Fallahnejhad ee760de2c8 feat(clients): show a client's usage and change history in the editor (#7031)
The client editor gets a "Usage & change history" button: lifetime traffic
(every closed cycle plus the open one), usage per node since the last reset,
the past cycles, and a log of what changed on the client and from where.

A cycle is archived in one place, whenever a traffic reset or an auto-renewal
zeroes a client's counters. Both tables are bounded per client: the newest 100
cycles are kept and older ones fold into a single "earlier" row, so the
lifetime total does not change; the change log keeps the newest 200 rows and
is taken from the stored record before and after an operation (editor save,
bulk adjust, bulk enable/disable, bot setters, auto-renewal). A rename moves
the history to the new email.

The history belongs to the client. Nothing is archived on delete;
ReapSyncOrphansJob drops the history of emails no client holds, every five
minutes. It lists them outside the traffic writer by walking the email index
(about 10 ms on SQLite for 10k clients with 3M history rows) and enters the
writer only to delete.

Known limit: a client re-created under a deleted client's email before that
job runs keeps the old client's history. Edits through an API token are
logged with the source "panel".
2026-11-25 12:06:45 +03:30
Sanaei a36858f36c chore(ci): run the real-core tests in CI
The tests gated on XRAY_E2E_BINARY start the core pinned in go.mod as a
child process and drive its gRPC API: user add and remove, hot apply,
balancer overrides, the REALITY probe and the AmneziaWG relay. No job set
the variable, so they skipped in every run and a green CI had never touched
the core.

`make xray-e2e` builds that core from the module cache and runs every
package holding such a test; the new job fails when one of them still skips
for want of the binary. The reviewer and analyst context files said these
tests never run in CI and now name the job that does.
2026-11-25 11:02:24 +03:30
Sanaei de7ef54739 fix(tuic): keep a UDP association when the peer stops one response stream
In stream mode every UDP response travels on its own unidirectional stream.
A client that reads the packet by its declared size and then drops the
stream sends STOP_SENDING. When that arrived before the server's Close, or
while a large response was still being written, the write path returned an
error, the response reader exited and the whole association was released:
later packets on it were answered on the wrong transport or not at all.

A stop from the peer now ends that one packet only. Close reports it as an
untyped error, so the stream's own cancel cause is what is checked.

This is also the flake that turned main's CI red three times, in
TestAudit3UDPAssociationMustRecoverAfterBridgeReadFailure/stream and
TestAudit3FirstTransportReturnsPositiveEchoAfterOppositeModePacket/stream-first:
their helper cancels the read after each packet, and a loaded runner lost the
race between Write and Close. Sleeping 50 ms between the two reproduces both
failures on the old code every run and none with this change.

The recovery test also matched its log line by a tag reused across runs, so
any -count above 1 passed its wait on the previous run's line; the tag is
now unique.
2026-11-25 11:02:24 +03:30
Sanaei 6aefb14569 fix(xray): keep the config snapshot true after a runtime inbound change
The process snapshot is what a reconcile diffs the desired config against,
so it has to describe what the core is running. The local runtime added and
removed inbounds over gRPC without telling it:

- An inbound added at runtime was missing from the snapshot. The next
  reconcile saw it as new, hit "existing tag", and replaced the handler: the
  listener closed and every client on it was cut. On a WireGuard inbound all
  peers lost their tunnel for about 15 s, once, at the first device or
  client change after the inbound was created.
- An inbound removed at runtime stayed in the snapshot. Enabling it again
  through a path that only asks for a reconcile diffed as "no change", and
  the core never got it back.

The local runtime now reports both to the process, which swaps in an edited
copy of the snapshot. The wiring moved into XrayService.LocalRuntimeDeps so
the tests run the panel's own bridge against an in-process core and compare
handler identity before and after the reconcile.

User-level drift is left to the reconcile, which already settles it without
touching a session: a known WireGuard peer is updated in place, any other
user is re-added by credential, and a missing one is skipped.
2026-11-25 11:02:24 +03:30
Mr Cortex 05e8f17268 feat(dashboard): choose the time range of the overview charts (#7139)
Every overview chart gets the same range selector: 2m, 5m, 30m, 1h, 6h and 12h. The 2m default is the live trend the page already drew, one point per status poll, so nothing changes until a longer range is picked. A longer range is read from the server's stored rollups through the new GET /panel/api/server/overviewHistory/:bucket, which returns all eight overview series in one response, and is refreshed once per point, at most once a minute.

A metric the host cannot report stays empty in a ranged window instead of drawing zeros, a range change clears the chart rather than showing the old range under the new label, and avg/peak labels keep their number order in RTL locales.
2026-11-25 01:04:29 +03:30
PluS98 142a1ab28e feat(inbounds): replace a dead REALITY target with a tested spare (#6967)
The target scanner finds good REALITY targets, but nothing noticed when the one in use stopped working: every client of the inbound then failed until an admin edited it by hand.

A REALITY inbound can now keep spare targets. The panel checks each watched target every 10 minutes with the scanner's own probe, and after three failed checks in a row an inbound with automatic replacement on moves to the first spare that passes both that probe and a real REALITY connection through a throwaway Xray server and client. Only target and serverNames change, saved through UpdateInbound like an admin's edit; nothing changes when no spare passes, and node inbounds are neither checked nor switched from the master. Off until spares are added and automatic replacement is turned on.
2026-11-25 00:50:24 +03:30
Sepehr Radmard ac31455d99 feat(mcp): add a built-in MCP server at /panel/api/mcp (#6956)
AI agents (Claude, Cursor, VS Code) can manage the panel through a stateless streamable-HTTP MCP endpoint. Every tool re-enters the router with the caller's credentials, so authentication, token scopes, CSRF and runtime.Runtime dispatch apply exactly as for the REST API; a restricted token scope is refused, log text is fenced as untrusted data, and each tool call is written to the panel log.

The endpoint hands an API token's whole reach to the agent that holds it, so it is off by default: a panel answers 404 until the MCP server is enabled under Settings -> Security -> API Token (the mcpEnable setting).
2026-11-25 00:32:22 +03:30
Sanaei 3f2a2195a8 fix(wireguard): apply a peer change pushed to a node at once
The previous commit applied a device write at once, but only on the panel
that received the request. A node takes the same change as an inbound update
from its master, and that path still flagged the 30 s reconcile: a device
disabled on the master kept its tunnel on the node until the node's next tick.

ReconcileNow is the one place both paths go through. It applies when the core
runs and only flags when it is down, so a device write never starts a core the
tick has not started.

Measured with a real master and node panel (Xray 26.11.9, kernel WireGuard
clients): a device disabled on the master is cut on the node after 5 s instead
of 11-30 s, and a new one connects 7 s after it is added. No unit test reaches
it, a test process is never running; the scenario is the proof.
2026-11-25 00:13:21 +03:30
Sanaei c1cf280055 fix(wireguard): apply a device change at once
A device write only flagged the next reconcile, which runs every 30 s. Until
then a disabled or deleted device kept its tunnel, and a new one could not
connect: 12-24 s measured on a running panel, under 1 s now.

The handler applies the change through the same non-forced path the reconcile
uses, and falls back to the flag when that fails. No unit test reaches it: the
controller tests run without a core. The Docker timeline shows it (toggle a
device, read `wg show` on the client and the peer list of the core).
2026-11-24 23:52:09 +03:30
Sanaei eccf2e71bd fix(wireguard): change one peer without disturbing the others
A client's devices all carry the client's email, and the core removes a
WireGuard user by email, one peer at a time. The hot diff therefore removed
every peer of the email and added the survivors back, and a client that left
for good counted as a user whose sessions had to be dropped.

Measured on a running panel (Xray 26.11.9, kernel WireGuard clients):
- disabling or deleting one device cut the client's other devices for about
  15 s, the time a client waits before it handshakes again with a peer the
  server forgot;
- disabling or deleting a connected WireGuard client restarted the whole core
  with the default restartXrayOnClientDisable, taking every inbound down.

The diff is now per public key: a peer that stays is never touched, a changed
peer is updated in place, and a removed one goes through RemoveWireguardPeer,
which relabels that single peer and removes the label. A WireGuard session
ends with its peer, so its removal no longer asks for the restart.

After the change the other devices and other clients of the inbound keep
their tunnels with no gap, and the core keeps its pid.
2026-11-24 23:52:09 +03:30
Artem K f25cecfb40 feat(wireguard): support multiple devices per client (#7143)
A WireGuard client had one key pair and one tunnel address, so an operator who gave the same config to a phone and a laptop saw the two fight over the peer endpoint.

One client can now own extra devices, up to a per-client limit: each has its own keys and address, shares the client's quota, expiry and switch, and gets its own config, QR code and subscription. Devices become extra peers under the client's email, built by the same core-user map the other paths use, and a device change is applied to the running inbound in place instead of rebuilding it.

Nodes advertise a wg-devices capability; the master refuses a device for a node that would ignore it, before storing it and again when pushing the inbound.
2026-11-24 22:16:16 +03:30
17 3cb5bb7187 feat(wechat): add WeCom and webhook notifications (#7086)
Panel alerts and the scheduled status report could go to Telegram, Discord or email, but not to a WeCom group robot or a generic webhook.

Add a WeChat channel, off by default, with two modes: a WeCom group robot, or a webhook that receives a small signed-free JSON envelope with an optional bearer token. It carries the same events as the other channels (logins, CPU and memory, Xray crash, node and outbound state) and a scheduled text report. Delivery goes through the SSRF-guarded dialer, follows no redirects, and the URL and token are stored and redacted like the other notification secrets.
2026-11-24 21:54:39 +03:30
pcxzs d15b72a11a feat(tgbot): add Get one, a links header and setup guides to the screen bot (#6952)
A customer whose links ran past one Telegram caption could not turn the page, and one holding several configs was shown a client-card button the bot then ignored.

Customers can now page long screens and only admins see the card. "Get one" lists a config's links and opens the chosen one alone with its own QR code, naming VMess links by their remark; the links pages open with the config's expiry and remaining traffic; and setup guides for five platforms are reached from the customer's home. The new per-client callbacks pass the same ownership check as the existing link screens.
2026-11-24 21:39:42 +03:30
animesha3 6bc7e81c90 feat(clients): add per-subscription HWID device bans (#7133)
An operator could remove a device from a subscription, but it simply registered again on its next refresh; there was no way to keep one device out.

Add Block and Unblock to the device list. A banned device is refused on every subscription route whether or not the client has a device limit, does not hold a registration slot, and survives trimming and clearing the list. Unblocking needs a free slot, so registered devices never exceed the limit, and a banned device whose configs are replaced is told it is blocked.
2026-11-24 21:26:44 +03:30
animesha3 77719154f6 feat(sub): optionally replace configs rejected by HWID limits (#7106)
When a device is removed and the device limit lowered, its next subscription refresh gets an empty 404, and most apps keep the working nodes they downloaded earlier.

Add a setting, off by default: a refresh the device limit rejects, or one that arrives with no HWID, gets a normal response holding a single dead node in the format that was asked for, so an app that accepts the update replaces its saved nodes. The dead node comes from the same status-node builder the expired and depleted cases use, with no subscriber credentials and no local fallback.
2026-11-24 21:15:23 +03:30
Gleb Kochergin 6f162d03a1 feat(xhttp): configure a separate download endpoint and preserve it in subscriptions (#7187)
An operator who wanted XHTTP downloads to go through another endpoint, such as a relay or a CDN, had no field for it, and downloadSettings typed into the advanced JSON editor was dropped the next time the inbound was saved (#6307).

Add a separate-download switch to the inbound and outbound XHTTP forms, keep the download stream through save, share links, JSON and Clash output, and validate it before it is stored: transport, address, port, REALITY key and short id, and a uTLS fingerprint the core accepts. Saving an inbound re-applies its own session, sequence and padding rules to the download leg, since the listener checks the download request against them.
2026-11-24 21:04:55 +03:30
amirim f9e15a6b9b feat(sub): opt-in per-client rate limit for the subscription server (#6966)
A loop probing subscription ids, or one misbehaving app, could turn the subscription server into a database load generator, and there was nothing to cap it.

Add a setting, off by default, that limits how many subscription fetches one client address may make per minute (60 by default, 1 to 1000); requests over it get 429 with Retry-After. Static assets stay outside the guard. The client address comes from the same resolution the panel's login limiter uses, now shared in internal/util/clientip, so trustedProxyCIDRs decides it in one place for the panel and the subscription server.
2026-11-24 20:51:32 +03:30
Sanaei dd46ab8e8b fix(test): keep the network traffic test from starting a real IP lookup
The test added with #6972 built its ServerService with no public IP
state, so GetStatus started the background lookup against the real
IP-echo services and left it running after the test. Under the race
job's shuffle, a public IP test that ran next replaced
http.DefaultTransport while that goroutine was still reading it: DATA
RACE in TestPublicIPRefreshIsSingleFlightAndKeepsCachedReadsAvailable
(race on #6966, run 45442523620).

Build the service the way the container-scope test does, with a cached
address and no lookup due. A probe on GetStatus showed the lookup
starting before and not after.
2026-11-24 20:38:38 +03:30
Sanaei 5b34ae6309 fix(test): end the silent node's reset delivery with its test
The silent-node test returns after the one-second inline wait, while
its delivery goroutine keeps the node's delivery lock until the push
context times out three seconds later. The lock is keyed by node id,
and every test's fresh database starts its nodes at id 1, so under
-shuffle=on a test that ran next and expected a reset to arrive at once
waited behind that lock and failed (go-test on #6966, run 45439392969;
reproduced with -shuffle=1 on the two tests).

The stalled runtime is now released when the test ends, and the
cleanup waits for the delivery to let go of the lock.
2026-11-24 20:23:28 +03:30
Bazil Bazikov e65b5cbd65 feat(nodes): show per-client live speed for clients served by nodes (#7100)
The clients page showed live upload/download speed only for clients the master's own Xray or TUIC served; a client connected through a managed node showed none, although the master already polls that node's counters.

Derive per-client deltas from each node snapshot in the traffic sync job and broadcast them as their own speed source, so they add to local speed instead of overwriting it. A client's diverging per-inbound counter copies fold to the per-field max, the rule the traffic merge applies (#5274).
2026-11-24 20:07:14 +03:30
Hamed e0c01942ec feat(monitoring): allow selecting the network interface for traffic statistics (#6972)
The panel's network totals and speed add up every interface that is not on a fixed list of virtual names. On hosts where a second interface carries the same traffic, such as an SR-IOV function beside eth0, the dashboard and the bot reports counted it twice (#6906).

Add a traffic mode to General settings: legacy keeps today's sum, auto follows the default-route interface, manual names one. An interface that is not available shows as unavailable in the dashboard and in the Telegram and Discord reports instead of 0 B, and a saved manual choice is only re-checked when it changes.
2026-11-24 19:55:55 +03:30
Hamed 447b2d036a feat(clients): append external links in bulk adjustments (#6948)
The Links tab of the client editor was the only way to give a client external share links or subscriptions, and it replaces the whole list, one client at a time (#6816).

Add an "Append external links" tab to Bulk Adjust: the same links are appended to every selected client, existing ones stay, and a link a client already has is skipped. The request is exclusive with the other adjustments. clientRecordsByEmail no longer accumulates WHERE clauses across chunks, which reported clients past the first 400 as not found. Share links are validated with the now-async link parser.
2026-11-24 17:51:49 +03:30
Hamed e409ed7244 feat(nodes): add remote Xray and panel restart actions (#6970)
An operator running a master with sub-nodes could probe or update a node from the Nodes page but had to log in to the node, or SSH into it, to restart Xray or the panel (#6937).

Add Restart Xray and Restart panel to the node actions, behind a confirmation. Xray restarts through the node runtime; the panel restart is a new Remote call that the node accepts with node-admin credentials, the authority that already covers updatePanel. Both are refused for a disabled node.
2026-11-24 16:55:08 +03:30
Hamed a07ed97aa1 feat(scripts): allow a random or custom Web Base Path from the menu (#6994)
Option 8 of the x-ui menu could only generate a random web base path, and it reported success and restarted the panel even when the write had failed.

Offer a random or a typed path, validate it, show it before applying, and restart only after the CLI reports success and a second read returns the same path. The confirmation prompt uses no bash 4 expansion, so the menu test also runs under bash 3.2.
2026-11-24 16:43:56 +03:30
dkgks 5d76c0a1c6 fix(traffic): preserve client usage on scheduled inbound resets (#7136)
A client attached to several inbounds shares one usage counter. When any one of those inbounds reached its scheduled reset, the job zeroed the client's whole usage, across inbounds and nodes, although the client's own cycle resets on another day (#7135).

Add a per-inbound "Keep client usage" switch, off by default: with it on, the scheduled reset clears only the inbound's own counters. The setting is pushed to nodes and read back from their snapshots. A node that does not advertise the capability is refused when the switch is saved, not later at push time, so an older node never ends up with a config it cannot apply.
2026-11-24 16:32:13 +03:30
Mikail Katsiev ccdda6f728 docs(config): add a routing guide for Happ, Clash/Mihomo and Incy (#7183)
Explain, in English and Russian, how the subscription settings feed routing profiles to Happ, Clash/Mihomo and Incy: inline values and remote HTTPS sources, how the panel caches and validates a remote file, the size limits, and what each client receives.

The guide states the limits and checks the code applies: the 8 KiB Happ value after Base64 encoding, remote Clash files validated on their own, Incy URLs handed to the app without being fetched, and the log line each source writes.
2026-11-24 16:10:48 +03:30
Nikan Zeyaei e7bef4813d feat(outbound): import AmneziaWG vpn:// links and subscriptions as outbounds (#7097)
An AmneziaWG outbound could only be set up by copying keys and obfuscation values from a .conf into the form by hand (#7056).

Parse vpn:// links, from another panel or an AmneziaVPN app key, in the Go link parser and in the outbound form, and keep AmneziaWG outbounds that arrive through an outbound subscription running. Inflation is capped per key and per subscription, absent S3/S4 stay 0, a ranged keepalive keeps its lower bound, and the identity includes the client key so two clients of one server do not collide.
2026-11-24 16:07:37 +03:30
ridersaying 2bfcda96f4 feat(frontend): add a follow-system theme mode (#7026)
The theme had three settings, light, dark and ultra dark, so anyone whose desktop switches appearance on a schedule had to change the panel by hand.

Add a System step to the theme button on the sidebar, the login page, the command palette and the subscription page. In that mode the panel follows the OS light/dark setting and repaints when it changes, without a reload. The stored preference moves to theme-mode; the legacy dark-mode boolean is still read on first load and still written, so existing users keep their theme.
2026-11-24 15:44:25 +03:30
Justin 809b7c5501 feat(sub): allow switching the inline QR code format on the subscription page (#7157)
The large QR card on the subscription page always encoded the raw link, so a Clash/Mihomo or JSON user who scanned it got a profile their client could not parse.

Add a SUB / JSON / CLASH switch under the card for the enabled formats. The card starts on the format of the route the page was opened through: the server puts subFormat into the page data, so the /mihomo/ and /clash-legacy/ aliases start on CLASH as well.
2026-11-24 15:06:56 +03:30
Hamed 4b36cc1635 perf(traffic): find globally depleted clients with one set query (#7021)
On a node that a master pushes cross-panel usage to, the 5-second traffic job looked up client_global_traffics once per enabled client to decide who to disable, and its freshness probe counted every fresh row (#7008).

The scan of all enabled clients now builds the over-quota ids once and matches them with IN, and the probe is an EXISTS that stops at the first fresh row. Who gets disabled is unchanged: same 24-hour window, one master must reach the quota, masters are never summed. The email-scoped callers keep the correlated predicate. The Postgres job runs the four semantic tests.
2026-11-24 14:52:53 +03:30
Eugene Stsefankou 3a27c1c169 feat(sub): serve Clash/Mihomo YAML to the Rabbit-Hole client (#7063)
RabbitHole runs a Mihomo core and sends a Rabbit-Hole/ User-Agent. The default matcher only knew clash and mihomo, so with automatic format detection on it received the raw link list.

Add rabbit-hole to the default Clash/Mihomo User-Agent regex. A panel with its own regex is unaffected. The client's User-Agent joins the auto-serve test table, and the settings placeholder and subscription docs show the new default.
2026-11-24 14:40:23 +03:30
Nikan Zeyaei b39ac90f1e feat(settings): configurable public IP refresh, IPv6 detection and override (#7189)
Since 3.11.0 the panel asks outside IP-echo services for its public address every five minutes, and on a server with no IPv6 it retried the IPv6 services forever. Operators with static addresses had no way to stop it (#7176).

Add four General settings: the refresh interval (0 keeps the first answer), a switch for IPv6 detection, and a fixed IPv4 and IPv6 address that replace the lookup. The defaults keep today's behaviour. Clearing an override forgets the earlier success, so the next lookup is not timed from before the pin.
2026-11-24 14:29:32 +03:30
Mohammad 5b71e534d2 feat(clients): let the admin choose which table columns to show (#7080)
On a laptop-width screen the Clients table is wider than the window, and columns such as Speed or Attached inbounds take width even when they show nothing useful.

Add a Columns menu beside Filter that hides any column except the client itself. The choice is kept in localStorage, the menu stays open while several columns are ticked, and the table sizes to its visible columns instead of a fixed 1200px.
2026-11-24 14:17:28 +03:30
mjbe71 84d04c2d92 feat(xray): warn when a Dialer Proxy tag matches no outbound (#7099)
An outbound whose Dialer Proxy names a tag that no longer exists was shown like any other choice, and Xray then failed the dial with no outbound handler for it.

Show a warning under the field in the outbound form when the tag is not among the available outbounds. The host form stays silent: its Dialer Proxy resolves inside the subscriber's client config, so the server's outbound list cannot judge it.
2026-11-24 13:59:28 +03:30
Mohammad 9d6b79c821 feat(clients): tint rows and cards of depleting and ended clients (#7084)
An operator scanning a long client list for renewals had only a small tag in one column to go by.

Tint the table row and the mobile card amber when the client is about to run out of time or traffic and red once it has, using the theme's warning and error tokens so all three themes follow. A selected row keeps its selection colour.
2026-11-24 13:48:05 +03:30
Sanaei 811701cdf4 fix(ci): stop actionlint failing on the review workflow's allow_fork_prs
The shell-lint job runs actionlint v1.7.12, the newest release, whose
bundled metadata for claude-code-action predates v1.0.288 and does not
know the allow_fork_prs input efee93ef added. The job has been red on
every pull request since, although the input is valid.

Ignore that one message for that one workflow. Any other unknown input
is still reported: renaming the key locally makes the job fail again.
2026-11-24 13:31:03 +03:30
Nikita Akhnin da8008fce8 docs(readme): add 3x-ui-exporter to Community Tools (#7066)
List the community Prometheus exporter and Grafana dashboard for 3x-ui in the Community Tools section of the English README and the six translations, beside the Terraform provider and the Android manager.
2026-11-24 13:30:11 +03:30
Mohammad bfb3e2f52f fix(clients): keep the mobile search/filter bar in view while scrolling (#7085)
With 100 or 200 clients per page the mobile card list is several screens long, and the search box, filter button and sort selector scrolled away with it.

Make the mobile filter bar sticky just below the fixed drawer handle, with the card background so cards do not show through and the same padding stuck or not so the list never jumps.
2026-11-24 13:29:47 +03:30
Sanaei efee93efc4 fix(ci): let the PR review run on pull requests from forks
claude-code-action v1.0.288 changed allow_fork_prs to default to false,
and the workflow follows the floating v1 tag. Every review of a fork pull
request has been skipped since: the action step ends without writing a
review and the post job fails with nothing posted on the pull request.

Opt back in. The workflow already reads the fork's code only from
pr-head/ at a pinned SHA, with a read-only token and no command that runs
code from the checkout.
2026-11-24 09:36:36 +03:30
Sanaei f0de77f20d chore(deps): update gorilla/websocket for GO-2026-6278
govulncheck reports GO-2026-6278 for github.com/gorilla/websocket v1.5.3:
the client's frame mask key came from a cryptographically weak PRNG. The
panel reaches it through the Discord gateway client, the panel WebSocket
and the release lookup. v1.5.3 is the newest tag, so this moves to the
untagged upstream commit the advisory names as fixed,
v1.5.4-0.20240701034025-d67f41855da4.

No module xray-core pins to an untagged commit moved, and no code change
was needed.
2026-11-24 09:04:09 +03:30
TingChieh 3f7e77e6f8 fix(sub): give Shadowrocket a base64url userinfo for Shadowsocks 2022 links (#7148)
For a 2022-blake3 method the raw subscription percent-encodes the
userinfo, as SIP022 requires. Shadowrocket copies the %2B, %2F and %3D
escapes into the node password as they are, so authentication fails for
every key that contains +, / or =.

A request whose User-Agent is Shadowrocket now gets the userinfo as
base64url, the form the other Shadowsocks methods already use and that
Shadowrocket reads. Every other client keeps the SIP022 form.

Closes #7146
2026-11-24 03:51:32 +03:30
mjbe71 7db85005b4 fix(sub): let balancers select inbounds that are hidden from the subscription (#7098)
An inbound marked Exclude from subscriptions was skipped before its
configs were built, and a balancer only reads the entries that reach the
output. A hidden inbound could therefore never be a balancer member,
although the balancer form lists it, and a balancer of only hidden
inbounds never reached the subscriber.

A hidden inbound that an enabled balancer selects is now rendered into a
list that never reaches the output, and balancers draw members from both
lists. It still gets no document of its own, its clients still count in
the usage header, and rendering it spends neither the response budget nor
the first-link remark tokens.

An inbound that is already hidden and already selected in a balancer
appears inside that balancer after the upgrade.
2026-11-24 03:48:41 +03:30
SepehrSDQ d04dbbe834 fix(outbound): let the probe resolve with the panel dns config (#7144)
The HTTP-mode outbound test builds a throwaway Xray instance whose
config carried no dns section, so an outbound whose server name only the
panel's configured resolvers know (a split-DNS name, a hosts entry)
failed the test with a lookup against the OS resolver, while the same
outbound worked through the running core.

The test endpoints now pass the stored template's dns section to the
probe instance. Its tag, which names routing the probe config does not
have, and its script are left out; every resolution setting rides along.

Fixes #7131
2026-11-24 03:48:17 +03:30
二次元糕手 0444c1f4f7 fix(outbounds): enforce tagPrefix on refresh and deduplicate outbound tags (#7111)
Two outbound subscriptions with overlapping tag prefixes, or a template
outbound with the same tag, put duplicate tags into the generated config
and Xray refused to start with "existing tag found". A changed prefix
also never took effect: every refresh reused the stored tags.

A refresh now reuses a stored tag only when it carries the current
prefix, and an edit of the prefix rewrites the stored tags at once. Tags
are disambiguated with a -N suffix against the template and the other
subscriptions when they are stored, and again when the config is built,
so the panel lists the same tags the core runs.

Routing rules and balancers that name a tag by its old prefix stop
matching after the prefix changes.

Fixes #7110
2026-11-24 03:33:44 +03:30