Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasTJdev committed Feb 23, 2024
1 parent d75a4af commit c1e5975
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/web/web_utils.nim
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import
std/[
locks,
md5,
os
os,
strutils
]


Expand Down Expand Up @@ -41,7 +42,7 @@ proc getSalt(): string =
proc adminKeyRawGet*(): string =
if not fileExists(defaultKeyPath / "admin.txt"):
return ""
return readFile(defaultKeyPath / "admin.txt")
return readFile(defaultKeyPath / "admin.txt").strip(chars = {'\n', ' '})


proc adminKeySet*(key: string) =
Expand Down
1 change: 1 addition & 0 deletions src/wg/wg_configs.nim
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ PrivateKey = $1
Address = $2
ListenPort = $3
SaveConfig = false
PreUp = sysctl -w net.ipv4.ip_forward=1
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o $4 -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o $4 -j MASQUERADE"""

Expand Down
2 changes: 1 addition & 1 deletion wireguardmanager.nimble
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Package

version = "0.1.0"
version = "0.1.1"
author = "ThomasTJdev"
description = "Cli manager for wireguard"
license = "MIT"
Expand Down

0 comments on commit c1e5975

Please sign in to comment.