diff --git a/pkg/vpn/bitmask.go b/pkg/vpn/bitmask.go index 617a0b80432e79280cb9119c0e3fecebaf83bb56..3d86189293cf2f5ee87b66a2e4f333ab5fa09ccb 100644 --- a/pkg/vpn/bitmask.go +++ b/pkg/vpn/bitmask.go @@ -143,12 +143,8 @@ func Init() (*Bitmask, error) { If the lookup succeeds, we save it in the config file and use it as fallback the next time. */ - countryCode, err := b.api.DoGeolocationLookup() - if err == nil { - log.Debug(). - Str("countryCode", countryCode). - Msg("Successfully got country code") - } else { + err := b.api.DoGeolocationLookup() + if err != nil { log.Warn(). Str("err", err.Error()). Msgf("Could not do geolocation lookup") diff --git a/pkg/vpn/bonafide/bonafide.go b/pkg/vpn/bonafide/bonafide.go index 6c2b3517a47bff38466f8247869f70603f1d899b..d3437bcfd93dac60935becd44eda78b252d08864 100644 --- a/pkg/vpn/bonafide/bonafide.go +++ b/pkg/vpn/bonafide/bonafide.go @@ -412,6 +412,6 @@ func (b *Bonafide) GetSnowflakeCh() chan *snowflake.StatusEvent { return b.snowflakeCh } -func (b *Bonafide) DoGeolocationLookup() (string, error) { - return "", errors.New("DoGeolocationLookup is not supported in v3 (only implemented in bitmask-core)") +func (b *Bonafide) DoGeolocationLookup() error { + return errors.New("DoGeolocationLookup is not supported in v3 (only implemented in bitmask-core)") } diff --git a/pkg/vpn/interface.go b/pkg/vpn/interface.go index fce11fd237b1703081beff04399e2f3a1dcd7068..6eb5c06627d877bfae12a6238665ab4ad0ea7789 100644 --- a/pkg/vpn/interface.go +++ b/pkg/vpn/interface.go @@ -21,5 +21,5 @@ type apiInterface interface { GetBestGateways(transport string) ([]bonafide.Gateway, error) FetchAllGateways(transport string) error GetSnowflakeCh() chan *snowflake.StatusEvent - DoGeolocationLookup() (string, error) + DoGeolocationLookup() error } diff --git a/pkg/vpn/menshen/init.go b/pkg/vpn/menshen/init.go index 90f9989deb01c6fcc45df530889b4f816fd06560..853af0fb42df390cc658a184c17dd967bc64a2aa 100644 --- a/pkg/vpn/menshen/init.go +++ b/pkg/vpn/menshen/init.go @@ -146,6 +146,6 @@ func (m *Menshen) GetSnowflakeCh() chan *snowflake.StatusEvent { return nil } -func (m *Menshen) DoGeolocationLookup() (string, error) { +func (m *Menshen) DoGeolocationLookup() error { return m.api.DoGeolocationLookup() }