3x-ui/internal
Duxxie 380aff4d82
Add remote routing URL support (#6168)
* Add remote routing URL support

* Harden remote routing refresh

* fix(sub): harden remote routing fetch and accept Mihomo src rule flag

Remote routing bytes reach the YAML/JSON parsers from goroutines that run
outside Gin's recovery, so a parser panic on crafted input would take down
the whole panel. Contain it in fetch() (a panic now degrades to a failed
refresh that keeps the last-good value and releases the in-flight slot)
and start the refresh, cache-load and startup-warm goroutines through
common.GoRecover like the other background workers.

The route-graph validator only skipped a trailing no-resolve flag, so a
valid Mihomo rule like IP-CIDR,x,DIRECT,no-resolve,src was rejected as an
unknown target; skip both option flags.

Also deduplicate the HTTPS-source classification into
common.ParseRemoteRoutingURL so the save-time validator and the resolver
can never drift (internal/sub imports internal/web/service, so the copy
existed only to avoid the import cycle), move the test-only
mergeRemoteClashRulesYAML helper into the test file, and trim oversized
comment blocks.

---------

Co-authored-by: Duxxie <yelloduxx@users.noreply.github.com>
Co-authored-by: Sanaei <ho3ein.sanaei@gmail.com>
2026-08-18 16:02:11 +02:00
..
config feat(nodes): opt-in encryption at rest for the outbound node API token (#6186) 2026-08-15 16:48:50 +02:00
crypto/nodetoken feat(nodes): opt-in encryption at rest for the outbound node API token (#6186) 2026-08-15 16:48:50 +02:00
database Add per-client external link controls (#5650) 2026-08-18 13:55:04 +02:00
eventbus chore: refresh dependencies, fix Linux tool tasks, modernize Go idioms 2026-07-25 16:08:09 +02:00
logger fix(inbounds): apply runtime changes after the DB commit (#5768) 2026-07-08 22:12:28 +02:00
mtproto fix(mtproto): synchronize child-process lifecycle (#6141) 2026-07-29 20:56:26 +02:00
sub Add remote routing URL support (#6168) 2026-08-18 16:02:11 +02:00
tunnelmonitor style: adopt golangci-lint v2 and resolve all findings 2026-06-27 15:42:22 +02:00
util Add remote routing URL support (#6168) 2026-08-18 16:02:11 +02:00
web Add remote routing URL support (#6168) 2026-08-18 16:02:11 +02:00
xray feat(clients): renew on a calendar day instead of a rolling interval (#6239) 2026-08-18 12:46:00 +02:00