Xray-core/app/router
yuhan6665 42aea01fb5
Core: Add mutex to injection resolution (#4206)
* 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 (#4206) 2024-12-26 12:55:12 +00:00
balancing.go
balancing_override.go
condition.go
condition_geoip.go fix(app/router): fixed a bug in geoip matching with refactoring (#2489) 2023-08-26 15:11:37 +00:00
condition_geoip_test.go Chore: Refactor tests in app/router (#4019) 2024-11-24 22:53:31 -05:00
condition_test.go
config.go Config: Remove more legacy fields (#3817) 2024-09-19 01:05:59 +00:00
config.pb.go
config.proto
router.go
router_test.go Config: Remove more legacy fields (#3817) 2024-09-19 01:05:59 +00:00
strategy_leastload.go Core: Add mutex to injection resolution (#4206) 2024-12-26 12:55:12 +00:00
strategy_leastload_test.go
strategy_leastping.go
strategy_random.go Core: Add mutex to injection resolution (#4206) 2024-12-26 12:55:12 +00:00
weight.go
weight_test.go Least load balancer (#2999) 2024-02-17 22:51:37 -05:00