1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-10 19:50:30 +08:00

drop commandline mtu

This commit is contained in:
源文雨
2022-05-13 23:13:30 +08:00
parent 4e833c877d
commit 52215ec63a
4 changed files with 18 additions and 16 deletions

View File

@@ -7,7 +7,7 @@
## Usage
> If you are running in windows, remember to select the `wintun.dll` of your arch in `lower/wintun` and place it alongside the compiled exe
```bash
wg [-c config.yaml] [-d|w] [-g] [-h] [-m mtu] [-p] [-l log.txt]
wg [-c config.yaml] [-d|w] [-g] [-h] [-p] [-l log.txt]
```
#### Instructions
```bash
@@ -18,21 +18,21 @@ wg [-c config.yaml] [-d|w] [-g] [-h] [-m mtu] [-p] [-l log.txt]
-h display this help
-l string
write log to file (default "-")
-m int
set the mtu of wg (default 1432)
-p show my publickey
-w only show logs above warn level
```
- **macos mojave**: max mtu (under ipv4 endpoint) is `9159`
- **ipv6 endpoint**: the recommand mtu is `1280~1400` to prevent the big segments from being dropped
## Config file example
- **macos mojave**: max mtu (under ipv4 endpoint) is `9159`
- **ipv6 endpoint**: the recommand mtu is `1280~1500` to prevent the big segments from being dropped
```yaml
IP: 192.168.233.1
SubNet: 192.168.233.0/24
PrivateKey: 暲菉斂狧污爉窫擸紈卆帞蔩慈睠庮扝憚瞼縀
EndPoint: 0.0.0.0:56789
MTU: 1500
Peers:
-
IP: "192.168.233.2"
@@ -42,6 +42,7 @@ Peers:
AllowedIPs: ["192.168.233.2/32"]
KeepAliveSeconds: 0
QueryList: ["192.168.233.3"]
MTU: 1400
QuerySeconds: 10
AllowTrans: false
-
@@ -50,6 +51,7 @@ Peers:
PublicKey: 牢喨粷詸衭譛浾蘹櫠砙杹蟫瑳叩刋橋経挵蘀
EndPoint: ""
AllowedIPs: ["192.168.233.3/32"]
MTU: 1300
KeepAliveSeconds: 0
AllowTrans: false
```