From 204a4375fc5cf0213f628b7cb3c1f2cb520c848c Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 10 Jul 2022 00:08:52 +0200 Subject: [PATCH] Make the Docker network MTU configurable (#130) --- config/config_docker.go | 1 + environment/docker.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/config_docker.go b/config/config_docker.go index f79872a..689b98c 100644 --- a/config/config_docker.go +++ b/config/config_docker.go @@ -36,6 +36,7 @@ type DockerNetworkConfiguration struct { Mode string `default:"pterodactyl_nw" yaml:"network_mode"` IsInternal bool `default:"false" yaml:"is_internal"` EnableICC bool `default:"true" yaml:"enable_icc"` + NetworkMTU int64 `default:"1500" yaml:"network_mtu"` Interfaces dockerNetworkInterfaces `yaml:"interfaces"` } diff --git a/environment/docker.go b/environment/docker.go index 56f0295..8542758 100644 --- a/environment/docker.go +++ b/environment/docker.go @@ -92,7 +92,7 @@ func createDockerNetwork(ctx context.Context, cli *client.Client) error { "com.docker.network.bridge.enable_ip_masquerade": "true", "com.docker.network.bridge.host_binding_ipv4": "0.0.0.0", "com.docker.network.bridge.name": "pterodactyl0", - "com.docker.network.driver.mtu": "1500", + "com.docker.network.driver.mtu": strconv.FormatInt(nw.NetworkMTU, 10), }, }) if err != nil {