-
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
Add sniffer enhancement related to Fake DNS #697
Conversation
8448e00
to
c88d124
Compare
Maybe this behavior should be the default one in FakeDNS instead of adding a new DNS convention |
I can make change this way. Commit will be simpler even. |
but v2ray-sniffing enabled also on my side, as FakeDns not used anywhere. { "destOverride": [ "http", "tls", "fakedns" ] },
{ "dns": { "servers": [ "fakedns", "8.8.8.8" ] }
|
There is an option |
c88d124
to
0052edc
Compare
Maybe add a boolean option (But as you can see for now, if the |
Fallback means if the request IP is in the range of fakes, when fakeDNS cache missed (most likely due to reboot), "tls" and "http" sniffer will be used to identify domain
With the default ip range, now it is guarentee to return different ip within 4 hours. It helps when core is rebooted, new DNS request still get fresh ip, If there is request to the old fake ips, fake DNS can't find the domain, other sniffers will get a chance to work. Also fix an edge case where element is wrongly brought to top of LRU
0052edc
to
fff3e1a
Compare
@yuhan6665 @Loyalsoldier what about defaults to fallback (if when |
IMO, I like the word |
@Loyalsoldier v2ray-core/app/proxyman/config.proto Lines 60 to 63 in 38da831
|
From what I can tell, |
This will stop working with TLS 1.3 ESNI and HTTP/3, no? |
@klzgrad FakeDNS will not work with Encrypted DNS query. It may work with ESNI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but if we plan to add TUN Inbound, "fakedns+other" is better
@xiaokangwang Don't forget |
The reason I added a metadata only only is that without that, some protocol that require server to initiate the talk will not work(notably SMTP). I have to say that the change in shouldOverride have break the abstraction of the sniffer. I will look more into how to incorporate this change into V2Ray. |
Sorry my English is very bad and I cannot understand your meaning, but, when FakeDNS is not getting result, and metadataonly is false which allow V2Ray to prevent client from dialing connection before sending content, other sniffer's result will work. |
If agreed, I can rework the internal code of this PR so that: |
It's great to also implement this #806 |
There are also domains like .internal that shouldn't be solved with fake dns. I think this should be something we require user to configure to suit their environment instead of hard code such logic. This issue is similar to some app don't respect fake dns's response and refuse to work when fake dns is enabled. We already have setting to solve all these problems, we shouldn't use hard coded logic then. |
But V2Ray cannot deal with invalid domains with space now. |
Close as work is done in #915 |
I have been thinking of for the cache/mapping loss when core is rebooted. Also got some idea from the initial user of the current fake DNS.
Basically the idea is to use the existing sniffers (HTTP, TLS) when the domain name cannot be recovered. When it works, logs will be like: