mirror of
https://github.com/YunoHost-Apps/adguardhome_ynh.git
synced 2024-09-03 18:06:23 +02:00
Fix doh
This commit is contained in:
parent
22f9e76d7f
commit
b458c7d97e
4 changed files with 23 additions and 6 deletions
|
@ -80,7 +80,7 @@ tls:
|
||||||
port_dns_over_quic: 784
|
port_dns_over_quic: 784
|
||||||
port_dnscrypt: 0
|
port_dnscrypt: 0
|
||||||
dnscrypt_config_file: ""
|
dnscrypt_config_file: ""
|
||||||
allow_unencrypted_doh: false
|
allow_unencrypted_doh: true
|
||||||
strict_sni_check: false
|
strict_sni_check: false
|
||||||
certificate_chain: ""
|
certificate_chain: ""
|
||||||
private_key: ""
|
private_key: ""
|
||||||
|
|
|
@ -17,8 +17,13 @@ location __PATH__/ {
|
||||||
include conf.d/yunohost_panel.conf.inc;
|
include conf.d/yunohost_panel.conf.inc;
|
||||||
}
|
}
|
||||||
|
|
||||||
#location ~ .*.(gif|jpg|jpeg|png|bmp|swf|css|js)$ {
|
location /dns-query {
|
||||||
# proxy_pass http://127.0.0.1:__PORT__;
|
proxy_set_header Host $http_host;
|
||||||
# proxy_set_header Host $host;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
# proxy_set_header X-Forwarded-For $remote_addr;
|
proxy_redirect off;
|
||||||
# }
|
proxy_buffering on;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_read_timeout 6s;
|
||||||
|
proxy_connect_timeout 6s;
|
||||||
|
proxy_pass http://127.0.0.1:__PORT__/dns-query;
|
||||||
|
}
|
||||||
|
|
|
@ -185,6 +185,13 @@ ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||||
|
|
||||||
yunohost service add $app --description="Ads & trackers blocking DNS server"
|
yunohost service add $app --description="Ads & trackers blocking DNS server"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# SETUP SSOWAT
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Configuring permissions..."
|
||||||
|
|
||||||
|
ynh_permission_create --permission="api" --label="api" --url="re:$domain/dns-query" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -37,6 +37,11 @@ if [ "$adguard_port" -ne "53" ]; then
|
||||||
ynh_app_setting_set --app=$app --key=adguard_port --value=$adguard_port
|
ynh_app_setting_set --app=$app --key=adguard_port --value=$adguard_port
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Create a permission if needed
|
||||||
|
if ! ynh_permission_exists --permission="api"; then
|
||||||
|
ynh_permission_create --permission="api" --label="api" --url="re:$domain/dns-query" --allowed="visitors" --auth_header="false" --show_tile="false" --protected="true"
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue