summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
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()
}