mirror of
https://github.com/WeeJeWel/wg-easy.git
synced 2024-11-18 00:19:22 +08:00
add optional client profile MTU var
This commit is contained in:
parent
ffaf67a08a
commit
b4fbcdd2db
@ -73,5 +73,6 @@ These options can be configured in `docker-compose.yml` under `environment`.
|
||||
| `WG_PORT` | `51820` | `51820` | The public UDP port of your VPN server |
|
||||
| `WG_DEFAULT_ADDRESS` | `10.8.0.x` | `10.6.0.x` | Clients IP address range |
|
||||
| `WG_DEFAULT_DNS` | `1.1.1.1` | `8.8.8.8, 8.8.4.4` | DNS server clients will use |
|
||||
| `WG_MTU` | `null` | `1420` | The MTU the clients will use. (Server uses default WG MTU) |
|
||||
|
||||
> If you change `WG_PORT`, make sure to also change the exposed port.
|
||||
|
@ -11,6 +11,7 @@ services:
|
||||
# - WG_PORT=51820
|
||||
# - WG_DEFAULT_ADDRESS=10.8.0.x
|
||||
# - WG_DEFAULT_DNS=1.1.1.1
|
||||
# - WG_MTU=1420
|
||||
|
||||
image: weejewel/wg-easy
|
||||
container_name: wg-easy
|
||||
|
@ -5,5 +5,6 @@ module.exports.PASSWORD = process.env.PASSWORD;
|
||||
module.exports.WG_PATH = process.env.WG_PATH || '/etc/wireguard/';
|
||||
module.exports.WG_HOST = process.env.WG_HOST;
|
||||
module.exports.WG_PORT = process.env.WG_PORT || 51820;
|
||||
module.exports.WG_MTU = process.env.WG_MTU || null;
|
||||
module.exports.WG_DEFAULT_ADDRESS = process.env.WG_DEFAULT_ADDRESS || '10.8.0.x';
|
||||
module.exports.WG_DEFAULT_DNS = process.env.WG_DEFAULT_DNS || '1.1.1.1';
|
||||
|
@ -14,6 +14,7 @@ const {
|
||||
WG_PATH,
|
||||
WG_HOST,
|
||||
WG_PORT,
|
||||
WG_MTU,
|
||||
WG_DEFAULT_DNS,
|
||||
WG_DEFAULT_ADDRESS,
|
||||
} = require('../config');
|
||||
@ -174,6 +175,9 @@ AllowedIPs = ${client.address}/32`;
|
||||
PrivateKey = ${client.privateKey}
|
||||
Address = ${client.address}/24
|
||||
DNS = ${WG_DEFAULT_DNS}
|
||||
if (typeof ${WG_MTU} !== 'undefined' || ${WG_MTU} !== null) {
|
||||
MTU = ${WG_MTU}
|
||||
}
|
||||
|
||||
[Peer]
|
||||
PublicKey = ${config.server.publicKey}
|
||||
|
Loading…
Reference in New Issue
Block a user