Brook中转一键安装脚本失效解决方法
国内中转机下载github源码失效 443连接失败等问题;须更改hosts文件
1:首先可以前往查询最快的IP地址
2:然后利用echo写入查询到的最快IP和并把IP根据对应的域名替换如下echo命令中并运行
如:
1 2 | echo “151.101.76.133 raw.githubusercontent.com” >> /etc/hosts echo “151.101.76.133 github.com” >> /etc/hosts |
2:下载brook-pf-mod.sh
1 | wget -N –no-check-certificate https://raw.githubusercontent.com/siemenstutorials/brookddns/master/brook-pf-mod.sh |
3:创建/usr/local/brook-pf目录,切换至该目录并清空里面的文件
1 | mkdir /usr/local/brook-pf;cd /usr/local/brook-pf;rm -rf /usr/local/brook-pf/* |
4:下载brook最新版本文件,并重命名为brook
1 | wget -N –no-check-certificate “https://github.com/txthinking/brook/releases/download/v20210101/brook_linux_amd64”;chmod +x brook_linux_amd64 ; mv brook_linux_amd64 brook |
5:创建配置文件,brook.conf
1 | echo > /usr/local/brook-pf/brook.conf |
6:根据系统下载管理脚本
centos
1 | wget https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/service/brook-pf_centos -O /etc/init.d/brook-pf;chmod +x /etc/init.d/brook-pf;chkconfig –add brook-pf;chkconfig brook-pf on |
debian
1 | https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/service/brook-pf_debian -O /etc/init.d/brook-pf;chmod +x /etc/init.d/brook-pf;update-rc.d -f brook-pf defaults |
7:返回目录运行brook即可
1 | cd ~;chmod +x brook-pf-mod.sh;./brook-pf-mod.sh |
开启DDNS
centos
1 | yum install bind-utils -y |
debian
1 | apt-get install dnsutils |
END
评论前必须登录!
注册