all: sync with master; upd chlog

This commit is contained in:
Ainar Garipov
2023-07-03 14:10:40 +03:00
parent cadb765b7d
commit b22b16d98c
140 changed files with 6739 additions and 2521 deletions

View File

@@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=AdGuard Home
Comment=Network-wide ads & trackers blocking DNS server
Exec=adguard-home.adguard-home-web
Icon=${SNAP}/meta/gui/adguard-home-web.png
Terminal=false

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

25
snap/local/adguard-home-web.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/sh
conf_file="${SNAP_DATA}/AdGuardHome.yaml"
readonly conf_file
if ! [ -f "$conf_file" ]
then
xdg-open 'http://localhost:3000'
exit
fi
# Get the admin interface port from the configuration.
awk_prog='/^[^[:space:]]/ { is_http = /^http:/ };/^[[:space:]]+address:/ { if (is_http) print $2 }'
readonly awk_prog
bind_port="$( awk "$awk_prog" "$conf_file" | awk -F ':' '{print $NF}' )"
readonly bind_port
if [ "$bind_port" = '' ]
then
xdg-open 'http://localhost:3000'
else
xdg-open "http://localhost:${bind_port}"
fi

42
snap/snap.tmpl.yaml Normal file
View File

@@ -0,0 +1,42 @@
# The %VARIABLES% are be replaced by actual values by the build script.
'name': 'adguard-home'
'base': 'core22'
'version': '%VERSION%'
'summary': Network-wide ads & trackers blocking DNS server
'description': |
AdGuard Home is a network-wide software for blocking ads & tracking. After
you set it up, it'll cover ALL your home devices, and you don't need any
client-side software for that.
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.
'grade': 'stable'
'confinement': 'strict'
'architectures':
- '%ARCH%'
'apps':
'adguard-home':
'command': 'AdGuardHome --no-check-update -w $SNAP_DATA'
'plugs':
# Add the "network-bind" plug to bind to interfaces.
- 'network-bind'
# Add the "network-observe" plug to be able to bind to ports below 1024
# (cap_net_bind_service) and also to bind to a particular interface using
# SO_BINDTODEVICE (cap_net_raw).
- 'network-observe'
# Add the "network-control" plug to be able to use raw sockets in the DHCP
# server.
#
# TODO(a.garipov): If this works, request auto-connect of this plug.
- 'network-control'
'daemon': 'simple'
'restart-condition': 'always'
'adguard-home-web':
'command': 'adguard-home-web.sh'
'plugs':
- 'desktop'