summaryrefslogtreecommitdiff
path: root/pkg/systray
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/systray')
-rw-r--r--pkg/systray/config.go3
-rw-r--r--pkg/systray/run.go6
2 files changed, 9 insertions, 0 deletions
diff --git a/pkg/systray/config.go b/pkg/systray/config.go
index 2e97456..75a4a98 100644
--- a/pkg/systray/config.go
+++ b/pkg/systray/config.go
@@ -40,10 +40,12 @@ type Config struct {
LastNotification time.Time
Donated time.Time
SelectGateway bool
+ Obfs4 bool
UserStoppedVPN bool
DisableAustostart bool
}
SelectGateway bool
+ Obfs4 bool
DisableAustostart bool
StartVPN bool
Version string
@@ -64,6 +66,7 @@ func ParseConfig() *Config {
}
conf.SelectGateway = conf.file.SelectGateway
+ conf.Obfs4 = conf.file.Obfs4
conf.DisableAustostart = conf.file.DisableAustostart
conf.StartVPN = !conf.file.UserStoppedVPN
return &conf
diff --git a/pkg/systray/run.go b/pkg/systray/run.go
index ce4a886..6521da6 100644
--- a/pkg/systray/run.go
+++ b/pkg/systray/run.go
@@ -68,6 +68,12 @@ func initialize(conf *Config, bt *bmTray, finishedCh chan bool) {
}
func checkAndStartBitmask(b bitmask.Bitmask, notify *notificator, conf *Config) {
+ if conf.Obfs4 {
+ err := b.UseTransport("obfs4")
+ if err != nil {
+ log.Printf("Error setting transport: %v", err)
+ }
+ }
err := checkAndInstallHelpers(b, notify)
if err != nil {
log.Printf("Is bitmask running? %v", err)