about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/access.go23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/access.go b/src/access.go
index 233b11c..8650500 100644
--- a/src/access.go
+++ b/src/access.go
@@ -5,23 +5,24 @@ import (
 	"errors"
 	"flag"
 	"fmt"
-	"github.com/docker/docker/api/types"
-	"github.com/docker/docker/api/types/container"
-	"github.com/docker/docker/api/types/network"
-	"github.com/docker/go-connections/nat"
 	"net"
 	"net/http"
 	"os"
 	"time"
+
+	"github.com/docker/docker/api/types"
+	"github.com/docker/docker/api/types/container"
+	"github.com/docker/docker/api/types/network"
+	"github.com/docker/go-connections/nat"
 )
 
-const(
-	vpnContainerName = "circus-vpn"
+const (
+	vpnContainerName = "registry.darknebu.la/circus/vpn"
 )
 
 var vpnContainerID string
-var remoteAddress* string
-var remotePort* int
+var remoteAddress *string
+var remotePort *int
 
 func registerAccessFlags() {
 	remoteAddress = flag.String("vpnRemoteAddress", "", "The remote domain name or IP the VPN will run on")
@@ -41,7 +42,7 @@ func startVPN() (err error) {
 	// Set up VPN host network
 	if vpnHostNetworkID == "" {
 		id, err := setupNetwork(getVPNNetworkName(), false)
-		if (err != nil) {
+		if err != nil {
 			return err
 		}
 		vpnHostNetworkID = id
@@ -50,7 +51,7 @@ func startVPN() (err error) {
 	// Set up container network
 	if containerNetworkID == "" {
 		id, err := setupNetwork(getChallengeNetworkName(), true)
-		if (err != nil) {
+		if err != nil {
 			return err
 		}
 		containerNetworkID = id
@@ -85,7 +86,7 @@ func startVPN() (err error) {
 		PortBindings: nat.PortMap{
 			"1194/udp": []nat.PortBinding{
 				{
-					HostIP: "0.0.0.0",
+					HostIP:   "0.0.0.0",
 					HostPort: fmt.Sprintf("%d", *remotePort),
 				},
 			},