Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use previous geolookup for ios #1267

Merged
merged 2 commits into from
Dec 17, 2024
Merged

use previous geolookup for ios #1267

merged 2 commits into from
Dec 17, 2024

Conversation

garmr-ulfr
Copy link
Contributor

@garmr-ulfr garmr-ulfr commented Dec 16, 2024

Since iOS uses it's own code to fetch proxy configs instead of the grouped request, it's unable to retrieve geolocation. This PR adds the old geolookup code exclusively for iOS to use.

The geolookup package was copied directly from flashlight's old geolookup package.

@atavism
Copy link
Contributor

atavism commented Dec 17, 2024

Just did some quick testing: the country is still AF for me when I submit an issue report. I'm seeing this in the logs:

DEBUG ios.geolookup: geolookup.go:64 Could not get country: could not get geoinfo with timeout 1m0s: context deadline exceeded

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to call geolookup.Refresh() before GetCountry, now it works

Copy link
Contributor

@jigar-f jigar-f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one change added, otherwise LGTM

@jigar-f jigar-f merged commit fc6a436 into main Dec 17, 2024
2 checks passed
@jigar-f jigar-f deleted the ios-geolocation branch December 17, 2024 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants