summaryrefslogtreecommitdiff
path: root/pkg/helper
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2020-04-23 21:38:57 +0200
committerkali kaneko (leap communications) <kali@leap.se>2020-04-30 22:10:31 +0200
commit3a9f65fb9ccb32e6ef0e3f3c471cc50f1c3ee505 (patch)
tree3bc617a3604fb3019d07cdb523f18a0d0fea8d66 /pkg/helper
parentc6a74b63224effd9a7d6b2cda87c38e092b35aa5 (diff)
[docs] document cross-compiling quirk
Diffstat (limited to 'pkg/helper')
-rw-r--r--pkg/helper/windows.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkg/helper/windows.go b/pkg/helper/windows.go
index 0962fef..08b01aa 100644
--- a/pkg/helper/windows.go
+++ b/pkg/helper/windows.go
@@ -49,6 +49,11 @@ var (
httpServerConf = &httpConf{}
)
+// parseCliArgs allows the helper binary to install/uninstall itself. It requires admin privileges.
+// However, be warned: if you intend to use it from the command line, you will have to compile it with the Go compiler yourself.
+// the version we're shipping (ie, cross-compiled with the mingw compiler) apparently is not able to output to stdout/stderr properly.
+// To compile a usable version, from the top of the repo you can do:
+// "cd cmd/bitmask-helper && GOOS=windows GOARCH=i386 go build"
func parseCliArgs() {
log.Println("Parsing CLI args...")
isIntSess, err := svc.IsAnInteractiveSession()
@@ -73,10 +78,12 @@ func parseCliArgs() {
log.Println("cmd:", cmd)
switch cmd {
case "debug":
+ // run the service on the foreground, for debugging
runService(svcName, true)
return
case "install":
- // TODO get binary name
+ // TODO get binary name -- or maybe not, since in this way we make sure
+ // that all bitmask-vpn brandings are mutually exclusive.
err = installService(svcName, "bitmask-helper service")
case "remove":
err = removeService(svcName)