summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNebulosa2023-12-06 21:07:14 +0300
committerNebulosa2023-12-06 21:07:14 +0300
commit6be5be085717c9dd96afae093840952a13e0762c (patch)
treeb5cc3df765b3b170e3f15d55f975a73361c34057
parent3a4cf25ef0a4e34bf039b35fde35b0714ad70a4e (diff)
downloadaur-6be5be085717c9dd96afae093840952a13e0762c.tar.gz
Update to 0.5.3
-rw-r--r--.SRCINFO33
-rw-r--r--PKGBUILD46
-rw-r--r--wgui.path (renamed from wg-reload.path)0
-rw-r--r--wgui.service (renamed from wg-reload.service)2
-rw-r--r--wireguard-ui.install53
-rw-r--r--wireguard-ui.service21
6 files changed, 86 insertions, 69 deletions
diff --git a/.SRCINFO b/.SRCINFO
index bc2ab5fbce73..f97571434e1b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
pkgbase = wireguard-ui-bin
pkgdesc = A web user interface to manage your WireGuard setup.
- pkgver = 0.5.2
- pkgrel = 4
- url = https://github.com/ngoduykhanh/wireguard-ui
+ pkgver = 0.5.3
+ pkgrel = 1
+ url = https://github.com/wireguard-ui/wireguard-ui
install = wireguard-ui.install
arch = i686
arch = x86_64
@@ -11,27 +11,26 @@ pkgbase = wireguard-ui-bin
license = MIT
depends = bash
depends = wireguard-tools
- provides = wireguard-ui
conflicts = wireguard-ui
- source = https://raw.githubusercontent.com/ngoduykhanh/wireguard-ui/master/LICENSE
+ source = https://raw.githubusercontent.com/wireguard-ui/wireguard-ui/master/LICENSE
source = wireguard-ui.service
source = 99-wg.conf
source = wgiptables.sh
- source = wg-reload.path
- source = wg-reload.service
+ source = wgui.path
+ source = wgui.service
sha256sums = e693e8a42aab8dfe07bb9210b5ab54facf61c1248b7f69a622791f293a22cf96
- sha256sums = c60cbe2d47c616a2f9984c6c57ef60e810c7e57ca5054a318b3da8770bf03b76
+ sha256sums = 99df93fd8e6916ddad872e9a1bee496de5173bc544dc2c09f5c2a688b8deac76
sha256sums = cf5bdce2ce87b5054042a70d8630f40a0f991c64c42786824f660245b943d2be
sha256sums = bc8b1cee00a541eab44dab5bd23afddb99d9c667a5d4d083d7bf9575b321052c
sha256sums = 4b63dee5d287bb16a8e1a588ba24ccaeb91a4e0d2993bfeb9a1fb423bf08432d
- sha256sums = 44d74ce9057193a34e2c6afc4996188bc9b26594cdb691f96076d1986b615e4f
- source_i686 = https://github.com/ngoduykhanh/wireguard-ui/releases/download/v0.5.2/wireguard-ui-v0.5.2-linux-386.tar.gz
- sha256sums_i686 = 60e2f0005f60b01e10feb65941fa2ad6e919cde1d8004eaacca713a4cea0ee7d
- source_x86_64 = https://github.com/ngoduykhanh/wireguard-ui/releases/download/v0.5.2/wireguard-ui-v0.5.2-linux-amd64.tar.gz
- sha256sums_x86_64 = f1f13fbc548cd28bf41e9517ccb2e3564f4d9f893d174bfa20f7a61d18e954c5
- source_armv7h = https://github.com/ngoduykhanh/wireguard-ui/releases/download/v0.5.2/wireguard-ui-v0.5.2-linux-arm.tar.gz
- sha256sums_armv7h = b15c8ff43d09fa1d63aa63aa185a8a5b9f4ece02ebf67e9aa5152888d4a6be6b
- source_aarch64 = https://github.com/ngoduykhanh/wireguard-ui/releases/download/v0.5.2/wireguard-ui-v0.5.2-linux-arm64.tar.gz
- sha256sums_aarch64 = 024eb6da74f450a0f2715cc233573b714fdba14dbf9fd229ed1479bbd4e83ea6
+ sha256sums = 6722f8665bcf91c724f754a756a61a9933999da93943fb8d788a9d6b82e1de40
+ source_i686 = https://github.com/wireguard-ui/wireguard-ui/releases/download/v0.5.3/wireguard-ui-v0.5.3-linux-386.tar.gz
+ sha256sums_i686 = c55ae2f6e316c90762cdb3bd2377cc583a37bed98f64d08dd1a578b16420e61c
+ source_x86_64 = https://github.com/wireguard-ui/wireguard-ui/releases/download/v0.5.3/wireguard-ui-v0.5.3-linux-amd64.tar.gz
+ sha256sums_x86_64 = 9da61adc68868fe1a1e9e1c40e47d65a18551dabe146b5389cd3e21f4d03ef50
+ source_armv7h = https://github.com/wireguard-ui/wireguard-ui/releases/download/v0.5.3/wireguard-ui-v0.5.3-linux-arm.tar.gz
+ sha256sums_armv7h = ad3e68bc0a445c97b9c041dafa3339abcb5c563f4856aaa33449bae2b3473fde
+ source_aarch64 = https://github.com/wireguard-ui/wireguard-ui/releases/download/v0.5.3/wireguard-ui-v0.5.3-linux-arm64.tar.gz
+ sha256sums_aarch64 = 00efafd1a9f9e19c116eccb84661abc51cb3df6c391e3b38cc14d82d4af58b27
pkgname = wireguard-ui-bin
diff --git a/PKGBUILD b/PKGBUILD
index 3f15427bf138..7909cf111a06 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,42 +1,42 @@
# Maintainer: Nebulosa <nebulosa2007-at-yandex-dot-ru>
pkgname=wireguard-ui-bin
-pkgver=0.5.2
-pkgrel=4
+pkgver=0.5.3
+pkgrel=1
pkgdesc="A web user interface to manage your WireGuard setup."
arch=(i686 x86_64 armv7h aarch64)
-url="https://github.com/ngoduykhanh/${pkgname%-bin}"
+url="https://github.com/${pkgname%-bin}/${pkgname%-bin}"
license=(MIT)
-source=(https://raw.githubusercontent.com/ngoduykhanh/${pkgname%-bin}/master/LICENSE
- ${pkgname%-bin}.service
- 99-wg.conf
- wgiptables.sh
- wg-reload.path
- wg-reload.service)
+depends=(bash wireguard-tools)
source_i686=(${url}/releases/download/v${pkgver}/${pkgname%-bin}-v${pkgver}-linux-386.tar.gz)
source_x86_64=(${url}/releases/download/v${pkgver}/${pkgname%-bin}-v${pkgver}-linux-amd64.tar.gz)
source_armv7h=(${url}/releases/download/v${pkgver}/${pkgname%-bin}-v${pkgver}-linux-arm.tar.gz)
source_aarch64=(${url}/releases/download/v${pkgver}/${pkgname%-bin}-v${pkgver}-linux-arm64.tar.gz)
+source=(https://raw.githubusercontent.com/${pkgname%-bin}/${pkgname%-bin}/master/LICENSE
+ ${pkgname%-bin}.service
+ 99-wg.conf
+ wgiptables.sh
+ wgui.path
+ wgui.service)
+sha256sums_i686=('c55ae2f6e316c90762cdb3bd2377cc583a37bed98f64d08dd1a578b16420e61c')
+sha256sums_x86_64=('9da61adc68868fe1a1e9e1c40e47d65a18551dabe146b5389cd3e21f4d03ef50')
+sha256sums_armv7h=('ad3e68bc0a445c97b9c041dafa3339abcb5c563f4856aaa33449bae2b3473fde')
+sha256sums_aarch64=('00efafd1a9f9e19c116eccb84661abc51cb3df6c391e3b38cc14d82d4af58b27')
sha256sums=('e693e8a42aab8dfe07bb9210b5ab54facf61c1248b7f69a622791f293a22cf96'
- 'c60cbe2d47c616a2f9984c6c57ef60e810c7e57ca5054a318b3da8770bf03b76'
+ '99df93fd8e6916ddad872e9a1bee496de5173bc544dc2c09f5c2a688b8deac76'
'cf5bdce2ce87b5054042a70d8630f40a0f991c64c42786824f660245b943d2be'
'bc8b1cee00a541eab44dab5bd23afddb99d9c667a5d4d083d7bf9575b321052c'
'4b63dee5d287bb16a8e1a588ba24ccaeb91a4e0d2993bfeb9a1fb423bf08432d'
- '44d74ce9057193a34e2c6afc4996188bc9b26594cdb691f96076d1986b615e4f')
-sha256sums_i686=('60e2f0005f60b01e10feb65941fa2ad6e919cde1d8004eaacca713a4cea0ee7d')
-sha256sums_x86_64=('f1f13fbc548cd28bf41e9517ccb2e3564f4d9f893d174bfa20f7a61d18e954c5')
-sha256sums_armv7h=('b15c8ff43d09fa1d63aa63aa185a8a5b9f4ece02ebf67e9aa5152888d4a6be6b')
-sha256sums_aarch64=('024eb6da74f450a0f2715cc233573b714fdba14dbf9fd229ed1479bbd4e83ea6')
-depends=(bash wireguard-tools)
+ '6722f8665bcf91c724f754a756a61a9933999da93943fb8d788a9d6b82e1de40')
conflicts=(${pkgname%-bin})
-provides=(${pkgname%-bin})
install=${pkgname%-bin}.install
+
package() {
- install -Dm644 LICENSE -t ${pkgdir}/usr/share/licenses/${pkgname%-bin}/
- install -Dm755 ${pkgname%-bin} -t ${pkgdir}/opt/${pkgname%-bin}/
- install -Dm644 ${srcdir}/${pkgname%-bin}.service -t ${pkgdir}/usr/lib/systemd/system/
- install -Dm644 ${srcdir}/99-wg.conf -t ${pkgdir}/etc/sysctl.d
- install -Dm755 ${srcdir}/wgiptables.sh ${pkgdir}/opt/${pkgname%-bin}/wgiptables
- install -Dm644 ${srcdir}/wg-reload.{path,service} -t ${pkgdir}/usr/lib/systemd/system/
+ install -Dm644 LICENSE -t ${pkgdir}/usr/share/licenses/${pkgname}/
+ install -Dm755 ${pkgname%-bin} -t ${pkgdir}/usr/bin/
+ install -Dm755 ${srcdir}/wgiptables.sh ${pkgdir}/usr/bin/wgiptables
+ install -Dm644 ${srcdir}/${pkgname%-bin}.service -t ${pkgdir}/usr/lib/systemd/system/
+ install -Dm644 ${srcdir}/wgui.{path,service} -t ${pkgdir}/usr/lib/systemd/system/
+ install -Dm644 ${srcdir}/99-wg.conf -t ${pkgdir}/etc/sysctl.d/
}
diff --git a/wg-reload.path b/wgui.path
index 93f1f2ad6b21..93f1f2ad6b21 100644
--- a/wg-reload.path
+++ b/wgui.path
diff --git a/wg-reload.service b/wgui.service
index d3810204db35..027fbbd8e132 100644
--- a/wg-reload.service
+++ b/wgui.service
@@ -7,4 +7,4 @@ Type=oneshot
ExecStart=/usr/bin/systemctl restart wg-quick@wg0.service
[Install]
-RequiredBy=wg-reload.path
+RequiredBy=wgui.path
diff --git a/wireguard-ui.install b/wireguard-ui.install
index 4914b6d7292e..7369ceb7e7e3 100644
--- a/wireguard-ui.install
+++ b/wireguard-ui.install
@@ -12,36 +12,43 @@ note() {
}
post_install() {
- sysctl -q --system
- systemctl --quiet daemon-reload
- echo
- noteb "Please start and enable service:"
- echo "sudo systemctl enable --now wireguard-ui"
- echo
- note "Then open in browser http://<ip_server>:5000"
- noteb "The default username and password are 'admin'. Please change it to secure your setup!"
- echo
- noteb "REQUIRED: Also specify in server settings PostUp and PostDown scripts:"
- echo "PostUp: '/opt/wireguard-ui/wgiptables up'"
- echo "PostDown: '/opt/wireguard-ui/wgiptables down'"
- echo
- noteb "Then save server settings and finally start wg server:"
- echo "sudo systemctl enable --now wg-reload.{service,path}"
- echo
+ sysctl -q --system
+ systemctl --quiet daemon-reload
+ useradd -r -U -s /usr/bin/nologin -m -d /var/lib/wireguard-ui wireguard-ui
+ [ ! -f "/etc/wireguard/wg0.conf" ] && { mkdir -p /etc/wireguard/; touch /etc/wireguard/wg0.conf; }
+ setfacl -m wireguard-ui:rw /etc/wireguard/wg0.conf
+ echo
+ noteb "Please start and enable service:"
+ echo "sudo systemctl enable --now wireguard-ui"
+ echo
+ note "Then open in browser http://<ip_server>:5000"
+ noteb "The default username and password are 'admin'. Please change it to secure your setup!"
+ echo
+ noteb "REQUIRED: Also specify in server settings PostUp and PostDown scripts:"
+ echo "PostUp: '/usr/bin/wgiptables up'"
+ echo "PostDown: '/usr/bin/wgiptables down'"
+ echo
+ noteb "Then save server settings and finally start wg server:"
+ echo "sudo systemctl enable --now wgui.{service,path}"
+ echo
+ noteb "Optional: Also you could create /etc/wireguard-ui/environment.conf file."
+ echo "More info: https://github.com/ngoduykhanh/wireguard-ui#environment-variables"
+ echo
}
post_upgrade() {
- post_install
+ sysctl -q --system
+ systemctl --quiet daemon-reload
}
pre_remove() {
- systemctl --quiet --no-reload disable --now wireguard-ui.service
- systemctl --quiet --no-reload disable --now wg-reload.path
- systemctl --quiet --no-reload disable --now wg-reload.service
+ systemctl --quiet --no-reload disable --now wireguard-ui.service
+ systemctl --quiet --no-reload disable --now wgui.path
+ systemctl --quiet --no-reload disable --now wgui.service
}
post_remove() {
- note "Old settings are located in /opt/wireguard-ui/db, skip removing."
- systemctl --quiet daemon-reload
- sysctl -q --system
+ note "Old settings are located in /var/lib/wireguard-ui/db, skip removing."
+ systemctl --quiet daemon-reload
+ sysctl -q --system
}
diff --git a/wireguard-ui.service b/wireguard-ui.service
index 5657e773842a..a16fd606651a 100644
--- a/wireguard-ui.service
+++ b/wireguard-ui.service
@@ -1,12 +1,23 @@
[Unit]
-Description=Wireguard web interface
+Description=A web user interface to manage your WireGuard setup
Documentation=https://github.com/ngoduykhanh/wireguard-ui
-Wants=network-online.target
-After=network-online.target nss-lookup.target
+ConditionPathExists=/var/lib/wireguard-ui
+After=network.target
[Service]
-WorkingDirectory=/opt/wireguard-ui
-ExecStart=/opt/wireguard-ui/wireguard-ui
+Type=simple
+User=wireguard-ui
+Group=wireguard-ui
+
+CapabilityBoundingSet=CAP_DAC_READ_SEARCH CAP_NET_ADMIN CAP_NET_RAW
+AmbientCapabilities=CAP_DAC_READ_SEARCH CAP_NET_ADMIN CAP_NET_RAW
+
+WorkingDirectory=/var/lib/wireguard-ui
+EnvironmentFile=-/etc/wireguard-ui/environment.conf
+ExecStart=/usr/bin/wireguard-ui
+
+Restart=on-failure
+RestartSec=10
[Install]
WantedBy=multi-user.target