Changed the IP checking service for "check-vpn" #68

Merged
gloof11 merged 2 commits from fix-surfshark-check-vpn into master 2024-09-24 10:06:54 -03:00
gloof11 commented 2024-06-20 10:00:13 -03:00 (Migrated from gitlab.com)

The original "check-vpn" used an endpoint that is no longer online.
FIX: Replace the endpoint with ipinfo.io, a currently active service.

The original fix was for Surfshark, but I'm positive that this will work with any attached VPN.

The original "check-vpn" used an endpoint that is no longer online. FIX: Replace the endpoint with ipinfo.io, a currently active service. The original fix was for Surfshark, but I'm positive that this will work with any attached VPN.
rogs commented 2024-06-20 10:05:01 -03:00 (Migrated from gitlab.com)

I can verify curl -s api.ipify.org still works on my machine. Your country and/or ISP might be blocking the page image{width=3269 height=57}

I can verify `curl -s api.ipify.org` still works on my machine. Your country and/or ISP might be blocking the page ![image](/uploads/c4497bff8374ee97d5da73a7385ae3cf/image.png){width=3269 height=57}
rogs commented 2024-06-20 10:10:31 -03:00 (Migrated from gitlab.com)

jq is not a requirement for YAMS

`jq` is not a requirement for YAMS
rogs commented 2024-06-20 10:10:31 -03:00 (Migrated from gitlab.com)

This looks hacky. If you can find an API that responds with the raw IP address (like ifconfig.me), it could be better.

Note: Don't use ifconfig.me as the solution since we used that in the past and had to change it because some users were complaining it was blocked in their countries

This looks hacky. If you can find an API that responds with the raw IP address (like `ifconfig.me`), it could be better. Note: Don't use `ifconfig.me` as the solution since we used that in the past and had to change it because some users were complaining it was blocked in their countries
rogs commented 2024-06-20 10:10:32 -03:00 (Migrated from gitlab.com)

We already changed from ifconfig.me to api.ipify.org a few months ago.

I'm not against this idea, but if we are going to replace api.ipify.org it needs to be with an API that does the same thing. I wouldn't like to introduce more dependencies to YAMS (like jq) without a very good reason.

We already changed from `ifconfig.me` to `api.ipify.org` a few months ago. I'm not against this idea, but if we are going to replace `api.ipify.org` it needs to be with an API that does the same thing. I wouldn't like to introduce more dependencies to YAMS (like `jq`) without a very good reason.
rogs commented 2024-06-20 10:10:32 -03:00 (Migrated from gitlab.com)

requested changes

requested changes
methbkts commented 2024-06-20 11:41:51 -03:00 (Migrated from gitlab.com)

no need to use json and grep -> ipinfo.io/ip

no need to use json and grep -> `ipinfo.io/ip`
methbkts commented 2024-06-20 11:48:17 -03:00 (Migrated from gitlab.com)

api.ipify.org works well for me.
but if we're gonna change, one alternative could be https://am.i.mullvad.net/ip
as we use it for the country already.

`api.ipify.org` works well for me. but if we're gonna change, one alternative could be `https://am.i.mullvad.net/ip` as we use it for the country already.
rogs commented 2024-06-20 12:05:08 -03:00 (Migrated from gitlab.com)

We had some problems with https://am.i.mullvad.net/ip in the past. It appears some VPNs block that domain. Thank you for the recomendation on ipinfo.io/ip!

We had some problems with `https://am.i.mullvad.net/ip` in the past. It appears some VPNs block that domain. Thank you for the recomendation on `ipinfo.io/ip`!
gloof11 commented 2024-06-20 12:24:05 -03:00 (Migrated from gitlab.com)

jq in this context isn't running on the YAMS host but only within the qbittorrent container. In any case using https://ipinfo.io/ip is far more efficient.

`jq` in this context isn't running on the YAMS host but only within the qbittorrent container. In any case using `https://ipinfo.io/ip` is far more efficient.
gloof11 commented 2024-06-20 12:25:41 -03:00 (Migrated from gitlab.com)

Turns out my PiHole on my LAN was blocking requests to ipify.org :P
@methbkts Thank you for putting ipinfo.io/ip on the table.
Would it be worth getting a bigger list of endpoints that can be used to get your IP address for others that might be in my situation? It would go down a list of known good endpoints until it finds one that gets a response.

Turns out my PiHole on my LAN was blocking requests to `ipify.org` :P @methbkts Thank you for putting `ipinfo.io/ip` on the table. Would it be worth getting a bigger list of endpoints that can be used to get your IP address for others that might be in my situation? It would go down a list of known good endpoints until it finds one that gets a response.
gloof11 commented 2024-06-20 12:26:26 -03:00 (Migrated from gitlab.com)

changed this line in version 2 of the diff

