about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-10-12 12:35:36 +0200
committerEmile <hanemile@protonmail.com>2019-10-12 12:35:36 +0200
commitfffe9721311182163db13859b901d32d02a75591 (patch)
treecaec800dc5f99889d8e0cf001b5721b318cf32aa /src
parentf4331aca3afb6007dab5fced634720d7c5822b94 (diff)
update the vpn container name to the darknebu.la registry one
Diffstat (limited to 'src')
-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),
 				},
 			},