Xray-core/app/router
yuhan6665 42aea01fb5
Core: Add mutex to injection resolution ()
* Revert "Add RequireFeaturesAsync() that works regardless order of app init"

* Add mutex to injection resolution

- Turns out we already support async DI resolution regardless of feature ordering
Previous code contain a race condition causing some resolution is lost
- Note that the new mutex cover s.pendingResolutions and s.features
but must not cover callbackResolution() due to deadlock
- Refactor some method names and simplify code

* Add OptionalFeatures injection

For example OptionalFeatures() is useful for fakedns module
2024-12-26 12:55:12 +00:00
..
command Core: Add mutex to injection resolution () 2024-12-26 12:55:12 +00:00
balancing.go Core: Add mutex to injection resolution () 2024-12-26 12:55:12 +00:00
balancing_override.go Refactor log () 2024-06-29 14:32:57 -04:00
condition.go Routing: Fix regexp syntax support in UserMatcher () 2024-10-11 11:37:01 -04:00
condition_geoip.go
condition_geoip_test.go Chore: Refactor tests in app/router () 2024-11-24 22:53:31 -05:00
condition_test.go Chore: Refactor tests in app/router () 2024-11-24 22:53:31 -05:00
config.go Config: Remove more legacy fields () 2024-09-19 01:05:59 +00:00
config.pb.go Chore: Generate *.pb.go files with protoc v5.28.2 2024-10-16 04:06:21 +00:00
config.proto Config: Remove more legacy fields () 2024-09-19 01:05:59 +00:00
router.go Remove legacy code () 2024-09-23 11:28:19 -04:00
router_test.go Config: Remove more legacy fields () 2024-09-19 01:05:59 +00:00
strategy_leastload.go Core: Add mutex to injection resolution () 2024-12-26 12:55:12 +00:00
strategy_leastload_test.go Chore: Run gofmt () 2024-11-09 11:16:11 +00:00
strategy_leastping.go Core: Add mutex to injection resolution () 2024-12-26 12:55:12 +00:00
strategy_random.go Core: Add mutex to injection resolution () 2024-12-26 12:55:12 +00:00
weight.go Refactor log () 2024-06-29 14:32:57 -04:00
weight_test.go