mirror of
https://github.com/faicker/wg-config.git
synced 2020-11-18 19:53:49 -08:00
Add tpl sample file and correct the README
Signed-off-by: Faicker Mo <faicker.mo@gmail.com>
This commit is contained in:
parent
ae94b4498f
commit
57fe525d26
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,3 +3,5 @@
|
||||
.wg0.conf
|
||||
users/
|
||||
wg.def
|
||||
client.conf.tpl
|
||||
server.conf.tpl
|
||||
|
10
README.md
10
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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user