File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed
Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -58,12 +58,8 @@ class AmneziawgInterfacePlugin extends WireguardInterfacePlugin {
5858 }
5959
6060 getDefaultMTU ( ) {
61- // in case wireguard is 1412:
62- // Obfuscation mode (H1–H4/S1–S2, etc. enabled) +4~8 bytes
63- // High obfuscation (with JC/JMIN/JMAX enabled + random padding) +8~16 bytes
64- // Leave an 8-byte safety margin to prevent PMTU ICMP anomalies.
65- // 1412 - 8 - 16 - 8 = 1380
66- return 1380 ;
61+ // since official amneziawg client (both mac and windows) is using 1376 as MTU, we use the same value here
62+ return 1376 ;
6763 }
6864
6965
Original file line number Diff line number Diff line change @@ -176,6 +176,7 @@ class WireguardInterfacePlugin extends InterfaceBasePlugin {
176176 const v4Subnets = this . networkConfig . ipv4s ? this . networkConfig . ipv4s . map ( addr => new Address4 ( addr ) ) : [ new Address4 ( this . networkConfig . ipv4 ) ] ;
177177 let v6Subnets = [ ] ;
178178 if ( this . networkConfig . ipv6 ) {
179+ const ipv6 = this . networkConfig . ipv6 ;
179180 v6Subnets . push ( ...( _ . isArray ( ipv6 ) ? ipv6 . map ( addr => new Address6 ( addr ) ) : [ new Address6 ( ipv6 ) ] ) ) ;
180181 }
181182 if ( _ . isArray ( this . networkConfig . peers ) ) {
You can’t perform that action at this time.
0 commit comments