Stores a reverse mapping of IP addresses after responding to a DNS query in order to provide domain names when routing.
52
54
53
-
Since this process relies on the act of resolving domain names by an application before making a request, it can beproblematicinenvironmentssuchasmacOS,whereDNSisproxiedandcachedbythesystem.
55
+
Since this process relies on the act of resolving domain names by an application before making a request, it can be
56
+
problematic in environments such as macOS, where DNS is proxied and cached by the system.
FakeIP refers to a type of behavior in a program that simultaneously hijacks both DNS and connection requests. It
4
+
responds to DNS requests with virtual results and restores mapping when accepting connections.
5
+
6
+
#### Advantage
7
+
8
+
* Retrieve the requested domain in places like IP routing (L3) where traffic detection is not possible to assist with routing.
9
+
* Decrease an RTT on the first TCP request to a domain (the most common reason).
10
+
11
+
#### Limitation
12
+
13
+
* Its mechanism breaks applications that depend on returning correct remote addresses.
14
+
* Only A and AAAA (IP) requests are supported, which may break applications that rely on other requests.
15
+
16
+
#### Recommendation
17
+
18
+
* Do not use if you do not need L3 routing.
19
+
* If using tun, make sure FakeIP ranges is included in the tun's routes.
20
+
* Enable `experimental.clash_api.store_fakeip` to persist FakeIP records, or use `dns.rules.rewrite_ttl` to avoid losing records after program restart in DNS cached environments.