Last active
January 9, 2019 02:50
-
-
Save tawateer/fff8798407693d74b80d44e46806cc82 to your computer and use it in GitHub Desktop.
sniproxy + dnscrypt-proxy + dnscrypt-wrapper + dnsmasq 相关脚本
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo su - | |
wget http://download.dnscrypt.org/dnscrypt-proxy/dnscrypt-proxy-1.6.0.tar.gz | |
tar xvzf dnscrypt-proxy-1.6.0.tar.gz | |
cd dnscrypt-proxy-1.6.0 | |
./configure | |
make | |
make install | |
cd .. | |
dnscrypt-proxy -a 0.0.0.0:53 --resolver-address 52.77.252.184:5353 \ | |
--provider-name 2.dnscrypt-cert.logcg.com \ | |
--provider-key ABE5:7B4D:172C:6501:9827:59BD:449F:1486:1FF5:CACB:1CF5:6998:0585:633F:142B:706E --logfile=/var/log/dnscrypt-proxy.log & |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo su - | |
mkdir sniproxy | |
cd sniproxy/ | |
wget http://download.libsodium.org/libsodium/releases/libsodium-1.0.10.tar.gz | |
tar xf libsodium-1.0.10.tar.gz | |
cd libsodium-1.0.10 | |
yum -y install gcc | |
CFLAGS="-O3 -fPIC" ./configure | |
make | |
make install | |
ldconfig | |
cd .. | |
wget https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz | |
tar xvzf libevent-2.0.22-stable.tar.gz | |
cd libevent-2.0.22-stable | |
./configure --prefix=/usr | |
make | |
make install | |
echo /usr/local/lib > /etc/ld.so.conf.d/usr_local_lib.conf | |
ldconfig | |
cd .. | |
yum -y install git | |
git clone --recursive git://github.com/Cofyc/dnscrypt-wrapper.git | |
cd dnscrypt-wrapper/ | |
yum -y install autoconf | |
make configure | |
./configure | |
make | |
make install | |
cd .. | |
mkdir dnskey | |
cd dnskey | |
dnscrypt-wrapper --gen-provider-keypair | |
dnscrypt-wrapper --gen-crypt-keypair --crypt-secretkey-file=1.key | |
dnscrypt-wrapper --gen-cert-file --crypt-secretkey-file=1.key --provider-cert-file=1.cert | |
dnscrypt-wrapper --resolver-address=127.0.0.1:53 --listen-address=0.0.0.0:5353 \ | |
--provider-name=2.dnscrypt-cert.logcg.com \ | |
--crypt-secretkey-file=1.key --provider-cert-file=1.cert -VV --logfile=/var/log/dnscrypt-wraper.log & | |
yum -y install dnsmasq | |
sed -i "/conf-dir/s/^#//g" /etc/dnsmasq.conf | |
git clone https://github.com/R0uter/Dnsmasq-sniproxy-conf.git | |
cd Dnsmasq-sniproxy-conf | |
cp sni.conf /etc/dnsmasq.d/ | |
service dnsmasq start | |
chkconfig dnsmasq on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment