From 57fe525d2647ccfb168d2d32dffaabb727975917 Mon Sep 17 00:00:00 2001 From: Faicker Mo Date: Sat, 4 Jan 2020 20:01:33 +0800 Subject: [PATCH] Add tpl sample file and correct the README Signed-off-by: Faicker Mo --- .gitignore | 2 ++ README.md | 10 ++++++++-- client.conf.tpl => client.conf.tpl.sample | 0 server.conf.tpl => server.conf.tpl.sample | 0 4 files changed, 10 insertions(+), 2 deletions(-) rename client.conf.tpl => client.conf.tpl.sample (100%) rename server.conf.tpl => server.conf.tpl.sample (100%) diff --git a/.gitignore b/.gitignore index fa0ce77..b447cab 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ .wg0.conf users/ wg.def +client.conf.tpl +server.conf.tpl diff --git a/README.md b/README.md index 60bb575..b4e86f8 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,10 @@ The wireguard default config directory is /etc/wireguard. The script config file is wg.def, create and edit it according to wg.def.sample. +Copy client.conf.tpl.sample to client.conf.tpl and copy server.conf.tpl.sample to server.conf.tpl. + + Edit tpl if you want to change some config. + You can generate the public key and private key with command `wg genkey | tee prikey | wg pubkey > pubkey`. ### usage @@ -32,13 +36,13 @@ Running as root. This will generate a client conf and qrcode in users directory which name is alice and add alice to the wg server config. -client will route all traffic to server. +This will disable default route change. Route traffic Manually. ```bash ./user.sh -a alice -r ``` -This will disable default route change. Route traffic Manually. +client will route all traffic to server. #### delete a user @@ -52,3 +56,5 @@ This will delete the alice directory and delete alice from the wg server config. ```bash ./user.sh -c ``` + +Delete all users before clear. diff --git a/client.conf.tpl b/client.conf.tpl.sample similarity index 100% rename from client.conf.tpl rename to client.conf.tpl.sample diff --git a/server.conf.tpl b/server.conf.tpl.sample similarity index 100% rename from server.conf.tpl rename to server.conf.tpl.sample