Dcompass github address
- Dcompass Address
- Dcompass Release bianry
#Switch to root mode
sudo su
#Define dcompass version
dcompass_version=build-20201228_1008
#Create dcompass temp folder
sudo mkdir -p /tmp/dcompass
# Swich to folder just we created.
cd /tmp/dcompass
#Download dcompass binary
sudo curl -fsSLO "https://github.com/LEXUGE/dcompass/releases/download/$dcompass_version/dcompass-x86_64-unknown-linux-musl-full"
#Create dcompass configure folder
sudo mkdir -p /etc/dcompass
#Create dcompass configure yaml file
sudo bash -c 'cat > /etc/dcompass/config.yaml' <<EOF
verbosity: 'info'
cache_size: 4096
#address: 0.0.0.0:2053
address: 127.0.1.2:53
table:
- tag: start
if:
qtype:
- AAAA
then:
- disable
- end
else:
- skip
- dispatch
- tag: dispatch
if: any
then:
- query: domestic
- check_secure
- tag: check_secure
if:
geoip:
on: resp
codes:
- CN
else:
- query: secure
- end
upstreams:
- method:
udp:
addr: 114.114.114.114:53
tag: 114DNS
- method:
udp:
addr: 223.6.6.6:53
tag: Ali
- method:
hybrid:
- 114DNS
- Ali
tag: domestic
- method:
https:
no_sni: true
name: cloudflare-dns.com
addr: 1.1.1.1:443
tag: cloudflare
- method:
https:
no_sni: true
name: dns.quad9.net
addr: 9.9.9.9:443
tag: quad9
- method:
hybrid:
- cloudflare
- quad9
tag: secure
EOF
sudo cp -af /tmp/dcompass/dcompass-x86_64-unknown-linux-musl-full /usr/local/bin/dcompass
sudo chown root:root /usr/local/bin/dcompass
sudo chmod +x /usr/local/bin/dcompass
sudo bash -c 'cat > /lib/systemd/system/dcompass.service' << EOF
[Unit]
Description=dcompass service
[Service]
ExecStart=/usr/local/bin/dcompass -c /etc/dcompass/config.yaml
Restart=on-failure
RestartSec=42s
[Install]
WantedBy=multi-user.target
EOF
#Reload systemclt daemon
sudo systemctl daemon-reload
#Delete temp directory.
sudo rm -rf /tmp/dcompass
#Enable service of dcompass auto startup when system reboot
sudo systemctl enable dcompass
#Restart service of dcompass
sudo systemctl restart dcompass
#Check dcompass status of dcompass.
sudo systemctl status dcompass