Last active
September 26, 2022 18:27
-
-
Save sfan5/dfc8fce485ef3c8038a484a131b311aa to your computer and use it in GitHub Desktop.
imagine if software just worked
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/properties/nm-openvpn-dialog.ui b/properties/nm-openvpn-dialog.ui | |
index cffbc2d..95c55c1 100644 | |
--- a/properties/nm-openvpn-dialog.ui | |
+++ b/properties/nm-openvpn-dialog.ui | |
@@ -52,8 +52,8 @@ | |
<property name="page_increment">10</property> | |
</object> | |
<object class="GtkAdjustment" id="adjustment8"> | |
- <property name="lower">1</property> | |
- <property name="upper">65535</property> | |
+ <property name="lower">0</property> | |
+ <property name="upper">2147483647</property> | |
<property name="value">30</property> | |
<property name="step_increment">1</property> | |
<property name="page_increment">10</property> | |
diff --git a/properties/nm-openvpn-editor.c b/properties/nm-openvpn-editor.c | |
index 2d0f204..432b69a 100644 | |
--- a/properties/nm-openvpn-editor.c | |
+++ b/properties/nm-openvpn-editor.c | |
@@ -1702,7 +1702,7 @@ advanced_dialog_new (GHashTable *hash, const char *contype) | |
value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_PING); | |
_builder_init_optional_spinbutton (builder, "ping_checkbutton", "ping_spinbutton", !!value, | |
- _nm_utils_ascii_str_to_int64 (value, 10, 1, 65535, 30)); | |
+ _nm_utils_ascii_str_to_int64 (value, 10, 0, INT_MAX, 30)); | |
/* ping-exit / ping-restart */ | |
@@ -1729,7 +1729,7 @@ advanced_dialog_new (GHashTable *hash, const char *contype) | |
gtk_combo_box_set_active ((GtkComboBox *) combo, active); | |
gtk_spin_button_set_value ((GtkSpinButton *) spin, | |
- (double) _nm_utils_ascii_str_to_int64 (value, 10, 1, 65535, 30)); | |
+ (double) _nm_utils_ascii_str_to_int64 (value, 10, 0, INT_MAX, 30)); | |
gtk_widget_set_sensitive (combo, !!value); | |
gtk_widget_set_sensitive (spin, !!value); | |
gtk_toggle_button_set_active ((GtkToggleButton *) widget, !!value); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/nm-openvpn-service.c b/src/nm-openvpn-service.c | |
index 034556f..fd0a7ed 100644 | |
--- a/src/nm-openvpn-service.c | |
+++ b/src/nm-openvpn-service.c | |
@@ -1456,8 +1456,13 @@ nm_openvpn_start_openvpn_binary (NMOpenvpnPlugin *plugin, | |
args_add_strv (args, "--allow-pull-fqdn"); | |
tmp = nm_setting_vpn_get_data_item (s_vpn, NM_OPENVPN_KEY_TUN_IPV6); | |
- if (nm_streq0 (tmp, "yes")) | |
+ if (nm_streq0 (tmp, "yes")) { | |
args_add_strv (args, "--tun-ipv6"); | |
+ args_add_strv0 (args, "--setenv", "UV_IPV6", "yes"); // AirVPN needs this | |
+ } else { | |
+ args_add_strv0 (args, "--pull-filter", "ignore", "ifconfig-ipv6 "); | |
+ args_add_strv0 (args, "--pull-filter", "ignore", "route-ipv6 "); | |
+ } | |
tmp = nm_setting_vpn_get_data_item (s_vpn, NM_OPENVPN_KEY_PROXY_TYPE); | |
tmp2 = nm_setting_vpn_get_data_item (s_vpn, NM_OPENVPN_KEY_PROXY_SERVER); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Jan Alexander Steffens (heftig) <[email protected]> | |
# Contributor: Ionut Biru <[email protected]> | |
pkgname=networkmanager-openvpn | |
pkgver=1.10.0 | |
pkgrel=1 | |
pkgdesc="NetworkManager VPN plugin for OpenVPN" | |
url="https://wiki.gnome.org/Projects/NetworkManager" | |
arch=(x86_64) | |
license=(GPL) | |
depends=(libnm libsecret openvpn) | |
makedepends=(libnma libnma-gtk4 intltool python git) | |
optdepends=('libnma: GUI support (GTK 3)' | |
'libnma-gtk4: GUI support (GTK 4)') | |
_commit=98d8b8b4e39338d00239676fe6e0318f92258f8e # tags/1.10.0^0 | |
source=("git+https://gitlab.gnome.org/GNOME/NetworkManager-openvpn.git#commit=$_commit" | |
fix_ping_restart_range.diff | |
ipv6_fixes.diff) | |
sha256sums=('SKIP' | |
'5e1f03ae0059b91b7a9fb88475b0b62d033fef6dc2bd510861b30ba9d3dcf59c' | |
'09c242e5fb26bf24594780ff1d1aee44a00af08964e122bbb5efa583103ea1fd') | |
pkgver() { | |
cd NetworkManager-openvpn | |
git describe --tags | sed 's/-dev/dev/;s/[^-]*-g/r&/;s/-/+/g' | |
} | |
prepare() { | |
cd NetworkManager-openvpn | |
autoreconf -fvi | |
git reset --hard | |
for src in "${source[@]}"; do | |
[[ "$src" == *.diff ]] && patch -p1 --verbose -i "../$src" | |
done | |
} | |
build() { | |
cd NetworkManager-openvpn | |
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ | |
--libexecdir=/usr/lib --disable-static --with-gtk4 | |
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool | |
make | |
} | |
package() { | |
cd NetworkManager-openvpn | |
make DESTDIR="$pkgdir" install dbusservicedir=/usr/share/dbus-1/system.d | |
echo 'u nm-openvpn - "NetworkManager OpenVPN"' | | |
install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/$pkgname.conf" | |
} | |
# vim:set sw=2 et: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment