diff --git a/config/config_docker.go b/config/config_docker.go index 59de8a1..5b3f17f 100644 --- a/config/config_docker.go +++ b/config/config_docker.go @@ -26,6 +26,7 @@ type DockerNetworkConfiguration struct { Name string `default:"pterodactyl_nw"` ISPN bool `default:"false" yaml:"ispn"` Driver string `default:"bridge"` + Mode string `default:"pterodactyl_nw" yaml:"network_mode"` IsInternal bool `default:"false" yaml:"is_internal"` EnableICC bool `default:"true" yaml:"enable_icc"` Interfaces dockerNetworkInterfaces `yaml:"interfaces"` diff --git a/server/environment_docker.go b/server/environment_docker.go index b4b6485..487f37f 100644 --- a/server/environment_docker.go +++ b/server/environment_docker.go @@ -665,7 +665,7 @@ func (d *DockerEnvironment) Create() error { "setpcap", "mknod", "audit_write", "net_raw", "dac_override", "fowner", "fsetid", "net_bind_service", "sys_chroot", "setfcap", }, - NetworkMode: "pterodactyl_nw", + NetworkMode: container.NetworkMode(config.Get().Docker.Network.Mode), } if _, err := cli.ContainerCreate(ctx, conf, hostConf, nil, d.Server.Uuid); err != nil {