We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如题 添加gfw后启动不了,取消后成功启动
log信息 2024/03/02 18:21:18.051652 26164#1 [error] parsing configuration file: parsing config file for upgrade: yaml: line 15: did not find expected key 2024/03/02 18:21:18.050078 26164#1 [debug] reading config file: /etc/AdGuardHome.yaml 2024/03/02 18:21:18.049520 26164#1 [debug] current working directory is /usr/bin/AdGuardHome 2024/03/02 18:21:18.048947 26164#1 [info] AdGuard Home, version v0.107.44
yaml文件 dns: bind_hosts: - 0.0.0.0 port: 533 anonymize_client_ip: false ratelimit: 20 ratelimit_subnet_len_ipv4: 24 ratelimit_subnet_len_ipv6: 56 ratelimit_whitelist: [] refuse_any: true upstream_dns:
The text was updated successfully, but these errors were encountered:
有解决方法了吗?
Sorry, something went wrong.
没有,已经不用了,
/usr/share/AdGuardHome/gfw2adg.sh脚本的问题,yaml文件缩进不正确就会出现无法启动的情况,要么让开发者自己修改脚本搞定缩进的问题,要么把gfw的上游列表放到upstream_dns_file这个设置项里面 折腾一晚上搞明白了
/usr/share/AdGuardHome/gfw2adg.sh
if (white==0) {print(" - '\''[/"fin"/]"upst"'\''");} else{ print(" - '\''[/"fin"/]#'\''");} }END{print(" - '\''[/programaddend/]#'\''")}' > /tmp/adguard.list grep programaddstart $configpath if [ "$?" == "0" ]; then sed -i '/programaddstart/,/programaddend/c\ - '\''\[\/programaddstart\/\]#'\''' $configpath sed -i '/programaddstart/'r/tmp/adguard.list $configpath else sed -i '1i\ - '\''[/programaddstart/]#'\''' /tmp/adguard.list
找到上面说的脚本里的这段代码vim打开,我这里已经是改好的,没改的话可以直接复制拿去替换,也可以自己手动把所有的-减号前面再加两个空格就行
-
No branches or pull requests
Issue Details
如题 添加gfw后启动不了,取消后成功启动
Screenshots
Screenshot:
log信息
2024/03/02 18:21:18.051652 26164#1 [error] parsing configuration file: parsing config file for upgrade: yaml: line 15: did not find expected key
2024/03/02 18:21:18.050078 26164#1 [debug] reading config file: /etc/AdGuardHome.yaml
2024/03/02 18:21:18.049520 26164#1 [debug] current working directory is /usr/bin/AdGuardHome
2024/03/02 18:21:18.048947 26164#1 [info] AdGuard Home, version v0.107.44
Additional Information
yaml文件
dns:
bind_hosts:
- 0.0.0.0
port: 533
anonymize_client_ip: false
ratelimit: 20
ratelimit_subnet_len_ipv4: 24
ratelimit_subnet_len_ipv6: 56
ratelimit_whitelist: []
refuse_any: true
upstream_dns:
upstream_dns_file: ""
bootstrap_dns:
fallback_dns: []
upstream_mode: parallel
fastest_timeout: 1s
allowed_clients: []
disallowed_clients: []
blocked_hosts:
trusted_proxies:
cache_size: 4194304
cache_ttl_min: 0
cache_ttl_max: 0
cache_optimistic: false
bogus_nxdomain: []
aaaa_disabled: false
enable_dnssec: false
edns_client_subnet:
custom_ip: ""
enabled: false
use_custom: false
max_goroutines: 300
handle_ddr: true
ipset: []
ipset_file: ""
bootstrap_prefer_ipv6: false
upstream_timeout: 10s
private_networks: []
use_private_ptr_resolvers: true
local_ptr_upstreams: []
use_dns64: false
dns64_prefixes: []
serve_http3: false
use_http3_upstreams: false
serve_plain_dns: true
The text was updated successfully, but these errors were encountered: