Fix generate error

This commit is contained in:
Kirigaya Kazuto 2021-08-22 08:03:34 +00:00
parent 8bb3dcda9f
commit 3ca839f378
2 changed files with 3 additions and 1 deletions

View File

@ -29,3 +29,5 @@ For a forwarding server, the following commands might be needed:
```
ufw route allow in on wg0 out on wg0
```
Reload script only reload wireguard configs. Changes made to tunnels will not work without restart.

View File

@ -157,7 +157,7 @@ sudo -- bash -c "wg syncconf {} <(wg-quick strip {})"
'''.format(config["interface"], config["interface"], config["interface"]))
for info in config["peers"]:
f.write("sudo ip -4 route add {} dev {}\n".format(info["allowed"]), config["interface"])
f.write("sudo ip -4 route add {} dev {}\n".format(info["allowed"], config["interface"]))
logger.info('''[Done] Config generated. Before you run start.sh, besure to: