Skip to content

Instantly share code, notes, and snippets.

@ffoxin
Created February 26, 2022 17:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ffoxin/85d24fdae8aa7ae4e8df701bcd92cb73 to your computer and use it in GitHub Desktop.
Save ffoxin/85d24fdae8aa7ae4e8df701bcd92cb73 to your computer and use it in GitHub Desktop.
patch WireGuard.js WireGuard.js.patch
--- WireGuard.js.old 2022-01-31 11:08:43.178581074 +0000
+++ WireGuard.js.fixed 2022-01-31 11:10:12.487859150 +0000
@@ -95,7 +95,7 @@
[Peer]
PublicKey = ${client.publicKey}
PresharedKey = ${client.preSharedKey}
-AllowedIPs = ${client.address}/32`;
+AllowedIPs = ${client.allowedIPs}`;
}
debug('Saving config...');
@@ -235,6 +235,8 @@
publicKey,
preSharedKey,
+ allowedIPs: `${address}/32`,
+
createdAt: new Date(),
updatedAt: new Date(),
@@ -290,6 +292,7 @@
}
client.address = address;
+ client.allowedIPs = `${address}/32`;
client.updatedAt = new Date();
await this.saveConfig();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment