From 015faa8fe70912da4faa1528c88c3ef6b9fcaabd Mon Sep 17 00:00:00 2001 From: kali Date: Thu, 15 Oct 2020 22:03:54 +0200 Subject: [pkg] windows vendoring fixes --- pkg/vpn/launcher.go | 6 ++++-- pkg/vpn/openvpn.go | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'pkg/vpn') 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() } -- cgit v1.2.3