summaryrefslogtreecommitdiff
path: root/pkg/config
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/config')
-rw-r--r--pkg/config/gui.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/config/gui.go b/pkg/config/gui.go
index 6004d20..1d23018 100644
--- a/pkg/config/gui.go
+++ b/pkg/config/gui.go
@@ -42,12 +42,14 @@ type Config struct {
UserStoppedVPN bool
DisableAutostart bool
UDP bool
+ Snowflake bool
}
SkipLaunch bool
Obfs4 bool
DisableAutostart bool
StartVPN bool
UDP bool
+ Snowflake bool
}
// ParseConfig reads the configuration from the configuration file
@@ -66,6 +68,8 @@ func ParseConfig() *Config {
conf.Obfs4 = conf.file.Obfs4
conf.DisableAutostart = conf.file.DisableAutostart
conf.StartVPN = !conf.file.UserStoppedVPN
+ conf.UDP = conf.file.UDP
+ conf.Snowflake = conf.file.Snowflake
return &conf
}
@@ -104,6 +108,12 @@ func (c *Config) SetUseUDP(val bool) error {
return c.save()
}
+func (c *Config) SetUseSnowflake(val bool) error {
+ c.Snowflake = val
+ c.file.Snowflake = val
+ return c.save()
+}
+
func (c *Config) save() error {
f, err := os.Create(configPath)
if err != nil {