Skip to content

fix(purevpn/updater): parse country and city from hostname and merges with ip address information#2991

Merged
qdm12 merged 17 commits into
passteque:masterfrom
mlapaj:gluetun_master
Dec 24, 2025
Merged

fix(purevpn/updater): parse country and city from hostname and merges with ip address information#2991
qdm12 merged 17 commits into
passteque:masterfrom
mlapaj:gluetun_master

Conversation

@mlapaj
Copy link
Copy Markdown
Contributor

@mlapaj mlapaj commented Nov 18, 2025

Description

  • The original updater fetches servers from the zip file and checks geo-location of each server IP address. This is not working correctly for virtual servers.
  • Some VPN servers have incorrect geolocation data

Assertions

  • I am aware that we do not accept manual changes to the servers.json file
  • I am aware that any changes to settings should be reflected in the wiki

@qdm12
Copy link
Copy Markdown
Member

qdm12 commented Nov 19, 2025

I have updated them. We should consider to provide a way to update certificates and keys instead of hard-coding them.

Where did you get them from? Any publicly available source for them?

Comment thread internal/provider/purevpn/openvpnconf.go Outdated
Comment thread internal/provider/purevpn/updater/getocation.go Outdated
Comment thread internal/provider/purevpn/updater/getocation.go Outdated
Comment thread internal/provider/purevpn/updater/getocation.go Outdated
Comment thread internal/provider/purevpn/updater/getocation.go Outdated
Comment thread internal/provider/purevpn/updater/getocation.go Outdated
Comment thread internal/provider/purevpn/updater/getocation.go Outdated
Comment thread internal/provider/purevpn/updater/servers.go Outdated
@mlapaj
Copy link
Copy Markdown
Contributor Author

mlapaj commented Nov 19, 2025

I have updated them. We should consider to provide a way to update certificates and keys instead of hard-coding them.

Where did you get them from? Any publicly available source for them?

This was taken from the zip file - Recommended-CA2.zip. See certificates.

@qdm12
Copy link
Copy Markdown
Member

qdm12 commented Dec 23, 2025

A few changes done:

  • openvpn config changes moved out of PR to have a focused PR. I did push those value updates to the master branch attributing you credits in the commit message
  • added missing country codes and city codes in the mapping
  • use country-city codes together to determine city name, because there could be ukl and usl for example (ugh lazies purevpn!)
  • it tries to parse the country and city from the hostname. If it succeeds, it uses the region from the ip info data ONLY if the country and city more or less match what we parsed.
  • if parsing the hostname fails, it uses the country and city from the ip info data
  • on the master branch, I also pushed a change where the ip data fetcher now merges "cleverly" ip data from different sources, to have a more reliable country, city etc.

qdm12 added a commit that referenced this pull request Dec 23, 2025
- Credits to @mlapaj
- Taken and verified from #2991
@qdm12 qdm12 changed the title Fixes for PureVPN fix(purevpn/updater): parse country and city from hostname and merges with ip address information Dec 23, 2025
@qdm12
Copy link
Copy Markdown
Member

qdm12 commented Dec 23, 2025

Also, when it comes to keys/certificates etc. these should not change. It's poor practice to just deprecate these without a every early warning as well. PureVPN is just meh so they changed all their keys/certs/etc. out of nowhere.

qdm12 added a commit that referenced this pull request Dec 24, 2025
- Credits to @mlapaj
- Taken and verified from #2991
@qdm12 qdm12 merged commit 9833302 into passteque:master Dec 24, 2025
6 checks passed
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.

2 participants