a
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
||||
wgconfig
|
||||
confs
|
||||
|
||||
18
README.md
18
README.md
@@ -9,27 +9,27 @@ This was entirely written by AI. All it does it generate wireguard keys and auto
|
||||
```
|
||||
git clone https://github.com/bullshar-k/wgconf
|
||||
cd wgconf
|
||||
go build main.go
|
||||
./main
|
||||
go build
|
||||
./wgconf
|
||||
```
|
||||
The help pages will show you the use flags but they're below anyways
|
||||
|
||||
### ./main generate new
|
||||
### ./wgconf generate new
|
||||
#### Basic example
|
||||
```
|
||||
./main generate new -dest 192.168.1.1 -peer 3
|
||||
./wgconf generate new -dest 192.168.1.1 -peer 3
|
||||
```
|
||||
|
||||
This will create a server config and 3 peer configs. The server will have address 192.168.1.1/24.
|
||||
The peers will increment by 1 on the last octet.
|
||||
Preshared key is on by default but can be disabled with the flag.
|
||||
|
||||
### ./main generate add
|
||||
### ./wgconf generate add
|
||||
To use the add command you use it as the previous command but define the previous server.conf file at the end. All this does different is add new peers.
|
||||
If you generate new with conditions A, B, and C. Then you generate add with conditions A and B it will adhere to that. If you want the exact same settings for new peers you must define that.
|
||||
|
||||
## Help outputs
|
||||
./main
|
||||
./wgconf
|
||||
```
|
||||
Usage:
|
||||
wgconfig generate new [flags] Create new WireGuard configs
|
||||
@@ -38,7 +38,7 @@ Usage:
|
||||
wgconfig -h Show this help
|
||||
wgconfig generate -h Show generate command help
|
||||
```
|
||||
./main generate
|
||||
./wgconf generate
|
||||
```
|
||||
Usage:
|
||||
|
||||
@@ -59,7 +59,7 @@ Flags:
|
||||
-P Generate preshared keys, use -P=false to disable (default true)
|
||||
-h Show this help
|
||||
```
|
||||
./main generate new && ./main generate add
|
||||
./wgconf generate new && ./wgconf generate add
|
||||
```
|
||||
Usage of new:
|
||||
-P Generate preshared keys (-P=true/false) (default true)
|
||||
@@ -79,4 +79,4 @@ Usage of new:
|
||||
Persistent keepalive in seconds (0 to disable)
|
||||
```
|
||||
*Final note*:
|
||||
I wrote this only for myself, web alternatives exist, I'm sure there's an electron app for this, etc. I wanted a fast one command wireguard config generator with minimal defaults and the ability to add new peers to an existing config. It's simply and slapping numbers and keys where they need to go so I used AI to write it. This is only on github in case other people find it useful or were wanting the same thing.
|
||||
I wrote this only for myself, web alternatives exist, I'm sure there's an electron app for this, etc. I wanted a fast one command wireguard config generator with minimal defaults and the ability to add new peers to an existing config. It's simply and slapping numbers and keys where they need to go so I used AI to write it. This is only on github in case other people find it useful or were wanting the same thing.
|
||||
|
||||
Reference in New Issue
Block a user