Xray-core/app/dns
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
..
fakedns Chore: Generate *.pb.go files with protoc v5.28.2 2024-10-16 04:06:21 +00:00
config.go Refactor log (#3446) 2024-06-29 14:32:57 -04: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 (#3817) 2024-09-19 01:05:59 +00:00
dns_test.go Config: Remove more legacy fields (#3817) 2024-09-19 01:05:59 +00:00
dns.go Remove legacy code (#3838) 2024-09-23 11:28:19 -04:00
dnscommon_test.go Test: Fix incorrect output format (#3968) 2024-11-04 10:36:42 -05:00
dnscommon.go Refactor log (#3446) 2024-06-29 14:32:57 -04:00
hosts_test.go Config: Remove more legacy fields (#3817) 2024-09-19 01:05:59 +00:00
hosts.go Config: Remove more legacy fields (#3817) 2024-09-19 01:05:59 +00:00
nameserver_doh_test.go feat(dns): Support DNS queryStrategy config per NameServer. 2023-09-22 10:34:36 -04:00
nameserver_doh.go DNS: Always use a DNS Message ID of 0 for DoH and DoQ (#4193) 2024-12-22 09:19:09 +00:00
nameserver_fakedns.go Core: Fix memory leaks with RequireFeatures() (#4095) 2024-12-11 01:07:52 +00:00
nameserver_local_test.go Fix some tests and format code (#830) 2021-12-14 19:28:47 -05:00
nameserver_local.go Refactor log (#3446) 2024-06-29 14:32:57 -04:00
nameserver_quic_test.go Test: Change address for DNS over QUIC tests (#4002) 2024-11-11 14:43:57 -05:00
nameserver_quic.go DNS: Always use a DNS Message ID of 0 for DoH and DoQ (#4193) 2024-12-22 09:19:09 +00:00
nameserver_tcp_test.go feat(dns): Support DNS queryStrategy config per NameServer. 2023-09-22 10:34:36 -04:00
nameserver_tcp.go DNS: Do not hit cache if encounted err (#3784) 2024-09-12 10:34:45 -04:00
nameserver_udp.go DNS: Do not hit cache if encounted err (#3784) 2024-09-12 10:34:45 -04:00
nameserver.go Core: Add mutex to injection resolution (#4206) 2024-12-26 12:55:12 +00:00