3x-ui/internal/web/service
iYuan 2a7342baa9
feat: add inbound share address strategy (#5162)
* feat: add inbound share address strategy

Allow node-managed inbounds to choose whether exported share links use the node address, routable listen address, or a custom endpoint. Preserve locally configured share address fields during remote node traffic sync.

Refs #5161

Refs #4891

* fix: preserve inbound share address settings

Forward share address fields to remote nodes, keep existing values when older update payloads omit them, align localhost handling between frontend and subscriptions, and preserve share address settings when cloning inbounds.

* fix: keep share address strategy out of subscriptions

Limit the new share address strategy to direct exported share links and QR codes. Restore subscription address resolution to the existing panel-owned behavior and update the UI help text accordingly.

* fix: address share address review feedback

* fix: validate custom share address

* fix

---------

Co-authored-by: Sanaei <ho3ein.sanaei@gmail.com>
2026-06-11 20:24:15 +02:00
..
integration feat: replace panel proxy URL with outbound-based egress bridge 2026-06-10 23:52:20 +02:00
outbound refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
panel refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
tgbot feat: replace panel proxy URL with outbound-based egress bridge 2026-06-10 23:52:20 +02:00
api_scale_postgres_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
bulk_clients_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
bulk_traffic_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
client.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
client_bulk.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
client_crud.go feat(node-sync): push global client usage to nodes for display and local enforcement 2026-06-11 15:14:08 +02:00
client_email_validation_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
client_flow_isolation_test.go fix: enable XTLS vision flow for VLESS+XHTTP+vlessenc in UI and share links (#5157) (#5185) 2026-06-11 12:04:02 +02:00
client_group_node_sync_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
client_groups.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
client_inbound_apply.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
client_link.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
client_locks.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
client_lookup.go feat(node-sync): push global client usage to nodes for display and local enforcement 2026-06-11 15:14:08 +02:00
client_paging.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
client_sync_multiprotocol_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
client_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
client_traffic.go feat(node-sync): push global client usage to nodes for display and local enforcement 2026-06-11 15:14:08 +02:00
config.json feat: apply inbound/outbound/routing changes live via Xray gRPC API 2026-06-10 23:01:33 +02:00
fallback.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
global_traffic_test.go feat(node-sync): push global client usage to nodes for display and local enforcement 2026-06-11 15:14:08 +02:00
inbound.go feat: add inbound share address strategy (#5162) 2026-06-11 20:24:15 +02:00
inbound_client_ips.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
inbound_client_ips_merge_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
inbound_client_traffic_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
inbound_clients.go fix(ui): classify ended clients as depleted, not disabled, on inbounds page 2026-06-11 14:05:02 +02:00
inbound_disable.go feat(node-sync): push global client usage to nodes for display and local enforcement 2026-06-11 15:14:08 +02:00
inbound_migration.go feat: add inbound share address strategy (#5162) 2026-06-11 20:24:15 +02:00
inbound_migration_test.go feat: add inbound share address strategy (#5162) 2026-06-11 20:24:15 +02:00
inbound_node.go feat: add inbound share address strategy (#5162) 2026-06-11 20:24:15 +02:00
inbound_protocol.go fix: enable XTLS vision flow for VLESS+XHTTP+vlessenc in UI and share links (#5157) (#5185) 2026-06-11 12:04:02 +02:00
inbound_protocol_test.go fix: enable XTLS vision flow for VLESS+XHTTP+vlessenc in UI and share links (#5157) (#5185) 2026-06-11 12:04:02 +02:00
inbound_sublink.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
inbound_traffic.go feat(online): use xray online-stats API for onlines and access-log-free IP limit 2026-06-11 19:42:03 +02:00
inbound_traffic_global.go feat(node-sync): push global client usage to nodes for display and local enforcement 2026-06-11 15:14:08 +02:00
inbound_update_tag_test.go feat: add inbound share address strategy (#5162) 2026-06-11 20:24:15 +02:00
inbound_util.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
metric_history.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
node.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
node_client_traffic_sum_test.go fix(node-sync): keep shared client traffic row when email still lives on other inbounds 2026-06-11 14:28:09 +02:00
node_dirty_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
node_origin_guid_test.go feat: add inbound share address strategy (#5162) 2026-06-11 20:24:15 +02:00
node_tag_sync_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
node_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
node_tree.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
node_tree_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
outbound_subscription.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
outbound_subscription_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
port_conflict.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
port_conflict_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
server.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
server_vlessenc_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
setting.go feat(online): use xray online-stats API for onlines and access-log-free IP limit 2026-06-11 19:42:03 +02:00
setting_security_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
sub_uri_base_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
sync_scale_postgres_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
traffic_writer.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
traffic_writer_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
url_safety.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
xray.go feat(online): use xray online-stats API for onlines and access-log-free IP limit 2026-06-11 19:42:03 +02:00
xray_config_inject_test.go feat(online): use xray online-stats API for onlines and access-log-free IP limit 2026-06-11 19:42:03 +02:00
xray_metrics.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
xray_setting.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
xray_setting_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00