Typo and Address replcaed by AllowedIPs
433ec9b0d843793266380bd5b91e375710fb430e
1 files changed
src/WireGuardConfigGenerator/UserControlPeer.cs
diff --git a/src/WireGuardConfigGenerator/UserControlPeer.cs b/src/WireGuardConfigGenerator/UserControlPeer.cs
index 74c76d8..e018d3b 100644
--- a/src/WireGuardConfigGenerator/UserControlPeer.cs
+++ b/src/WireGuardConfigGenerator/UserControlPeer.cs
@@ -45,7 +45,7 @@ public partial class UserControlPeer : UserControl
config += $"""
{Environment.NewLine}
[Peer]
- Eindpoint = {server.Endpoint}
+ Endpoint = {server.Endpoint}
PublicKey = {server.PubKey}
"""
+ (this.peer.UseAllowedIPs ? $"{Environment.NewLine}AllowedIPs = {peer.AllowedIPs}" : $"{Environment.NewLine}AllowedIPs = {server.AllowedIPs}")
@@ -104,9 +104,9 @@ public partial class UserControlPeer : UserControl
this.txtDnsServers.Text = $"{peer.ParentServer?.DNS}";
if (peer.UseAllowedIPs)
- this.txtAllowedIPs.Text = $"{peer.AllowedIPs}";
+ this.txtAllowedIPs.Text = $"{peer.AllowedIPs?.Replace(';',',')}";
else
- this.txtAllowedIPs.Text = $"{peer.ParentServer?.Address}";
+ this.txtAllowedIPs.Text = $"{peer.ParentServer?.AllowedIPs}";
this.chkUseAllowedIPs.Checked = this.peer.UseAllowedIPs;
this.chkUseDns.Checked = this.peer.UseDNS;