1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/adguardhome_ynh.git synced 2024-09-03 18:06:23 +02:00

Merge pull request #97 from YunoHost-Apps/testing

Update install
This commit is contained in:
DDATAA 2023-03-13 13:04:19 +00:00 committed by GitHub
commit 8c6c21f567
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 40 additions and 28 deletions

View file

@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Fetch the source code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run the updater script
@ -33,7 +33,7 @@ jobs:
- name: Create Pull Request
id: cpr
if: ${{ env.PROCEED == 'true' }}
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update to version ${{ env.VERSION }}

View file

@ -21,7 +21,7 @@ AdGuard Home is a network-wide software for blocking ads & tracking. After you s
It operates as a DNS server that re-routes tracking domains to a "black hole", thus preventing your devices from connecting to those servers. It's based on software we use for our public AdGuard DNS servers -- both share a lot of common code.
**Shipped version:** 0.107.25~ynh1
**Shipped version:** 0.107.26~ynh1
## Screenshots

View file

@ -21,7 +21,7 @@ AdGuard Home est un logiciel à l'échelle du réseau pour bloquer les publicit
Il fonctionne comme un serveur DNS qui redirige les domaines de pistage vers un "trou noir", empêchant ainsi vos appareils de se connecter à ces serveurs. Il est basé sur un logiciel que nous utilisons pour nos serveurs DNS publics AdGuard - les deux partagent beaucoup de code commun.
**Version incluse :** 0.107.25~ynh1
**Version incluse :** 0.107.26~ynh1
## Captures décran

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/AdguardTeam/AdGuardHome/releases/download/v0.107.25/AdGuardHome_linux_amd64.tar.gz
SOURCE_SUM=a43d6fb38347581c99984a33760a730570de4b36c4068bb26b0778d4499ff101
SOURCE_URL=https://github.com/AdguardTeam/AdGuardHome/releases/download/v0.107.26/AdGuardHome_linux_amd64.tar.gz
SOURCE_SUM=022e90ce636b00b1cac49217e60c7919088b95ca4a46e4fe00bc4dd0f0c943d1
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=2

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/AdguardTeam/AdGuardHome/releases/download/v0.107.25/AdGuardHome_linux_arm64.tar.gz
SOURCE_SUM=0699273bda8be09a37d5dfef4578ee53fc0959f095bcb7e087ab592c6ffa8a92
SOURCE_URL=https://github.com/AdguardTeam/AdGuardHome/releases/download/v0.107.26/AdGuardHome_linux_arm64.tar.gz
SOURCE_SUM=709eefbefe18ca8d2bd3578eb9923a8ea7382c59920e6565f386898f0c64b91e
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=2

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/AdguardTeam/AdGuardHome/releases/download/v0.107.25/AdGuardHome_linux_armv7.tar.gz
SOURCE_SUM=30ebc32afab6e3e3459a0b1e659037cf3d33e95affecebcef2c1e9b035af32ea
SOURCE_URL=https://github.com/AdguardTeam/AdGuardHome/releases/download/v0.107.26/AdGuardHome_linux_armv7.tar.gz
SOURCE_SUM=387a14f1d3f96f68ea1537e7e050b12fcf07ad09ed7316797a7305aff60dd732
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=2

View file