changed this line in [version 2 of the diff](/rogs/yams/-/merge_requests/19/diffs?diff_id=1042819000&start_sha=8f216a56bff3783fe84887db9099f4505a98ff34#54039552e5da64155f69e8dae18f86fdaa821a72_63_63)
gloof11 commented 2024-06-20 12:26:27 -03:00 (Migrated from gitlab.com)

changed this line in version 2 of the diff

changed this line in [version 2 of the diff](/rogs/yams/-/merge_requests/19/diffs?diff_id=1042819000&start_sha=8f216a56bff3783fe84887db9099f4505a98ff34#54039552e5da64155f69e8dae18f86fdaa821a72_56_56)
gloof11 commented 2024-06-20 12:26:27 -03:00 (Migrated from gitlab.com)

added 1 commit

  • 47444eee - Changed the IP checking service for "check-vpn"

Compare with previous version

added 1 commit <ul><li>47444eee - Changed the IP checking service for &quot;check-vpn&quot;</li></ul> [Compare with previous version](/rogs/yams/-/merge_requests/19/diffs?diff_id=1042819000&start_sha=8f216a56bff3783fe84887db9099f4505a98ff34)
gloof11 commented 2024-06-20 12:27:30 -03:00 (Migrated from gitlab.com)

added 1 commit

  • 3a7dbab3 - Changed the IP checking service for "check-vpn"

Compare with previous version

added 1 commit <ul><li>3a7dbab3 - Changed the IP checking service for &quot;check-vpn&quot;</li></ul> [Compare with previous version](/rogs/yams/-/merge_requests/19/diffs?diff_id=1042820559&start_sha=47444eee36e457d4028446a7b300a34b6f72f73e)
rogs commented 2024-06-20 14:14:52 -03:00 (Migrated from gitlab.com)

I'm kinda hesitant of making this change, but having a list of "possible" endpoints would be nice, and would make the decision a lot easier 😄

I'm kinda hesitant of making this change, but having a list of "possible" endpoints would be nice, and would make the decision a lot easier :smile:
gloof11 commented 2024-06-21 08:14:48 -03:00 (Migrated from gitlab.com)

added 1 commit

  • 3ff04b84 - Added multiple IP checker endpoints

Compare with previous version

added 1 commit <ul><li>3ff04b84 - Added multiple IP checker endpoints</li></ul> [Compare with previous version](/rogs/yams/-/merge_requests/19/diffs?diff_id=1043664528&start_sha=3a7dbab35c802c02f9e26644db6b5f9936ed0c1f)
gloof11 commented 2024-06-21 08:15:47 -03:00 (Migrated from gitlab.com)

resolved all threads

resolved all threads
rogs commented 2024-09-24 10:06:45 -03:00 (Migrated from gitlab.com)

I like this change! I don't know why I missed the updates. I'm merging this change 👍

I like this change! I don't know why I missed the updates. I'm merging this change :thumbsup:
rogs commented 2024-09-24 10:06:54 -03:00 (Migrated from gitlab.com)

mentioned in commit b5bf199237

mentioned in commit b5bf1992371b025896a0eebb9358f944431001f3
rogs (Migrated from gitlab.com) merged commit b5bf199237 into master 2024-09-24 10:06:55 -03:00
methbkts commented 2024-09-24 10:26:37 -03:00 (Migrated from gitlab.com)

things to note, for me the 3 first endpoints gives me ipv4, the 3 others gives me ipv6

things to note, for me the 3 first endpoints gives me ipv4, the 3 others gives me ipv6
rogs commented 2024-09-24 10:32:19 -03:00 (Migrated from gitlab.com)

Maybe we should regex for a correct IP in the ipv4 format?

Maybe we should regex for a correct IP in the ipv4 format?
gloof11 commented 2024-09-24 10:37:19 -03:00 (Migrated from gitlab.com)

Interesting. The important thing is that the region is different but it would be best if you knew that your IP was in fact changed. I can look further into the endpoints I added to see if you can only request an IPv4 address. Note: this will depend on the client side ISP. I’ve heard of some ISP’s only giving their customers IPv6 addresses.

Interesting. The important thing is that the region is different but it would be best if you knew that your IP was in fact changed. I can look further into the endpoints I added to see if you can only request an IPv4 address. Note: this will depend on the client side ISP. I’ve heard of some ISP’s only giving their customers IPv6 addresses.
MasonStooksbury commented 2024-09-24 10:38:54 -03:00 (Migrated from gitlab.com)

That's super weird because I got ipv4 for all of them...

That's super weird because I got ipv4 for all of them...
gloof11 commented 2024-09-24 10:41:24 -03:00 (Migrated from gitlab.com)

@MasonStooksbury It’s completely dependent on the routes your ISP uses. @methbkts brings up a good point. It’d be best that you can verify that your public IP is different. Either way, if your VPN is working, your region should be different.

@MasonStooksbury It’s completely dependent on the routes your ISP uses. @methbkts brings up a good point. It’d be best that you can verify that your public IP is different. Either way, if your VPN is working, your region should be different.
MasonStooksbury commented 2024-09-24 10:42:45 -03:00 (Migrated from gitlab.com)

Yep, just saw that. My comment was pending and came out after yours instead lol

Yep, just saw that. My comment was pending and came out after yours instead lol
rogs commented 2024-09-24 10:43:18 -03:00 (Migrated from gitlab.com)

@gloof11 maybe you can add a regex check to verify that the IP given is an IPV4? Either way, I think it's overkill. As long as the IPV6 is different than the IPV4 and regions are different, it should be fine

@gloof11 maybe you can add a regex check to verify that the IP given is an IPV4? Either way, I think it's overkill. As long as the IPV6 is different than the IPV4 and regions are different, it should be fine
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rogs/yams#68
No description provided.