Jump to content
Not connected, Your IP: 34.231.247.139

Recommended Posts

Hi,

 

I writed the following python script to connect to Airvpn and update DNS accordingly, etc. It is the first version and I did it mostly to practice a python (also now I'm not able to run eddie on gnome).

 

Any feedback just let me know, also if you have suggestions on how to do things better in python.

 

here the link: https://github.com/machavez84/airvpnConnect

 

Please read theREADME.me file.

 

Regards.

Share this post


Link to post
def findDNS(file):
  dns = ""
  if "443" in file and "UDP" in file:
    dns = "10.4.0.1"
  elif "443" in file and "TCP" in file:
    dns = "10.5.0.1"
  elif "80" in file and "UDP" in file:
    dns = "10.6.0.1"
  elif "80" in file and "TCP" in file:
    dns = "10.7.0.1"
  elif "53" in file and "UDP" in file:
    dns = "10.8.0.1"
  elif "53" in file and "TCP" in file:
    dns = "10.9.0.1"
  elif "1194" in file and "UDP" in file:
    dns = "10.30.0.1"
  elif "1194" in file and "TCP" in file:
    dns = "10.50.0.1"
return dns

Shorten it; set 10.4.0.1 in all cases. Will still work.

 

def getRemoteHost(file):
  remote = ""
  if "AltEntry" in file:
    remote = "earth2.vpn.airdns.org"
  else:
    remote = "earth.vpn.airdns.org"
return remote

Expand this with a user prompt for a server or a geographic area, utilizing techniques in How can I get VPN servers IP addresses?.

 

Then give it a ncurses UI and incorporate the ability to add custom OpenVPN directives. Then implement Network Lock. Behold, an Eddie alternative. Don't listen to me, though

 

Nice work.


Four simple things:
There's a guide to AirVPN. Before you ask questions, take 30 minutes of your time to go through it.

Amazon IPs are not dangerous here. It's the fallback DNS.
Running TOR exits is discouraged. They're subject to restrictions on the internet and harm all AirVPN users.

Furthermore, I propose that your paranoia is to be destroyed. If you overdo privacy, you'll be unique among the mass again.

 

XMPP: gigan3rd@xmpp.airvpn.org or join our lounge@conference.xmpp.airvpn.org

Share this post


Link to post

Hehe, thanks Treiberschreiber,

 

I will enhance it if I have time. Just removed the chattr over /etc/Resolv.conf. I was setting the immutable flag because raspbian jessie was overwriting the file every time.

 

For the FindDNS() I just followed this rules --> https://airvpn.org/specs/

 

Regards.

Share this post


Link to post

For the FindDNS() I just followed this rules --> https://airvpn.org/specs/

 

Yes, everyone finds this one. Staff once mentioned that the same DNS server is listening on all 10.x.0.1 addresses, so in the end I made my life easier and started using static 10.4.0.1 exclusively. This way I also avoided DNS request leaks entirely. On Windows, I needed to write a script to reenable DHCP DNS if I wanted or needed a break from the VPN.

 

On GNU/Linux it's even easier. I've got two network profiles set up in network-manager. One is DHCP and one is DHCP + AirDNS only. No leaks with the second one. Changing is also easier than ever. I love Linux.


Four simple things:
There's a guide to AirVPN. Before you ask questions, take 30 minutes of your time to go through it.

Amazon IPs are not dangerous here. It's the fallback DNS.
Running TOR exits is discouraged. They're subject to restrictions on the internet and harm all AirVPN users.

Furthermore, I propose that your paranoia is to be destroyed. If you overdo privacy, you'll be unique among the mass again.

 

XMPP: gigan3rd@xmpp.airvpn.org or join our lounge@conference.xmpp.airvpn.org

Share this post


Link to post

Hi guys,

 

I'm interested in writing a Python script for Windows that allows me to connect / disconnect AirVPN and connect to specific servers... could anybody elaborate on the general, top level approach here ?

 

So, it appears we cannot control the Eddie GUI client via Python, so we connect to an AirVPN server by creating a .ovpn file ?

 

Where would I get the .ovpn file that the script posted by machavez is asking for ?

 

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...