Jump to content
Not connected, Your IP: 18.118.119.229
artephius

API: Query for server ip?

Recommended Posts

Is there a way to (programatically) find a server's ip if its name is known?

 

For example I can use the API and query the "status" service and get a nice list of servers and which is the recommended one, but the array doesn't contain the ip.

 

I'd like to be able to programatically find the best server (using the status service) then get it's IP (somehow), and alter my config file and connect to that server (much like the AirVpn client software does it.)

 

I can't find anywhere on airvpn.org to obtain the ip addresses other than manually going through the config file generator...

 

Thanks!

Share this post


Link to post

Is there a way to (programatically) find a server's ip if its name is known?

Hello!

 

You can resolve .airvpn.org. For example:

 

$ dig @95.85.9.86 acrux.airvpn.org +short

37.48.81.12

 

Kind regards

Share this post


Link to post

Ah I didn't realize the servers were all found at <servername>.airvpn.org! That make's things very easy.

Thank you!

 

Share this post


Link to post

One small thing, you mentioned that you want to "programatically find the best server".

In that case Air made it easy, you have to just ping the country code.vpn.airdns.org, it will return the most recommended server.

 

i.e.

ping de.vpn.airdns.org

PING de.vpn.airdns.org (178.162.198.102): 56 data bytes

 

64 bytes from 178.162.198.102: icmp_seq=0 ttl=52 time=142.354 ms

 

And indeed we see that I got "Seginus" in reply, which was the most recommended DE server at the time of writing.


Occasional moderator, sometimes BOFH. Opinions are my own, except when my wife disagrees.

Share this post


Link to post

That's good to know. Right now I'm just hitting the api/status page and getting the best servers out of the country list data (which is why I needed to know how to find their IP addresses as that data only contains the server's name) but your way is probably easier (well less code anyway).

Thanks

Share this post


Link to post

Hello!

 

Anyway, we just added the "Entry-IP" field for servers, and the "Best Server" by country/continent/planet.

 

Kind regards

Share this post


Link to post

Hello!

 

Anyway, we just added the "Entry-IP" field for servers, and the "Best Server" by country/continent/planet.

 

Kind regards

hi staff

would you share a screenshot for the related tab of eddie, please? so that non-premium members could see the way it looks.

Share this post


Link to post

 

Hello!

 

Anyway, we just added the "Entry-IP" field for servers, and the "Best Server" by country/continent/planet.

 

Kind regards

hi staff

would you share a screenshot for the related tab of eddie, please? so that non-premium members could see the way it looks.

 

Just so you know, this particular conversation and the field they added has to do with the API, which doesn't really have anything to do with eddie, but I'm sure someone probably has a screenshot of eddie you might want to make your own thread asking for that.

Share this post


Link to post

Hello!

 

Anyway, we just added the "Entry-IP" field for servers, and the "Best Server" by country/continent/planet.

 

Kind regards

 

Hi, just tried this, but it doesn't include the Entry-IP (see below).

 

<status result="ok">
<servers>
<servers public_name="Acamar" country_name="United States" country_code="us" location="Miami" continent="America" bw="80" bw_max="1000" users="53" currentload="8"/>
<servers public_name="Acrux" country_name="Netherlands" country_code="nl" location="Amsterdam" continent="Europe" bw="118" bw_max="1000" users="58" currentload="11"/>
...
 
Please advise. Thanks.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image

×
×
  • Create New...