about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/access.go14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/access.go b/src/access.go
index 34b2470..6f9cd73 100644
--- a/src/access.go
+++ b/src/access.go
@@ -13,6 +13,10 @@ import (
 	"time"
 )
 
+const(
+	vpnHostNetworkName = "vpnhostnet"
+)
+
 var vpnContainerID string
 var vpnNetworkID string
 var vpnHostNetworkID string
@@ -107,14 +111,6 @@ func setupNetwork() (error) {
 	if vpnNetworkID == "" {
 		response, err := dockerCli.NetworkCreate(dockerCtx, VPNNetworkName, types.NetworkCreate{
 			Internal: true,
-			IPAM: &network.IPAM{
-				Config: []network.IPAMConfig{
-					{
-						Subnet: "10.13.37.0/24",
-						Gateway: "10.13.37.254",
-					},
-				},
-			},
 		})
 
 		if err != nil {
@@ -132,7 +128,7 @@ func setupVPNHostNetwork() (error) {
 	setupDockerCLI()
 
 	if vpnHostNetworkID == "" {
-		response, err := dockerCli.NetworkCreate(dockerCtx, "vpnhostnet", types.NetworkCreate{
+		response, err := dockerCli.NetworkCreate(dockerCtx, vpnHostNetworkName, types.NetworkCreate{
 			Internal: false,
 		})