summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorkali <kali@win>2020-10-15 22:03:54 +0200
committerkali kaneko (leap communications) <kali@leap.se>2020-10-23 23:22:57 +0200
commit015faa8fe70912da4faa1528c88c3ef6b9fcaabd (patch)
tree4f0086db3d4ab2242e171a08248529276a0e0422 /pkg
parent46f84b7490e0427fc2ddd20238797d1d7523e278 (diff)
[pkg] windows vendoring fixes
Diffstat (limited to 'pkg')
-rw-r--r--pkg/vpn/launcher.go6
-rw-r--r--pkg/vpn/openvpn.go3
2 files changed, 7 insertions, 2 deletions
diff --git a/pkg/vpn/launcher.go b/pkg/vpn/launcher.go
index 234a89c..eb3794c 100644
--- a/pkg/vpn/launcher.go
+++ b/pkg/vpn/launcher.go
@@ -47,11 +47,12 @@ func probeHelperPort(port int) int {
return port
}
port++
- if port > 65535 {
+ /* we could go until 65k, but there's really no need */
+ if port > 10000 {
break
}
}
- log.Println("WARN: Cannot find working helper")
+ log.Println("WARN: Cannot find any working helper")
return 0
}
@@ -72,6 +73,7 @@ func smellsLikeOurHelperSpirit(port int, c *http.Client) bool {
return true
} else {
log.Println("DEBUG: Another helper seems to be running:", string(ver))
+ log.Println("DEBUG: But we were hoping to find:", config.ApplicationName)
}
}
return false
diff --git a/pkg/vpn/openvpn.go b/pkg/vpn/openvpn.go
index 4997a34..c0ec2e1 100644
--- a/pkg/vpn/openvpn.go
+++ b/pkg/vpn/openvpn.go
@@ -51,6 +51,9 @@ func (b *Bitmask) StartVPN(provider string) error {
}
func (b *Bitmask) CanStartVPN() bool {
+ /* FIXME this is not enough. We should check, if provider needs
+ * credentials, if we have a valid token, otherwise remove it and
+ make sure that we're asking for the credentials input */
return !b.bonafide.NeedsCredentials()
}