From b7b19b7195366dbacc4078b5b7a3fc6a3ad7889b Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Thu, 25 Nov 2021 13:45:54 +0100 Subject: [feat] expose snowflake in preferences it will be disabled if Tor not present, for now --- pkg/vpn/main.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'pkg/vpn') 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() } -- cgit v1.2.3