Client balancer (Xray JSON)
The client balancer gives users one entry in the subscription that always works well. When one of the hosts gets weak or goes down, there is nothing to reconfigure: the client measures the latency of every host and keeps traffic on the two best ones. The panel assembles this config automatically, nothing changes on the nodes, and the original hosts are not deleted: they keep working. While the balancer lives they are hidden from the subscription, so the extra list never gets in the user’s way. Removing the balancer puts the entries back, so you can safely try it on a live panel.
The entry lives in the script menu: 4. Node extensions → Client balancer.
How it works
Section titled “How it works”The subscription shows one entry with the balancer name, and it has no address of its own: the client connects straight to the hosts inside the balancer.
-
Open 4. Node extensions and pick
Client balancer:Node Extensions 1.Selfsteal node template disguise the node as a regular website 2.Node Plugins extra features for the node 3.SSH access to remote machines saved servers and running commands on them 4.Server routing Russian domains through the bridge to the exit server, the rest directly 5.Client balancer one subscription entry instead of a host list 0.Exit Select action (0-5):5
-
No balancers yet, create the first one:
Client balancer Details in the wiki: https://wiki.egam.es/configuration/client-balancer/ No balancers configured 1.Create a balancer 0.Exit Select action (0-1):1
-
Pick who will use the balancer. The examples below follow Xray JSON, the Mihomo variant is described in the subsection later:
Who will use the balancer? 1.Xray JSON v2rayN, Happ and other full Xray config clients 2.Mihomo Clash Meta, Stash and the like: an auto-picking group in the subscription 0.Exit Select action (0-2):1
-
Pick the preset. The examples below follow “Always the fastest”:
How should the client pick a host? 1.Always the fastest the client measures latency and keeps traffic on the two best hosts 2.Main with backup traffic uses the main hosts, the first backup takes over when they are unreachable 0.Exit Select action (0-2):1
-
Pick the main hosts. Hosts of any inbound and profile fit, hidden entries, server-routing bridges and hosts with their own Xray JSON template (a CDN entry, for example) included: the list marks them, and the copy in the config keeps its own transport, keys and host settings. Numbers are entered comma separated:
Main hosts: the pick order stays in the client config; hosts of any inbound fit: hidden, bridge and Xray JSON template ones 1.Germany (de-1.example.com) — Germany / VLESS 2.Estonia (ee-1.example.com) — Estonia / VLESS 3.RU→EU bridge (ru-1.example.com) — RU entry / VLESS [bridge] 4.CDN entry (cdn-1.example.com) — Germany / VLESS XHTTP [hidden, template] Host numbers, comma separated (1-4):1,2
-
Enter the name. This is what users see in their subscription, Enter picks “Auto”:
Name in the subscription (Enter picks Auto):Germany+Estonia Creating the Xray JSON subscription template: CB balancer Template created Hiding a copy of host Germany... Copy hidden: Germany Hiding a copy of host Estonia... Copy hidden: Estonia Writing the balancer config into the template... Config written Creating the wrapper host Germany+Estonia... Wrapper host ready Hiding the original hosts from the subscription... Original hosts hidden: 2. They return to the subscription once the balancer is removed Done: subscriptions of type Xray JSON now show host Germany+Estonia with 2 main hosts inside Regular subscriptions and Xray Checker never see it, that is by design
The config builds on your Default template: routing rules, DNS and local inbounds are carried over from the panel, and the default rule gives way to the balancer. When the Default carries custom rules, the wizard prints how many of them were carried over.
A balancer for Mihomo
Section titled “A balancer for Mihomo”With Mihomo things are simpler: hosts from any inbound qualify, and the pool is the visible hosts themselves. The wizard adds a ready group into the default Mihomo template, and it appears in the subscription next to the plain host list. The user switches to it once in the client:
Who will use the balancer? 1.Xray JSON v2rayN, Happ and other full Xray config clients 2.Mihomo Clash Meta, Stash and the like: an auto-picking group in the subscription 0.Exit Select action (0-2):2 How should the client pick a host? 1.Always the fastest the client measures latency and keeps traffic on the two best hosts 2.Main with backup traffic uses the main hosts, the first backup takes over when they are unreachable 0.Exit Select action (0-2):1 Main hosts: the selection order is kept in the client config 1.Germany (de-1.example.com) — Germany / VLESS 2.Estonia (ee-1.example.com) — Estonia / VLESS Host numbers, comma separated (1-2):1,2 Name in the subscription (Enter picks Auto):My Mihomo Adding group My Mihomo to the Mihomo template... Done: Mihomo subscriptions now show group My Mihomo The client measures latency itself and keeps traffic on the best host of the group
The presets turn into native Mihomo groups: “Always the fastest” becomes url-test, “Main with backup” becomes fallback with your host order. The group re-probes its hosts every 30 seconds. Adding and removing hosts rebuilds the group, teardown removes it from the template and touches nothing else.
Presets
Section titled “Presets”One pool, every host equal. The balancer spreads connections across the two best hosts by measured latency (leastLoad, expected: 2). Fit for a set of similar servers where any of them is a fine choice.
Two groups. Traffic goes through the main hosts; when all of them are unreachable, the client falls back to the first backup host. Fit for a main line abroad plus a spare entry on another territory: the backup sits idle until it is actually needed.
Xray balancers cannot chain into each other (fallbackTag names an outbound), so the fallback is the first host of the backup group. Reorder by removing and re-adding hosts when a different one should be first.
Picking every host as a main is not allowed: the wizard keeps at least one host for the reserve and warns when fewer than two eligible hosts leave no room for two groups.
The client re-probes the pool every 30 seconds, so switching to the reserve fits into one probe. Connections that were already riding the dead host live until their own timeout.
Only copies and wrappers of other balancers stay out of the list: the module hides them on its own. Hosts with a personal VLESS Route (bridges) can be picked freely: the copy keeps the route, and the connection goes through the bridge entry as usual. Disabled hosts are never offered, hidden ones are marked in the list.
Several balancers
Section titled “Several balancers”There can be as many balancers as you need, each with its own host list, its own Xray JSON template and its own entry in the subscription. Five nodes of Germany gather into a balancer “Germany”, five nodes of Finland into another “Finland”, and the user sees both entries under different names.
Tearing one down never touches the other, and copies and wrappers of neighbouring balancers never appear in the host picker, so an accidental duplicate record is impossible.
The module menu lists every balancer at once with its mode. Pick a number and its own menu opens with a live status and five actions:
Client balancer Details in the wiki: https://wiki.egam.es/configuration/client-balancer/ Balancers configured: 2 1.Germany • mode: fastest of the pool 2.Finland • mode: main with backup 3.Create a balancer 0.Exit Select action (0-3):
The balancer and server routing
Section titled “The balancer and server routing”The modules work together because they answer different questions: the balancer on the client picks the entry point, server routing after the entry decides where traffic goes. Russian domains travel through the bridge to the exit server, everything else leaves the entry node directly.
Every hidden copy in the config points at its own node and its rules keep working as configured, so a pool may mix anything: nodes with and without routing, direct entries and bridges, different transports. No shared profile is created, the rules of one node are never carried anywhere, and nodes are never switched. A bridge host (a VLESS Route record) joins the pool with its route intact: the client connects to the bridge entry, and traffic then travels through the exit server as usual.
Managing
Section titled “Managing”The per-balancer menu shows a live status and five actions:
Balancer Germany+Estonia Details in the wiki: https://wiki.egam.es/configuration/client-balancer/ hosts: 2 main mode: fastest of the pool wrapper host is in place Xray JSON template is in place 1.Show hosts live list from the panel with a check that nothing is lost 2.Add hosts a hidden copy of each host joins the config 3.Remove a host the hidden copy is deleted, the original stays as is 4.Rename clients will see the new name in the subscription 5.Remove the balancer wrapper, hidden copies and template are deleted, original hosts stay 0.Exit Select action (0-5):
Show hosts checks the stored list against the panel:
Main: Germany (de-1.example.com) Estonia (ee-1.example.com) Every host is in place
Add hosts offers every eligible host of the panel from any inbound. Copies and originals of this balancer never join the list, so a duplicate is impossible:
Hosts to add: the selection order is kept in the client config. Hosts of any inbound fit, hidden and bridge ones too 1.Frankfurt (de-3.example.com) — Germany / VLESS Host numbers, comma separated (1-1):1 Hiding a copy of host Frankfurt... Copy hidden: Frankfurt Hiding the original hosts from the subscription... Original hosts hidden: 1. They return to the subscription once the balancer is removed Refreshing the template config... Writing the balancer config into the template... Config written Hosts added: 1
Remove a host deletes the hidden copy and rebuilds the config. The last backup can go, the last main hosts cannot:
Which host to remove? 1.Germany (de-1.example.com) — Main 2.Estonia (ee-1.example.com) — Main Select action (0-2):1 At least 2 main hosts must stay, tear the whole balancer down instead Host removed, config refreshed
Rename changes the entry name in the subscription:
New name (Enter keeps Germany+Estonia):Europe Host renamed to Europe
Remove the balancer puts everything back: the wrapper, all hidden copies and the template are deleted, the original hosts return to the subscription:
[?] Remove balancer Europe? The wrapper host, hidden copies and the template will be deleted, the original hosts stay (y/n): y Tearing down balancer Europe... Restoring the visibility of the original hosts... Original hosts are back in the subscription: 2 Balancer removed, original hosts untouched
