dnsproxy
dnsproxy copied to clipboard
How to customize sni/host/ip
curl --connect-to www.baidu.com:443:[2001:4860:4860::8888]:443 -k -H "accept: application/dns-json" -H "Host: dns.google" "https://www.baidu.com:443/resolve?name=cloudflare.com&type=A"
I want to customize sni, host, ip separately, how do I do it?
There's no functionality for that in dnsproxy
I hope dnsproxy will add such a function, customize sni/host/ip
You know what, I think there's a way after all.
Create a DNS stamp: https://dnscrypt.info/stamps
- Choose DNS-over-HTTPS
- Enter the hostname
- Enter the IP address you want to use
- Run dnsproxy with
--insecure
flag - Run dnsproxy with that DNS stamp.
Here's an example of such a stamp: sdns://AgcAAAAAAAAABzguOC44LjgADXJhbmRvbS5kb21haW4KL2Rucy1xdWVyeQ
(examine it on dnscrypt.info to see what's inside)
./dnsproxy -u sdns://AgcAAAAAAAAABzguOC44LjgADXJhbmRvbS5kb21haW4KL2Rucy1xdWVyeQ --insecure
Only sni+host can be customized, and sni host cannot be separated independently.
I have tested, sni/host/ip:port Are three independent variables,
Only sni+host can be customized, and sni host cannot be separated independently.
DNS stamp allows you to configure all three:
stamp Only host+sni can be set, host and sni set the same value, and cannot be set independently
sni is the identification code of the tls handshake, host is the host value of the http protocol ip is the connection address, The three values are different.
stamp Only host=sni can be set, and host and sni cannot be set separately.
Yeah, I see. You're right, host+sni would be the same.
Because in some places, such as the firewall of China, sni will block dns.google, so you can use a specific sni to evade the firewall
- Option to send no SNI indication to better counter censorship
this repo can disable SNI indication: https://github.com/compassd/dcompass
@honwen
sni host ip:port can be customized separately to make sense.