Skip to content

Commit

Permalink
📚 Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
database64128 committed Sep 12, 2022
1 parent d91fae6 commit 0dd8a45
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ on:
paths-ignore:
- 'README.md'
- 'LICENSE'
- 'docs/**'
pull_request:
paths-ignore:
- 'README.md'
- 'LICENSE'
- 'docs/**'

jobs:
test:
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
[![Go Reference](https://pkg.go.dev/badge/github.com/database64128/swgp-go.svg)](https://pkg.go.dev/github.com/database64128/swgp-go)
[![Test](https://github.com/database64128/swgp-go/actions/workflows/test.yml/badge.svg)](https://github.com/database64128/swgp-go/actions/workflows/test.yml)
[![Release](https://github.com/database64128/swgp-go/actions/workflows/release.yml/badge.svg)](https://github.com/database64128/swgp-go/actions/workflows/release.yml)
[![AUR version](https://img.shields.io/aur/version/swgp-go?label=swgp-go)](https://aur.archlinux.org/packages/swgp-go)
[![AUR version](https://img.shields.io/aur/version/swgp-go-git?label=swgp-go-git)](https://aur.archlinux.org/packages/swgp-go-git)
[![swgp-go AUR package](https://img.shields.io/aur/version/swgp-go?label=swgp-go)](https://aur.archlinux.org/packages/swgp-go)
[![swgp-go-git AUR package](https://img.shields.io/aur/version/swgp-go-git?label=swgp-go-git)](https://aur.archlinux.org/packages/swgp-go-git)

🐉 Simple WireGuard proxy with minimal overhead for WireGuard traffic.

Expand All @@ -21,7 +21,9 @@ Pad all types of packets without exceeding MTU, then XChaCha20-Poly1305 encrypt
- The length of a WireGuard data packet is always a multiple of 16.
- Many IPv6 websites cap their outgoing MTU to 1280 for maximum compatibility.

## Example Config
## Configuration Examples

All configuration examples and systemd unit files can be found in the [docs](docs) directory.

Make sure to use the right MTU for both server and client. To encourage correct use, `swgp-go` disables IP fragmentation and drops packets that are bigger than expected.

Expand Down
28 changes: 28 additions & 0 deletions docs/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"interfaces": [
{
"name": "wg0",
"proxyListen": "[::]:20220",
"proxyMode": "zero-overhead",
"proxyPSK": "sAe5RvzLJ3Q0Ll88QRM1N01dYk83Q4y0rXMP1i4rDmI=",
"proxyFwmark": 0,
"wgEndpoint": "[::1]:20221",
"wgFwmark": 0,
"mtu": 1500,
"batchMode": ""
}
],
"peers": [
{
"name": "laptop",
"wgListen": "[::]:20222",
"wgFwmark": 0,
"proxyEndpoint": "[2001:db8:1f74:3c86:aef9:a75:5d2a:425e]:20220",
"proxyMode": "zero-overhead",
"proxyPSK": "sAe5RvzLJ3Q0Ll88QRM1N01dYk83Q4y0rXMP1i4rDmI=",
"proxyFwmark": 0,
"mtu": 1500,
"batchMode": ""
}
]
}
10 changes: 10 additions & 0 deletions docs/swgp-go.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=Simple WireGuard Proxy Service
After=network-online.target
Wants=network-online.target

[Service]
ExecStart=/usr/bin/swgp-go -confPath /etc/swgp-go/config.json -zapConf systemd

[Install]
WantedBy=multi-user.target
10 changes: 10 additions & 0 deletions docs/swgp-go@.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=Simple WireGuard Proxy Service
After=network-online.target
Wants=network-online.target

[Service]
ExecStart=/usr/bin/swgp-go -confPath /etc/swgp-go/%i.json -zapConf systemd

[Install]
WantedBy=multi-user.target

0 comments on commit 0dd8a45

Please sign in to comment.