diff options
author | kali kaneko (leap communications) <kali@leap.se> | 2021-11-25 13:45:54 +0100 |
---|---|---|
committer | kali kaneko (leap communications) <kali@leap.se> | 2021-11-29 18:14:05 +0100 |
commit | b7b19b7195366dbacc4078b5b7a3fc6a3ad7889b (patch) | |
tree | 2b97e0167d507ddd9c1b5b0d5f0d3efbc4e6829c /pkg/backend/api.go | |
parent | a81bf938fe2b9409d1fa0175cc5f20635bb16127 (diff) |
[feat] expose snowflake in preferences
it will be disabled if Tor not present, for now
Diffstat (limited to 'pkg/backend/api.go')
-rw-r--r-- | pkg/backend/api.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pkg/backend/api.go b/pkg/backend/api.go index d7dcbb3..6d5ceee 100644 --- a/pkg/backend/api.go +++ b/pkg/backend/api.go @@ -94,12 +94,19 @@ func SetTransport(label string) { } func SetUDP(udp bool) { - log.Println("DEBUG setting UDP") + log.Printf("DEBUG udp:%v\n", udp) ctx.cfg.SetUseUDP(udp) ctx.bm.UseUDP(udp) go trigger(OnStatusChanged) } +func SetSnowflake(snowflake bool) { + log.Printf("DEBUG snowflake:%v\n", snowflake) + ctx.cfg.SetUseSnowflake(snowflake) + ctx.bm.UseSnowflake(snowflake) + go trigger(OnStatusChanged) +} + func GetTransport() *C.char { return C.CString(ctx.bm.GetTransport()) } |