diff options
-rwxr-xr-x | .SRCINFO | 9 | ||||
-rwxr-xr-x | PKGBUILD | 8 | ||||
-rw-r--r-- | add_mtu_config.patch | 35 |
3 files changed, 22 insertions, 30 deletions
@@ -1,20 +1,21 @@ pkgbase = vpncloud2 pkgdesc = Peer-to-peer VPN - pkgver = 2.0.1 - pkgrel = 5 + pkgver = 2.1.0 + pkgrel = 1 + url = https://vpncloud.ddswd.de/ arch = x86_64 license = GPL makedepends = rust makedepends = cargo makedepends = git depends = libsystemd - source = git+https://github.com/dswd/vpncloud.rs.git#tag=v2.0.1 + source = git+https://github.com/dswd/vpncloud.rs.git#tag=v2.1.0 source = sysusers.conf source = add_mtu_config.patch validpgpkeys = 6B5BBBCA2E3392315CC47434694A43B9C7FE6EA9 sha256sums = SKIP sha256sums = eb756f1f940838cfe35555ba9e8e07d0e7182a72ace03853256ec5b72b0e8fbf - sha256sums = b830058582bc276955569add40dd00be0ad2e94de58168494396419c82ed48ce + sha256sums = 1c8be008faa92063a38b8057ead443efb23a186f52b7c8315b0cac80910bd9ea pkgname = vpncloud2 @@ -1,9 +1,9 @@ pkgname=vpncloud2 -pkgver=2.0.1 -pkgrel=5 +pkgver=2.1.0 +pkgrel=1 pkgdesc='Peer-to-peer VPN' arch=('x86_64') -url="" +url="https://vpncloud.ddswd.de/" license=('GPL') depends=('libsystemd') makedepends=('rust' 'cargo' 'git') @@ -13,7 +13,7 @@ source=(git+https://github.com/dswd/vpncloud.rs.git#tag=v${pkgver} noextract=() sha256sums=('SKIP' 'eb756f1f940838cfe35555ba9e8e07d0e7182a72ace03853256ec5b72b0e8fbf' - 'b830058582bc276955569add40dd00be0ad2e94de58168494396419c82ed48ce') + '1c8be008faa92063a38b8057ead443efb23a186f52b7c8315b0cac80910bd9ea') validpgpkeys=('6B5BBBCA2E3392315CC47434694A43B9C7FE6EA9') prepare() { diff --git a/add_mtu_config.patch b/add_mtu_config.patch index acbe02c5fc3e..eb374077b995 100644 --- a/add_mtu_config.patch +++ b/add_mtu_config.patch @@ -1,8 +1,8 @@ diff --git a/src/config.rs b/src/config.rs -index 843bad5..df4117e 100644 +index 995d4b1..0bb2789 100644 --- a/src/config.rs +++ b/src/config.rs -@@ -33,6 +33,7 @@ pub struct Config { +@@ -23,6 +23,7 @@ pub struct Config { pub device_type: Type, pub device_name: String, pub device_path: Option<String>, @@ -10,7 +10,7 @@ index 843bad5..df4117e 100644 pub fix_rp_filter: bool, pub ip: Option<String>, -@@ -69,6 +70,7 @@ impl Default for Config { +@@ -61,6 +62,7 @@ impl Default for Config { device_type: Type::Tun, device_name: "vpncloud%d".to_string(), device_path: None, @@ -18,7 +18,7 @@ index 843bad5..df4117e 100644 fix_rp_filter: false, ip: None, ifup: None, -@@ -111,6 +113,9 @@ impl Config { +@@ -105,6 +107,9 @@ impl Config { if let Some(val) = device.path { self.device_path = Some(val); } @@ -38,7 +38,7 @@ index 843bad5..df4117e 100644 if args.fix_rp_filter { self.fix_rp_filter = true; } -@@ -316,6 +324,10 @@ pub struct Args { +@@ -349,6 +357,10 @@ pub struct Args { #[structopt(long)] pub device_path: Option<String>, @@ -49,34 +49,32 @@ index 843bad5..df4117e 100644 /// Fix the rp_filter settings on the host #[structopt(long)] pub fix_rp_filter: bool, -@@ -468,7 +480,8 @@ pub struct ConfigFileDevice { - pub type_: Option<Type>, +@@ -536,6 +548,7 @@ pub struct ConfigFileDevice { pub name: Option<String>, pub path: Option<String>, -- pub fix_rp_filter: Option<bool> -+ pub fix_rp_filter: Option<bool>, + pub fix_rp_filter: Option<bool>, + pub mtu: Option<usize> } #[derive(Serialize, Deserialize, Debug, PartialEq, Default)] diff --git a/src/main.rs b/src/main.rs -index 868c8d1..0699bba 100644 +index 6d59069..94579dd 100644 --- a/src/main.rs +++ b/src/main.rs -@@ -140,7 +140,7 @@ fn setup_device(config: &Config) -> TunTapDevice { - config.device_name +@@ -141,7 +141,7 @@ fn setup_device(config: &Config) -> TunTapDevice { ); info!("Opened device {}", device.ifname()); + config.call_hook("device_setup", vec![("IFNAME", device.ifname())], true); - if let Err(err) = device.set_mtu(None) { + if let Err(err) = device.set_mtu(config.device_mtu) { error!("Error setting optimal MTU on {}: {}", device.ifname(), err); } if let Some(ip) = &config.ip { diff --git a/src/oldconfig.rs b/src/oldconfig.rs -index 0a717a0..c7b66a2 100644 +index 330336f..61a4d92 100644 --- a/src/oldconfig.rs +++ b/src/oldconfig.rs -@@ -19,6 +19,8 @@ pub struct OldConfigFile { +@@ -20,6 +20,8 @@ pub struct OldConfigFile { pub device_name: Option<String>, #[serde(alias = "device-path")] pub device_path: Option<String>, @@ -85,7 +83,7 @@ index 0a717a0..c7b66a2 100644 pub ifup: Option<String>, pub ifdown: Option<String>, pub crypto: Option<OldCryptoMethod>, -@@ -98,7 +100,8 @@ impl OldConfigFile { +@@ -99,7 +101,8 @@ impl OldConfigFile { fix_rp_filter: None, name: self.device_name, path: self.device_path, @@ -95,10 +93,3 @@ index 0a717a0..c7b66a2 100644 }), group: self.group, ifdown: self.ifdown, -@@ -120,4 +123,4 @@ impl OldConfigFile { - user: self.user - } - } --} -\ No newline at end of file -+} |