Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions plugins/interface/amneziawg_intf_plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,8 @@ class AmneziawgInterfacePlugin extends WireguardInterfacePlugin {
}

getDefaultMTU() {
// in case wireguard is 1412:
// Obfuscation mode (H1–H4/S1–S2, etc. enabled) +4~8 bytes
// High obfuscation (with JC/JMIN/JMAX enabled + random padding) +8~16 bytes
// Leave an 8-byte safety margin to prevent PMTU ICMP anomalies.
// 1412 - 8 - 16 - 8 = 1380
return 1380;
// since official amneziawg client (both mac and windows) is using 1376 as MTU, we use the same value here
return 1376;
}


Expand Down
1 change: 1 addition & 0 deletions plugins/interface/wireguard_intf_plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ class WireguardInterfacePlugin extends InterfaceBasePlugin {
const v4Subnets = this.networkConfig.ipv4s ? this.networkConfig.ipv4s.map(addr => new Address4(addr)) : [new Address4(this.networkConfig.ipv4)];
let v6Subnets = [];
if (this.networkConfig.ipv6) {
const ipv6 = this.networkConfig.ipv6;
v6Subnets.push(...(_.isArray(ipv6) ? ipv6.map(addr => new Address6(addr)) : [new Address6(ipv6)]));
}
if (_.isArray(this.networkConfig.peers)) {
Expand Down