about summary refs log tree commit diff
path: root/src/access.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/access.go')
-rw-r--r--src/access.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/access.go b/src/access.go
index 6f0d848..1292489 100644
--- a/src/access.go
+++ b/src/access.go
@@ -40,7 +40,7 @@ func startVPN() (err error) {
 
 	// Set up VPN host network
 	if vpnHostNetworkID == "" {
-		id, err := setupNetwork(vpnHostNetworkName, false)
+		id, err := setupNetwork(getVPNNetworkName(), false)
 		if (err != nil) {
 			return err
 		}
@@ -49,7 +49,7 @@ func startVPN() (err error) {
 
 	// Set up container network
 	if containerNetworkID == "" {
-		id, err := setupNetwork(containerNetworkName, true)
+		id, err := setupNetwork(getChallengeNetworkName(), true)
 		if (err != nil) {
 			return err
 		}
@@ -155,9 +155,9 @@ func getCertificate() (string, error) {
 	// retry for 10 seconds to dial to the VPN container
 	for i := 0; i < 10; i++ {
 		// Check if the VPN container is already part of our challenge container network
-		if inspectJSON.NetworkSettings.Networks[vpnHostNetworkName] != nil {
+		if inspectJSON.NetworkSettings.Networks[getVPNNetworkName()] != nil {
 			// it is - get the IP address and dial to it
-			certResponse, err = http.Get(fmt.Sprintf("http://%s:9999/", inspectJSON.NetworkSettings.Networks[vpnHostNetworkName].IPAddress))
+			certResponse, err = http.Get(fmt.Sprintf("http://%s:9999/", inspectJSON.NetworkSettings.Networks[getVPNNetworkName()].IPAddress))
 
 			if err == nil {
 				break