wg-ops/Readme.md

53 lines
1.6 KiB
Markdown
Raw Normal View History

2021-07-31 03:06:58 +08:00
# WireGuard Ops
2021-07-13 15:52:39 +08:00
2021-07-31 03:06:58 +08:00
A group of Interactive bash scripts for [WireGuard](https://github.com/WireGuard/wireguard-go) over [udp2raw-tunnel](https://github.com/wangyu-/udp2raw-tunnel), with optional [UDPSpeeder](https://github.com/wangyu-/UDPspeeder) support.
2021-07-16 11:56:50 +08:00
2021-07-31 02:51:31 +08:00
## Basic Usage
2021-07-16 11:56:50 +08:00
2021-07-31 02:51:31 +08:00
1. Run `install.sh`. (May prompt sudo)
2021-07-16 11:56:50 +08:00
2022-02-02 17:15:30 +08:00
2. Write a valid WireGuard config file, with supported extension tags.
2021-07-16 11:56:50 +08:00
2022-02-02 17:15:30 +08:00
3. Run `python3 generate.py` to convert extension tags into config lines.
2021-07-16 16:38:55 +08:00
2021-07-31 02:32:08 +08:00
Start as service: `systemctl start wg-quick@wg0`
Start service on system start-up: `systemctl enable wg-quick@wg0`
See [wg-quick(8)](https://man7.org/linux/man-pages/man8/wg-quick.8.html) for more information.
2022-02-02 17:15:30 +08:00
Run `python3 generate.py -h` for more help about the generator.
2021-07-31 02:51:31 +08:00
2022-02-02 17:15:30 +08:00
```
wg-ops: WireGuard configuration extended generator
OPTIONS
-h Display this help and quit.
-k Output generated config to standard output
-o <filename> Output generated config to file. Default is {source_filename}.gen
TAGS
#enable-bbr
#enable-forward
#iptables-forward
#route-to table
#route-from table
#udp2raw-server name port password
#udp2raw-client name port remote password
#udp2raw-client-mux name mux port remote password
#gost-server name port
#gost-client name port remote
#gost-client-mux name mux port remote
#use-tunnel name
```
2021-07-31 02:51:31 +08:00
2021-07-16 16:38:55 +08:00
## Notice
Make sure to setup firewall. UFW is recommended.
For a forwarding server, the following commands might be needed:
```
ufw route allow in on wg0 out on wg0
```
2021-08-22 16:03:34 +08:00
Reload script only reload wireguard configs. Changes made to tunnels will not work without restart.