Skip to content

Commit

Permalink
Merge pull request #9 from samicrusader/develop
Browse files Browse the repository at this point in the history
pull develop into master
  • Loading branch information
samicrusader authored Sep 13, 2022
2 parents f2cc23f + eda3545 commit cd777bb
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
upcoming_changes.txt
arch_temppackage/
arch_temppackage/
debian/python3-qomui*
debian/*.deb
debian/qomui-build/
9 changes: 9 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Package: python3-qomui
Version: xversion
Architecture: all
Maintainer: samicrusader <[email protected]>
Depends: python3, python3-bs4, python3-pexpect, python3-psutil, python3-requests, python3-lxml, python3-pyqt5, python3-dbus, openvpn, stunnel4, dnsutils, python3-cryptography, wireguard, iptables, geoip-bin, dnsmasq, libcgroup1, python3-netifaces, python3-dbus.mainloop.pyqt5
Installed-Size: in_kb
Homepage: https://github.com/samicrusader/qomui
Description: Qomui (Qt OpenVPN Management UI)
Qomui (Qt OpenVPN Management UI) is an easy-to-use OpenVPN/WireGuard gui for GNU/Linux with some unique features such as provider-independent support for double-hop connections. Qomui supports multiple providers with added convenience when using AirVPN, PIA, ProtonVPN, Windscribe or Mullvad.
22 changes: 22 additions & 0 deletions debian/package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
rm ./*.deb

/usr/bin/env git clone https://github.com/samicrusader/qomui.git qomui-build
cd qomui-build
version="$(git describe --long --tags | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g')"
pkgdir=python3-qomui_"$version"_all
mkdir -p "../$pkgdir/DEBIAN"
/usr/bin/env python3 setup.py build
/usr/bin/env python3 setup.py test
/usr/bin/env python3 setup.py install --root="../$pkgdir" --optimize=1 --skip-build
cd ./..
mkdir -p "$pkgdir/usr/lib/python3/dist-packages"
mv "$pkgdir"/usr/lib/python3.*/site-packages/qomui* "$pkgdir/usr/lib/python3/dist-packages"
rm -r "$pkgdir"/usr/lib/python3.*
size="$(du --apparent-size --block-size=K --summarize "$pkgdir/usr/" | cut -f -1)"

cp {control,postinst,prerm} "$pkgdir/DEBIAN"
/usr/bin/env sed -i "s/xversion/$version/g" "$pkgdir/DEBIAN/control"
/usr/bin/env sed -i "s/in_kb/$size/g" "$pkgdir/DEBIAN/control"
/usr/bin/env dpkg-deb --build --root-owner-group "$pkgdir"
rm -rf qomui-build "$pkgdir"
2 changes: 2 additions & 0 deletions debian/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
systemctl enable --now qomui.service
2 changes: 2 additions & 0 deletions debian/prerm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
systemctl disable --now qomui.service
2 changes: 1 addition & 1 deletion qomui/firewall.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def add_rule(rule, check=0, ipt="ip4"):

except CalledProcessError:
logging.warning(
f"iptables: failed to apply {' '.join(ip_cmd + rule)}: {iptables_exception}")
f"iptables: failed to apply: {iptables_exception}")


def apply_rules(opt, block_lan=0, preserve=0):
Expand Down
2 changes: 1 addition & 1 deletion qomui/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def default_gateway_check(self):

except (CalledProcessError, IndexError):
self.log.emit(
('error',
('info',
'Could not identify default gateway for ipv6 - no network connectivity'))
default_gateway_6 = "None"
default_interface_6 = "None"
Expand Down

0 comments on commit cd777bb

Please sign in to comment.