Skip to content

Various improvements to servers I use #971

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

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

a1346054
Copy link
Contributor

@a1346054 a1346054 commented Feb 4, 2025

Commit messages contain further info.

@a1346054 a1346054 marked this pull request as draft February 7, 2025 10:10
1.0.0.1 existed twice in the list
The removed IP addresses were intended to be used only by the cloudflare
warp client. It's better to use the "stable" well-known cloudflare IP
addresses instead.
Hostname obtained from the server certificate, it's more suitable than
using the IP address directly, even if the certificate has a valid entry
for the IP address.

Additionally, dns.cloudflare.com was no longer a valid hostname in the
server certificate for the documented DoH servers.
The correct name for the service is Google Public DNS, and not just Google DNS.

Also make it clear that it is a DoH server and not DNSCrypt server.
Switch from a sandbox server to regular server.

Also add an additional IPv6 server.
This pointed at a regular server, not family shield server.

Also add an additional IPv6 address.
This uses the IP addresses that are documented by Cisco.
@a1346054 a1346054 changed the title Minor Cloudflare fixes Various improvements to servers I use Feb 7, 2025
@a1346054 a1346054 force-pushed the fixes branch 2 times, most recently from f1cc322 to a9b06b6 Compare February 7, 2025 12:35
@jedisct1
Copy link
Member

jedisct1 commented Feb 7, 2025

Thanks!

I think host names in SNIs were changed to IP addresses in order to help bypass filters. As long as they work, reverting this would not be an improvement.

@a1346054
Copy link
Contributor Author

a1346054 commented Feb 7, 2025

I was not sure about that, because many other DoH servers in the list do use the hostname in addition to the IP address.

I'll have a look at how common filtering according to SNI is, but I'd imagine any filtering would know about the IP addresses by now too.

@jedisct1
Copy link
Member

jedisct1 commented Feb 7, 2025

The host name is required when other services are hosted on the same IP address, or when it changes the filtering behavior.

@a1346054
Copy link
Contributor Author

a1346054 commented Feb 7, 2025

I am aware how hostnames are used in DoH, both for SNI so that the correct service is reached when multiple exist on the same IP address, and to provide a hint what to check the TLS certificate against in case the certificate does not contain an IP address field (in general, most certificates do not have an IP field).

I have access to a few networks that specifically try to block DoH (and DoT, and redirect traditional DNS too) so I'll test if there's any difference in behavior if the hostname is part of the stamp or if it just has the IP address.

@jedisct1
Copy link
Member

jedisct1 commented Feb 7, 2025

I have access to a few networks that specifically try to block DoH (and DoT, and redirect traditional DNS too)

That's why DNS relays exist.

Also use documented IP addresses, correct hostname, and mark them as
supporting DNSSEC.
Use the IP addresses that are documented by Cisco, and also mark them as
supporting DNSSEC.
@a1346054
Copy link
Contributor Author

a1346054 commented Feb 8, 2025

I checked connecting to DoH servers that used hostname vs IP address in the SNI, and it made no difference in terms of getting through intentional DoH traffic blocking. All the DoH servers are publicly known and their IP addresses are on the many blocklists floating around on the internet.

If one is behind a restrictive firewall, it's better to attempt connection through tor or relays. Using IP addresses in SNI comes at the cost of clarity, and deviates from how web browsers and other tools use DoH.

I went over all the changes once again and removed the one failing server.

@a1346054 a1346054 marked this pull request as ready for review February 8, 2025 00:28
@jedisct1
Copy link
Member

jedisct1 commented Feb 8, 2025

Using IP addresses in SNI comes at the cost of clarity, and deviates from how web browsers and other tools use

This is just a string meant to be copied and pasted, or with tools like dnscrypt-proxy, it doesn't even need to be entered.

What really matters is in practice, what advantages do IP addresses have over host names. If one option works more often than another, even just a little bit, it's a better option.

@demarcush made these changes specifically to help avoiding SNI inspection. But I don't know if it really helps or not in practice.

@demarcush
Copy link
Contributor

@jedisct1: I can assure that it bypasses SNI perfectly in Iran or Russia, especially v6 ones. Bastards are too preoccupied with plundering that they didn't put the IP addresses in blocklist, or making so would mess with their own infrastructure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants