Add fakeip support

This commit is contained in:
世界
2023-03-25 12:03:23 +08:00
parent aa94cfb876
commit 9bca5a517f
28 changed files with 689 additions and 62 deletions

18
docs/faq/fakeip.md Normal file
View File

@@ -0,0 +1,18 @@
# FakeIP
FakeIP refers to a type of behavior in a program that simultaneously hijacks both DNS and connection requests. It
responds to DNS requests with virtual results and restores mapping when accepting connections.
#### Advantage
*
#### Limitation
* Its mechanism breaks applications that depend on returning correct remote addresses.
* Only A and AAAA (IP) requests are supported, which may break applications that rely on other requests.
#### Recommendation
* If using tun, make sure FakeIP ranges is included in the tun's routes.
* 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.