-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fake DNS with full V2 intergration #406
Conversation
@xiaokangwang 👍 I can do some test on Android device, today or tomorrow. |
Here is a working configure file No, you still need to add a fake boolean value in the DNS, and the FakeDNS top level setting is optional. |
There are some report that sometimes Fake IP cannot be picked up by Fake DNS and will be allocated a new IP or unable to rewrite domain. I am still investigating. |
Did some test. I found no issue on my side except the "fakeDns" top level setting is not taking effect. |
I have fixed a issue prevent UDP socket with fake DNS IP from restored to original domain name. |
I think I have fixed this in the 0a94cfd . Please let me know if it is not fixed for you. |
sorry for simple suggestion of final configuration without code review // remove
"dns": {
"fake": true
},
// remove
{
"type": "field",
"ip": [
"240.0.0.0/8"
],
"outboundTag": "discard"
}
// remove
{
"type": "field",
"port": "53",
"outboundTag": "fakedns"
},
// remove
{
"protocol": "dns",
"settings": {
},
"tag": "fakedns"
},
// makes the similar experience of v2ray-sniffing
"sniffing": {
"enabled": true,
"destOverride": [
// "http, tls",
"fakedns" // specify fakeDns and routing-dns
],
"range": "240.0.0.0/8", // specify fake-range and routing-discard
"metadataOnly": true
} |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
any update? |
No, I am waiting for merge |
Is this pr clear for merge? |
Could the fakeDNS configuration be simplified? |
Now Don't merge |
A new config object "fake" in DnsObject for toggling fake dns function Compare with sniffing, fake dns is not limited to http and tls traffic. It works across all inbounds. For example, when dns request come from one inbound, the local DNS server of v2ray will response with a unique fake IP for every unique domain name. Then later on v2ray received a request to one of the fake IP from any inbounds, it will override the request destination with the previously saved domain. By default, v2ray cache up to 65535 addresses. The old records will be discarded bases on LRU. The fake IP will be 240.x.x.x
…his will work for both IPv4 and IPv6 networks.
…e, it will create a infinite loop
6ad3760
to
1c909d6
Compare
I have rebased the code so that it do not have any merge conflict with master branch. |
|
I haven't test the latest version. From look of this commit a1a4ab1 |
p.s I am still looking for a more suitable config structure, Don't forget to express your opinion :) |
The current config is good in general.
|
@xiaokangwang @kslr sorry for the late reply. I did test on Android and found some issue in the latest version. In 38e4107, the interface |
former agreed. |
|
@Loyalsoldier these are different issues. #696 is to fix direct traffic send out from freedom outbound, when fake DNS is enabled. |
This is a more integrated version of #395 by @yuhan6665 .
Fake DNS Pool will be represented as a Instance Service, and the match and replace process will be considered a sniffer.
Following new project interface have been added:
Metadata sniffer, which is used to sniff connection data from metadata, instead of content.
Configure file post processing stage, which is used to add candy or lint to configure file.