@ -6,7 +6,7 @@
"en": "Network-wide ads & trackers blocking DNS server",
"fr": "Serveur DNS, bloqueur de publicités et trackers"
},
"version": "0.107.25~ynh1",
"version": "0.107.26~ynh1",
"url": "https://adguard.com/adguard-home.html",
"upstream": {
"license": "GPL-3.0",
@ -18,7 +18,7 @@
},
"license": "GPL-3.0",
"maintainer": {
"name": "",
"name": "ddataa",
"email": ""
},
"requirements": {

View file

@ -54,6 +54,15 @@ ynh_app_setting_set --app=$app --key=admin --value=$admin
if [ "$dns_over_https" == "1" ];
then
dns_over_https="true"
# DNS over TLS
adguard_DoT_port=853
ynh_app_setting_set --app=$app --key=adguard_DoT_port --value=$adguard_DoT_port
ynh_exec_warn_less yunohost firewall allow --no-upnp UDP $adguard_DoT_port
ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $adguard_DoT_port
# DNS over QUIC
adguard_DoQ_port=784
ynh_app_setting_set --app=$app --key=adguard_DoQ_port --value=$adguard_DoQ_port
ynh_exec_warn_less yunohost firewall allow --no-upnp UDP $adguard_DoQ_port
else
dns_over_https="false"
fi
@ -76,6 +85,7 @@ ynh_app_setting_set --app=$app --key=adguard_port --value=$adguard_port
# Disable the port 53 for upnp
ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $adguard_port
ynh_exec_warn_less yunohost firewall allow --no-upnp UDP $adguard_port
#=================================================
# INSTALL DEPENDENCIES
@ -130,18 +140,14 @@ if [ -z "$ipv4_interface" ] && [ -z "$ipv6_interface" ]; then
ynh_die --message="Impossible to find the main network interface, please report this issue."
elif [ "$ipv4_interface" != "$ipv6_interface" ]; then
if [ -z "$ipv4_interface" ]; then
echo "bind-interfaces
except-interface=$ipv6_interface" > "/etc/dnsmasq.d/$app"
echo -e "bind-interface\nexcept-interface=$ipv6_interface" > "/etc/dnsmasq.d/$app"
elif [ -z "$ipv6_interface" ]; then
echo "bind-interfaces
except-interface=$ipv4_interface" > "/etc/dnsmasq.d/$app"
echo -e "bind-interfaces\nexcept-interface=$ipv4_interface" > "/etc/dnsmasq.d/$app"
else
echo "bind-interfaces
except-interface=$ipv4_interface, $ipv6_interface" > "/etc/dnsmasq.d/$app"
echo -e "bind-interfaces\nexcept-interface=$ipv4_interface, $ipv6_interface" > "/etc/dnsmasq.d/$app"
fi
else
echo "bind-interfaces
except-interface=$ipv4_interface" > "/etc/dnsmasq.d/$app"
echo -e "bind-interfaces\nexcept-interface=$ipv4_interface" > "/etc/dnsmasq.d/$app"
fi
systemctl restart dnsmasq

View file

@ -58,6 +58,7 @@ ynh_systemd_action --service_name=$app --action="stop"
# Disable the port 53 for upnp
ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $adguard_port
ynh_exec_warn_less yunohost firewall allow --no-upnp UDP $adguard_port
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
@ -86,6 +87,15 @@ if [ -n "$dns_over_https" ] && [ "$dns_over_https" == "1" ];
then
dns_over_https="true"
ynh_app_setting_set --app=$app --key=dns_over_https --value=$dns_over_https
# DNS over TLS
adguard_DoT_port=853
ynh_app_setting_set --app=$app --key=adguard_DoT_port --value=$adguard_DoT_port
ynh_exec_warn_less yunohost firewall allow --no-upnp UDP $adguard_DoT_port
ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $adguard_DoT_port
# DNS over QUIC
adguard_DoQ_port=784
ynh_app_setting_set --app=$app --key=adguard_DoQ_port --value=$adguard_DoQ_port
ynh_exec_warn_less yunohost firewall allow --no-upnp UDP $adguard_DoQ_port
elif [ -z "$dns_over_https" ] || [ "$dns_over_https" == "0" ];
then
dns_over_https="false"
@ -147,18 +157,14 @@ if [ -z "$ipv4_interface" ] && [ -z "$ipv6_interface" ]; then
ynh_die --message="Impossible to find the main network interface, please report this issue."
elif [ "$ipv4_interface" != "$ipv6_interface" ]; then
if [ -z "$ipv4_interface" ]; then
echo "bind-interfaces
except-interface=$ipv6_interface" > "/etc/dnsmasq.d/$app"
echo -e "bind-interfaces\nexcept-interface=$ipv6_interface" > "/etc/dnsmasq.d/$app"
elif [ -z "$ipv6_interface" ]; then
echo "bind-interfaces
except-interface=$ipv4_interface" > "/etc/dnsmasq.d/$app"
echo -e "bind-interfaces\nexcept-interface=$ipv4_interface" > "/etc/dnsmasq.d/$app"
else
echo "bind-interfaces
except-interface=$ipv4_interface, $ipv6_interface" > "/etc/dnsmasq.d/$app"
echo -e "bind-interfaces\nexcept-interface=$ipv4_interface, $ipv6_interface" > "/etc/dnsmasq.d/$app"
fi
else
echo "bind-interfaces
except-interface=$ipv4_interface" > "/etc/dnsmasq.d/$app"
echo -e "bind-interfaces\nexcept-interface=$ipv4_interface" > "/etc/dnsmasq.d/$app"
fi
systemctl restart dnsmasq