3x-ui/internal/sub
wahh3b-lgtm 605e90dbf0
feat(sub): add dynamic remark variables with Jalali date, transport, and status tokens (#5430)
* feat(sub): implement dynamic single-bracket remark variables with timezone-aware inline Jalali conversion

* Update .gitignore

* Update .gitignore

* merge: bring in origin/main commits to resolve conflict base

* fix(sub): address review issues in dynamic remark variables

- Add TIME_LEFT to unlimitedDropTokens so segments containing only
  {TIME_LEFT} are dropped for unlimited clients (same as DAYS_LEFT)
- Remove dead uiSingleBraceRe variable (translateUISingleBrackets uses
  a character scanner, not this regex)
- Change expireDateLabel to use time.Local instead of UTC, consistent
  with jalaliExpireDateLabel

Co-authored-by: Sanaei <MHSanaei@users.noreply.github.com>

* fix

* fix

---------

Co-authored-by: MHSanaei <MHSanaei@users.noreply.github.com>
2026-06-21 02:00:27 +02:00
..
build_urls_test.go fix(subscriptions): avoid shared mutable state during generation (#5270) 2026-06-15 16:23:47 +02:00
characterization_test.go fix(sub): SS2022 share links must not base64-encode userinfo (#5432) 2026-06-20 11:25:12 +02:00
clash_external.go refactor(frontend): move form-item hints from extra to tooltip 2026-06-17 17:24:16 +02:00
clash_service.go feat(sub): add dynamic remark variables with Jalali date, transport, and status tokens (#5430) 2026-06-21 02:00:27 +02:00
clash_service_test.go feat(sub): full XHTTP field mapping for Clash/Mihomo subscriptions (#5417) 2026-06-21 00:32:13 +02:00
controller.go feat(sub): add option to hide server settings in subscription (happ) (#5433) 2026-06-21 00:32:56 +02:00
controller_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
default.json refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
dist.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
endpoint.go feat(sub): add dynamic remark variables with Jalali date, transport, and status tokens (#5430) 2026-06-21 02:00:27 +02:00
endpoint_test.go feat(sub): add dynamic remark variables with Jalali date, transport, and status tokens (#5430) 2026-06-21 02:00:27 +02:00
external_config.go feat(sub): per-client external links and remote subscriptions 2026-06-14 20:57:14 +02:00
external_config_test.go feat(hosts): managed Hosts for per-host subscription link overrides (#5409) 2026-06-17 12:06:55 +02:00
external_only_sub_test.go feat(hosts): managed Hosts for per-host subscription link overrides (#5409) 2026-06-17 12:06:55 +02:00
external_subscription.go feat(sub): per-client external links and remote subscriptions 2026-06-14 20:57:14 +02:00
host_sub.go feat(sub): add dynamic remark variables with Jalali date, transport, and status tokens (#5430) 2026-06-21 02:00:27 +02:00
host_sub_test.go feat(hosts): managed Hosts for per-host subscription link overrides (#5409) 2026-06-17 12:06:55 +02:00
json_service.go feat(sub): add dynamic remark variables with Jalali date, transport, and status tokens (#5430) 2026-06-21 02:00:27 +02:00
json_service_test.go fix(sub): preserve non-default scMinPostsIntervalMs and use per-inbound xmux in JSON subscriptions (#5393) 2026-06-20 00:57:47 +02:00
links.go feat(hosts): managed Hosts for per-host subscription link overrides (#5409) 2026-06-17 12:06:55 +02:00
links_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
mutation_audit_test.go fix(sub): preserve non-default scMinPostsIntervalMs and use per-inbound xmux in JSON subscriptions (#5393) 2026-06-20 00:57:47 +02:00
remark_vars.go feat(sub): add dynamic remark variables with Jalali date, transport, and status tokens (#5430) 2026-06-21 02:00:27 +02:00
remark_vars_test.go feat(sub): add dynamic remark variables with Jalali date, transport, and status tokens (#5430) 2026-06-21 02:00:27 +02:00
service.go feat(sub): add dynamic remark variables with Jalali date, transport, and status tokens (#5430) 2026-06-21 02:00:27 +02:00
service_dedup_test.go feat(hosts): managed Hosts for per-host subscription link overrides (#5409) 2026-06-17 12:06:55 +02:00
service_flow_test.go feat(hosts): managed Hosts for per-host subscription link overrides (#5409) 2026-06-17 12:06:55 +02:00
service_property_test.go fix(nodes): stop multi-attached client traffic inflating across node inbounds 2026-06-15 19:31:57 +02:00
service_sharelink_test.go feat(hosts): managed Hosts for per-host subscription link overrides (#5409) 2026-06-17 12:06:55 +02:00
service_sort_test.go feat(hosts): managed Hosts for per-host subscription link overrides (#5409) 2026-06-17 12:06:55 +02:00
service_test.go feat(sub): add dynamic remark variables with Jalali date, transport, and status tokens (#5430) 2026-06-21 02:00:27 +02:00
service_userinfo_test.go refactor: focused service files, leaf subpackages, and an internal/ layout (#5167) 2026-06-10 15:19:22 +02:00
sub.go feat(sub): add option to hide server settings in subscription (happ) (#5433) 2026-06-21 00:32:56 +02:00