about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/docker.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/docker.go b/src/docker.go
index 4046146..df89e52 100644
--- a/src/docker.go
+++ b/src/docker.go
@@ -5,6 +5,7 @@ import (
 	"fmt"
 	"log"
 	"os"
+	"time"
 
 	"github.com/docker/docker/api/types/container"
 	"github.com/docker/docker/api/types/mount"
@@ -41,6 +42,8 @@ func spawnCompanion(username string, accesscode string) string {
 	setupContext()
 	setupDockerCLI()
 
+	sessionSalt := generateSessionSalt()
+
 	Config := &container.Config{
 		Image: "circus-companion:latest",
 		Cmd:   []string{fmt.Sprintf("-username %s -accesscode %s -sessionSalt %s -vpnRemoteAddress %s -vpnRemotePort %s", username, accesscode, sessionSalt, vpnRemoteAddress, vpnRemotePort)},
@@ -74,3 +77,7 @@ func spawnCompanion(username string, accesscode string) string {
 
 	return accesscode
 }
+
+func generateSessionSalt() string {
+	return fmt.Sprintf("%d", time.Now().UnixNano())
+}