dnscrypt-proxy
parent
a8bfa0acc0
commit
e8c1d891f1
|
@ -1,58 +1,32 @@
|
|||
# DNSCrypt
|
||||
|
||||
What is DNSCrypt? Why use DNSCrypt? These questions can be answered by simple Google search, and I don't know where to start.
|
||||
Assume you use Archlinux and NetworkManager.
|
||||
|
||||
This guide is thing I save for myself, so be careful.
|
||||
|
||||
---
|
||||
|
||||
Assume you use Archlinux and NetworkManager, because I use those.
|
||||
|
||||
Read [dnscrypt-proxy](https://wiki.archlinux.org/index.php/Dnscrypt-proxy).
|
||||
Read [dnsmasq](https://wiki.archlinux.org/index.php/Dnsmasq).
|
||||
Read [NetworkManager](https://wiki.archlinux.org/index.php/NetworkManager).
|
||||
|
||||
---
|
||||
|
||||
Install dnscrypt-proxy, dnsmasq.
|
||||
Install [dnscrypt-proxy](https://wiki.archlinux.org/index.php/Dnscrypt-proxy).
|
||||
|
||||
Edit `/etc/dnscrypt-proxy/dnscrypt-proxy.toml`:
|
||||
|
||||
- Change `listen_addresses` option:
|
||||
|
||||
```toml
|
||||
listen_addresses = ['127.0.0.1:53000', '[::1]:53000']
|
||||
listen_addresses = ['127.0.0.1:53', '[::1]:53']
|
||||
```
|
||||
|
||||
- Change `server_names` option to use Cloudflare:
|
||||
|
||||
```toml
|
||||
server_names = ['cloudflare', 'cloudflare-ipv6']
|
||||
server_names = ['google', 'google-ipv6', 'cloudflare', 'cloudflare-ipv6']
|
||||
```
|
||||
|
||||
Edit `/etc/resolv.conf`:
|
||||
Enable and start service:
|
||||
|
||||
```sh
|
||||
systemctl enable --now dnscrypt-proxy.service
|
||||
```
|
||||
|
||||
In NetworkManager GUI, change DNS:
|
||||
|
||||
```txt
|
||||
nameserver ::1
|
||||
nameserver 127.0.0.1
|
||||
options edns0 single-request-reopen
|
||||
IPv4 127.0.0.1
|
||||
IPv6 ::1
|
||||
```
|
||||
|
||||
Edit `/etc/dnsmasq.conf`:
|
||||
|
||||
```txt
|
||||
no-resolv
|
||||
server=::1#53000
|
||||
server=127.0.0.1#53000
|
||||
listen-address=::1,127.0.0.1
|
||||
cache-size=1000
|
||||
```
|
||||
|
||||
Edit `/etc/NetworkManager/conf.d/dns.conf` to prevent NetworkManager change `/etc/resolv.conf`:
|
||||
|
||||
```txt
|
||||
[main]
|
||||
dns=none
|
||||
```
|
||||
|
||||
Finally, restart `NetworkManager.service` and start/enable `dnscrypt-proxy.service`, `dnsmasq.service`.
|
||||
|
|
Loading…
Reference in New Issue