From fffe9721311182163db13859b901d32d02a75591 Mon Sep 17 00:00:00 2001 From: Emile Date: Sat, 12 Oct 2019 12:35:36 +0200 Subject: update the vpn container name to the darknebu.la registry one --- src/access.go | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'src') 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), }, }, -- cgit 1.4.1