summaryrefslogtreecommitdiff
path: root/pkg/vpn
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2021-11-25 13:45:54 +0100
committerkali kaneko (leap communications) <kali@leap.se>2021-11-29 18:14:05 +0100
commitb7b19b7195366dbacc4078b5b7a3fc6a3ad7889b (patch)
tree2b97e0167d507ddd9c1b5b0d5f0d3efbc4e6829c /pkg/vpn
parenta81bf938fe2b9409d1fa0175cc5f20635bb16127 (diff)
[feat] expose snowflake in preferences
it will be disabled if Tor not present, for now
Diffstat (limited to 'pkg/vpn')
-rw-r--r--pkg/vpn/main.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkg/vpn/main.go b/pkg/vpn/main.go
index 176c86f..da6caf1 100644
--- a/pkg/vpn/main.go
+++ b/pkg/vpn/main.go
@@ -43,6 +43,7 @@ type Bitmask struct {
certPemPath string
openvpnArgs []string
udp bool
+ snowflake bool
offersUdp bool
failed bool
canUpgrade bool
@@ -68,7 +69,7 @@ func Init() (*Bitmask, error) {
bonafide.Gateway{},
bonafide.Gateway{}, statusCh, nil, bf, launch,
"", nil, "", []string{},
- false, false, false, false,
+ false, false, false, false, false,
[]motd.Message{}, ""}
// FIXME multiprovider: need to pass provider name early on
// XXX we want to block on these, but they can timeout if we're blocked.
@@ -151,6 +152,11 @@ func (b *Bitmask) UseUDP(udp bool) error {
return nil
}
+func (b *Bitmask) UseSnowflake(s bool) error {
+ b.snowflake = s
+ return nil
+}
+
func (b *Bitmask) OffersUDP() bool {
return b.bonafide.IsUDPAvailable()
}