diff options
author | Nebulosa | 2024-03-24 18:14:35 +0300 |
---|---|---|
committer | Nebulosa | 2024-03-24 18:14:35 +0300 |
commit | a599a6626630680ea6755aa98c673d161cf74c60 (patch) | |
tree | 2727bfc675fd670638fc2d79d5e3df95bb916ff8 | |
parent | f01dcc6bfaa92df847384a066fe1033aa7045ae1 (diff) | |
download | aur-a599a6626630680ea6755aa98c673d161cf74c60.tar.gz |
Update to 0.6.2-4
-rw-r--r-- | .SRCINFO | 28 | ||||
-rw-r--r-- | PKGBUILD | 36 | ||||
-rw-r--r-- | wgiptables.sh | 38 |
3 files changed, 56 insertions, 46 deletions
@@ -1,17 +1,19 @@ pkgbase = wireguard-ui-bin - pkgdesc = Web user interface to manage your WireGuard setup. + pkgdesc = Web user interface to manage your WireGuard setup pkgver = 0.6.2 - pkgrel = 3 + pkgrel = 4 url = https://github.com/ngoduykhanh/wireguard-ui install = wireguard-ui.install + arch = aarch64 + arch = armv7h arch = i686 arch = x86_64 - arch = armv7h - arch = aarch64 license = MIT depends = wireguard-tools + provides = wireguard-ui conflicts = wireguard-ui options = !debug + backup = usr/bin/wgiptables source = https://raw.githubusercontent.com/ngoduykhanh/wireguard-ui/master/LICENSE source = wireguard-ui.service source = 99-wg.conf @@ -21,9 +23,17 @@ pkgbase = wireguard-ui-bin b2sums = e80645832ae08d6f693cfbc7834085effefef046ce6d09fcca4bc4c17b7a2e7ab74d0b34575999493876cc314ae73137ad16257b84dd0f2365e8af5ec7f6251c b2sums = 89d9e0ccc55a2b01b7625ddc7da70a260960c77e1fc2c876cd92934e41bb59bef2097af56813ab8cad1f8db7dc596fd5500f324722b626abeb4a8fa4b303a703 b2sums = 9c018527a70120edbf2bd70279e61c1f257158e70f7c74d73ed74ec449b02538bae2ccacb722106eb66002e8704d51ffc279052f3e590691102d6577db346923 - b2sums = a957349fabd2e962fd59ab6542f3500ba429c18d97050d06165f1ac59dc101fcfb50f35f83ac738e05bca90bcc41e07bb9d40dab96f08f4c92e88aebcd2b8a52 + b2sums = a71cb02226b039b569cf22e7f1be6a9b5ec3cf096128b3a091141ca15192c59ef2c7f4989d04532ccdf6df1ce5f59ed1d4026a069793c343dd208332ee2f744a b2sums = d7ea6f2c405abd6b2a07e6c216387e8eb085476899e8bf6101cbed41115934816d0362e2030e3165b481314d65b88adcc5bd4928071e34ceb602fa45ffe1db4d b2sums = f7045f01d73757129cc98675d7fa87b477b780548fe2d72562c2aef33bdfb87c661fd6306c6e55a1d757f9c920bbcdc80f38f32b2a38df7029e5413ddc0b03aa + source_aarch64 = https://github.com/ngoduykhanh/wireguard-ui/releases/download/v0.6.2/wireguard-ui-v0.6.2-linux-arm64.tar.gz + source_aarch64 = https://github.com/ngoduykhanh/wireguard-ui/releases/download/v0.6.2/wireguard-ui-v0.6.2-linux-arm64.tar.gz.md5 + md5sums_aarch64 = 7098a40bf6f12c04afd279375c37ac92 + md5sums_aarch64 = SKIP + source_armv7h = https://github.com/ngoduykhanh/wireguard-ui/releases/download/v0.6.2/wireguard-ui-v0.6.2-linux-arm.tar.gz + source_armv7h = https://github.com/ngoduykhanh/wireguard-ui/releases/download/v0.6.2/wireguard-ui-v0.6.2-linux-arm.tar.gz.md5 + md5sums_armv7h = 61a87fd1b3f256095341b7f1ae1a095a + md5sums_armv7h = SKIP source_i686 = https://github.com/ngoduykhanh/wireguard-ui/releases/download/v0.6.2/wireguard-ui-v0.6.2-linux-386.tar.gz source_i686 = https://github.com/ngoduykhanh/wireguard-ui/releases/download/v0.6.2/wireguard-ui-v0.6.2-linux-386.tar.gz.md5 md5sums_i686 = 2ab2666093261b7529369d3c64666a78 @@ -32,13 +42,5 @@ pkgbase = wireguard-ui-bin source_x86_64 = https://github.com/ngoduykhanh/wireguard-ui/releases/download/v0.6.2/wireguard-ui-v0.6.2-linux-amd64.tar.gz.md5 md5sums_x86_64 = 9f5f16950101409218fe80ac0a4b3cce md5sums_x86_64 = SKIP - source_armv7h = https://github.com/ngoduykhanh/wireguard-ui/releases/download/v0.6.2/wireguard-ui-v0.6.2-linux-arm.tar.gz - source_armv7h = https://github.com/ngoduykhanh/wireguard-ui/releases/download/v0.6.2/wireguard-ui-v0.6.2-linux-arm.tar.gz.md5 - md5sums_armv7h = 61a87fd1b3f256095341b7f1ae1a095a - md5sums_armv7h = SKIP - source_aarch64 = https://github.com/ngoduykhanh/wireguard-ui/releases/download/v0.6.2/wireguard-ui-v0.6.2-linux-arm64.tar.gz - source_aarch64 = https://github.com/ngoduykhanh/wireguard-ui/releases/download/v0.6.2/wireguard-ui-v0.6.2-linux-arm64.tar.gz.md5 - md5sums_aarch64 = 7098a40bf6f12c04afd279375c37ac92 - md5sums_aarch64 = SKIP pkgname = wireguard-ui-bin @@ -2,14 +2,16 @@ pkgname=wireguard-ui-bin pkgver=0.6.2 -pkgrel=3 -pkgdesc="Web user interface to manage your WireGuard setup." -arch=(i686 x86_64 armv7h aarch64) +pkgrel=4 +pkgdesc="Web user interface to manage your WireGuard setup" +arch=(aarch64 armv7h i686 x86_64) url="https://github.com/ngoduykhanh/${pkgname%-bin}" license=(MIT) depends=(wireguard-tools) +provides=(${pkgname%-bin}) conflicts=(${pkgname%-bin}) options=(!debug) +backup=(usr/bin/wgiptables) install=${pkgname%-bin}.install source=(https://raw.githubusercontent.com/ngoduykhanh/${pkgname%-bin}/master/LICENSE ${pkgname%-bin}.service @@ -17,26 +19,26 @@ source=(https://raw.githubusercontent.com/ngoduykhanh/${pkgname%-bin}/master/LIC wgiptables.sh wgui.path wgui.service) -source_i686=(${url}/releases/download/v${pkgver}/${pkgname%-bin}-v${pkgver}-linux-386.tar.gz{,.md5}) -source_x86_64=(${url}/releases/download/v${pkgver}/${pkgname%-bin}-v${pkgver}-linux-amd64.tar.gz{,.md5}) -source_armv7h=(${url}/releases/download/v${pkgver}/${pkgname%-bin}-v${pkgver}-linux-arm.tar.gz{,.md5}) -source_aarch64=(${url}/releases/download/v${pkgver}/${pkgname%-bin}-v${pkgver}-linux-arm64.tar.gz{,.md5}) +source_aarch64=($url/releases/download/v$pkgver/${pkgname%-bin}-v$pkgver-linux-arm64.tar.gz{,.md5}) +source_armv7h=($url/releases/download/v$pkgver/${pkgname%-bin}-v$pkgver-linux-arm.tar.gz{,.md5}) +source_i686=($url/releases/download/v$pkgver/${pkgname%-bin}-v$pkgver-linux-386.tar.gz{,.md5}) +source_x86_64=($url/releases/download/v$pkgver/${pkgname%-bin}-v$pkgver-linux-amd64.tar.gz{,.md5}) b2sums=('e80645832ae08d6f693cfbc7834085effefef046ce6d09fcca4bc4c17b7a2e7ab74d0b34575999493876cc314ae73137ad16257b84dd0f2365e8af5ec7f6251c' '89d9e0ccc55a2b01b7625ddc7da70a260960c77e1fc2c876cd92934e41bb59bef2097af56813ab8cad1f8db7dc596fd5500f324722b626abeb4a8fa4b303a703' '9c018527a70120edbf2bd70279e61c1f257158e70f7c74d73ed74ec449b02538bae2ccacb722106eb66002e8704d51ffc279052f3e590691102d6577db346923' - 'a957349fabd2e962fd59ab6542f3500ba429c18d97050d06165f1ac59dc101fcfb50f35f83ac738e05bca90bcc41e07bb9d40dab96f08f4c92e88aebcd2b8a52' + 'a71cb02226b039b569cf22e7f1be6a9b5ec3cf096128b3a091141ca15192c59ef2c7f4989d04532ccdf6df1ce5f59ed1d4026a069793c343dd208332ee2f744a' 'd7ea6f2c405abd6b2a07e6c216387e8eb085476899e8bf6101cbed41115934816d0362e2030e3165b481314d65b88adcc5bd4928071e34ceb602fa45ffe1db4d' 'f7045f01d73757129cc98675d7fa87b477b780548fe2d72562c2aef33bdfb87c661fd6306c6e55a1d757f9c920bbcdc80f38f32b2a38df7029e5413ddc0b03aa') -md5sums_i686=('2ab2666093261b7529369d3c64666a78' 'SKIP') -md5sums_x86_64=('9f5f16950101409218fe80ac0a4b3cce' 'SKIP') -md5sums_armv7h=('61a87fd1b3f256095341b7f1ae1a095a' 'SKIP') md5sums_aarch64=('7098a40bf6f12c04afd279375c37ac92' 'SKIP') +md5sums_armv7h=( '61a87fd1b3f256095341b7f1ae1a095a' 'SKIP') +md5sums_i686=( '2ab2666093261b7529369d3c64666a78' 'SKIP') +md5sums_x86_64=( '9f5f16950101409218fe80ac0a4b3cce' 'SKIP') package() { - 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/ + install -Dm644 99-wg.conf -t $pkgdir/etc/sysctl.d/ + install -Dm755 ${pkgname%-bin} -t $pkgdir/usr/bin/ + install -Dm755 wgiptables.sh $pkgdir/usr/bin/wgiptables + install -Dm644 ${pkgname%-bin}.service -t $pkgdir/usr/lib/systemd/system/ + install -Dm644 wgui.{path,service} -t $pkgdir/usr/lib/systemd/system/ + install -Dm644 LICENSE -t $pkgdir/usr/share/licenses/${pkgname%-bin}/ } diff --git a/wgiptables.sh b/wgiptables.sh index 55f0f12c4582..7c982aba8238 100644 --- a/wgiptables.sh +++ b/wgiptables.sh @@ -1,25 +1,31 @@ -#!/bin/bash +#!/bin/sh # From: https://github.com/angristan/wireguard-install SERVER_WG_NIC="wg0" #Default interface SERVER_PUB_NIC=$(ip -4 route ls | grep default | grep -Po '(?<=dev )(\S+)' | head -1) -SERVER_PORT=$(grep -Po '(?<=ListenPort = )(\S+)' "/etc/wireguard/"$SERVER_WG_NIC".conf") +SERVER_PORT=$(grep -Po '(?<=ListenPort = )(\S+)' "/etc/wireguard/$SERVER_WG_NIC.conf") -if [ "$1" == "up" ]; then - iptables -I INPUT -p udp --dport $SERVER_PORT -j ACCEPT - iptables -I FORWARD -i $SERVER_PUB_NIC -o $SERVER_WG_NIC -j ACCEPT - iptables -I FORWARD -i $SERVER_WG_NIC -j ACCEPT - iptables -t nat -A POSTROUTING -o $SERVER_PUB_NIC -j MASQUERADE - ip6tables -I FORWARD -i $SERVER_WG_NIC -j ACCEPT - ip6tables -t nat -A POSTROUTING -o $SERVER_PUB_NIC -j MASQUERADE +if [ "$1" = "up" ]; then + iptables -I INPUT -p udp --dport "$SERVER_PORT" -j ACCEPT + iptables -I FORWARD -i "$SERVER_PUB_NIC" -o $SERVER_WG_NIC -j ACCEPT + iptables -I FORWARD -i $SERVER_WG_NIC -j ACCEPT + iptables -t nat -A POSTROUTING -o "$SERVER_PUB_NIC" -j MASQUERADE + ip6tables -I FORWARD -i $SERVER_WG_NIC -j ACCEPT + ip6tables -t nat -A POSTROUTING -o "$SERVER_PUB_NIC" -j MASQUERADE + #Client isolation on + #iptables -I FORWARD -i $SERVER_WG_NIC -o $SERVER_WG_NIC -j REJECT --reject-with icmp-admin-prohibited + #ip6tables -I FORWARD -i $SERVER_WG_NIC -o $SERVER_WG_NIC -j REJECT --reject-with icmp6-adm-prohibited fi -if [ "$1" == "down" ]; then - iptables -D INPUT -p udp --dport $SERVER_PORT -j ACCEPT - iptables -D FORWARD -i $SERVER_PUB_NIC -o $SERVER_WG_NIC -j ACCEPT - iptables -D FORWARD -i $SERVER_WG_NIC -j ACCEPT - iptables -t nat -D POSTROUTING -o $SERVER_PUB_NIC -j MASQUERADE - ip6tables -D FORWARD -i $SERVER_WG_NIC -j ACCEPT - ip6tables -t nat -D POSTROUTING -o $SERVER_PUB_NIC -j MASQUERADE +if [ "$1" = "down" ]; then + iptables -D INPUT -p udp --dport "$SERVER_PORT" -j ACCEPT + iptables -D FORWARD -i "$SERVER_PUB_NIC" -o $SERVER_WG_NIC -j ACCEPT + iptables -D FORWARD -i $SERVER_WG_NIC -j ACCEPT + iptables -t nat -D POSTROUTING -o "$SERVER_PUB_NIC" -j MASQUERADE + ip6tables -D FORWARD -i $SERVER_WG_NIC -j ACCEPT + ip6tables -t nat -D POSTROUTING -o "$SERVER_PUB_NIC" -j MASQUERADE + #Client isolation rules delete + #iptables -D FORWARD -i $SERVER_WG_NIC -o $SERVER_WG_NIC -j REJECT --reject-with icmp-admin-prohibited + #ip6tables -I FORWARD -i $SERVER_WG_NIC -o $SERVER_WG_NIC -j REJECT --reject-with icmp6-adm-prohibited fi |