diff options
author | Ruben Pollan <meskio@sindominio.net> | 2019-02-04 23:36:37 +0100 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2019-02-04 23:36:37 +0100 |
commit | d0703ec25f2625ffd61489da4e2f45a7bc1be29b (patch) | |
tree | d0b77fdabf3a4c46ebef4bd868e6af2b74d87775 /pkg/systray/config.go | |
parent | b9ef49b51c6e2570ef3aae824ab44374997b6b25 (diff) |
[feat] Add -start-vpn flag
The -start-vpn flag can be set to on or off to turn the vpn on or off
just after launching bitmask-vpn. So it doesn't depend on the status of
the vpn of the last run.
- Resolves: #114
Diffstat (limited to 'pkg/systray/config.go')
-rw-r--r-- | pkg/systray/config.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/pkg/systray/config.go b/pkg/systray/config.go index 2755851..e53dea9 100644 --- a/pkg/systray/config.go +++ b/pkg/systray/config.go @@ -45,6 +45,7 @@ type Config struct { } SelectGateway bool DisableAustostart bool + StartVPN bool Version string Printer *message.Printer } @@ -65,6 +66,7 @@ func ParseConfig() *Config { conf.SelectGateway = conf.file.SelectGateway conf.DisableAustostart = conf.file.DisableAustostart + conf.StartVPN = !conf.file.UserStoppedVPN return &conf } @@ -73,10 +75,6 @@ func (c *Config) setUserStoppedVPN(vpnStopped bool) error { return c.save() } -func (c *Config) wasUserStopped() bool { - return c.file.UserStoppedVPN -} - func (c *Config) hasDonated() bool { return c.file.Donated.Add(oneMonth).After(time.Now()) } |