官方有提供意见脚本,直接按照提示安装,简单配置就行了
URL https://github.com/AdguardTeam/AdGuardHome
稳定版,Beta版和Edge版,安装在/root目录下;不设置的话,默认好像在/opt的文件夹下
常用的Linux版本都支持,alpine也可以
curl -s -S -L 'https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh' | sh -s -- -o '/root' -v
curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -c beta -o '/root' -v
curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -c edge -o '/root' -v
AdGuardHome.yaml配置文件里,在tls的下面,将allow_unencrypted_doh设置成true
allow_unencrypted_doh: true
这样就可以使用http://127.0.0.1/dns-query
分享几个nginx的配置,最好是放在https里
将Agh的登陆也设置成首页
location / {
proxy_pass http://127.0.0.1:3000/;
proxy_redirect / /;
proxy_cookie_path / /;
}
将Agh的首页设置/agh/路径,可以跟其他共存
location /agh/ {
proxy_pass http://127.0.0.1:3000/;
proxy_redirect / /agh/;
proxy_cookie_path / /agh/;
}
将doh的路径设置成/query-dns或者任何的其他东东(理论上可以设置无限个)~
location /query-dns {
proxy_set_header Host $http_host;
proxy_buffering off;
proxy_redirect off;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:3000/dns-query;
}
评论区