Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ruped24/autovpn2
OpenVPN VPN Gate Client for Linux, connects you to a random Free VPN in a country of your choice by country code.
https://github.com/ruped24/autovpn2
anonymous anonymous-proxy openvpn-client vpn vpn-client vpn-gateway vpn-relay zero-configuration zero-knowledge
Last synced: 2 months ago
JSON representation
OpenVPN VPN Gate Client for Linux, connects you to a random Free VPN in a country of your choice by country code.
- Host: GitHub
- URL: https://github.com/ruped24/autovpn2
- Owner: ruped24
- Created: 2020-05-13T21:32:33.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-07-05T12:11:30.000Z (over 1 year ago)
- Last Synced: 2024-02-14T21:35:24.737Z (12 months ago)
- Topics: anonymous, anonymous-proxy, openvpn-client, vpn, vpn-client, vpn-gateway, vpn-relay, zero-configuration, zero-knowledge
- Language: Python
- Homepage:
- Size: 126 KB
- Stars: 39
- Watchers: 3
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-discoveries - autovpn2 - connect to random VPN servers from vpngate.net in a selected country _(`Python`)_ (DevOps Utilities)
README
# autovpn2
![](https://img.shields.io/badge/autovpn2-python_2.7-blue.svg?style=flat-square) ![](https://img.shields.io/badge/autovpn2-AppImage-red.svg?style=flat-square) ![](https://img.shields.io/badge/dependencies-openvpn-orange.svg?style=flat-square) [![](https://img.shields.io/badge/License-WTFPL%202.0-lightgrey.svg?style=flat-square)](http://www.wtfpl.net/) [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg?style=flat-square)](https://github.com/ruped24/autovpn2/graphs/commit-activity)[VPN Gate](https://www.vpngate.net/en/) OpenVPN 2.4 Client to Free VPN Access. You can get through firewalls and beyond to browse restricted websites.
---
### Usage:
```bash
sudo autovpn2 KR
```Expand for usage
**How to connect to a VPN Gate server:**
Expand for VPN Gate Servers List
[► **vpngate-x86_64.AppImage**](https://github.com/ruped24/autovpn2/releases/tag/v1.0)
Expand for Connectable countriesExecute ` ./vpngate-x86_64.AppImage` to get an updated list of connectable countries.
```
[?] Fetching vpngate servers
[+] Parsing servers responseConnectable countries
JP) Japan KR) Korea Republic of
TH) Thailand TW) Taiwan
US) United States VN) Viet Nam
```[► **VPN Gate Servers List**](https://www.vpngate.net/en/)
_E.g._ Korea Republic (**KR** [:kr:](https://en.wikipedia.org/wiki/South_Korea))
To **start** the VPN: _E.g._ ` sudo autovpn2 KR`
To **stop** the VPN: Press CTRL + c
The _autovpn2_ script will ask if you want to try another VPN.
If you want to retry another VPN, then press y, if you want to quit, press n
***
Expand for ISO 3166 country codes
Country
CodeASCENSION ISLAND
acAFGHANISTAN
afALAND
axALBANIA
alALGERIA
dzANDORRA
adANGOLA
aoANGUILLA
aiANTARCTICA
aqANTIGUA AND BARBUDA
agARGENTINA REPUBLIC
arARMENIA
amARUBA
awAUSTRALIA
auAUSTRIA
atAZERBAIJAN
azBAHAMAS
bsBAHRAIN
bhBANGLADESH
bdBARBADOS
bbBELARUS
byBELGIUM
beBELIZE
bzBENIN
bjBERMUDA
bmBHUTAN
btBOLIVIA
boBOSNIA AND HERZEGOVINA
baBOTSWANA
bwBOUVET ISLAND
bvBRAZIL
brBRITISH INDIAN OCEAN TERR
ioBRITISH VIRGIN ISLANDS
vgBRUNEI DARUSSALAM
bnBULGARIA
bgBURKINA FASO
bfBURUNDI
biCAMBODIA
khCAMEROON
cmCANADA
caCAPE VERDE
cvCAYMAN ISLANDS
kyCENTRAL AFRICAN REPUBLIC
cfCHAD
tdCHILE
clPEOPLE’S REPUBLIC OF CHINA
cnCHRISTMAS ISLANDS
cxCOCOS ISLANDS
ccCOLOMBIA
coCOMORAS
kmCONGO
cgCONGO (DEMOCRATIC REPUBLIC)
cdCOOK ISLANDS
ckCOSTA RICA
crCOTE D IVOIRE
ciCROATIA
hrCUBA
cuCYPRUS
cyCZECH REPUBLIC
czDENMARK
dkDJIBOUTI
djDOMINICA
dmDOMINICAN REPUBLIC
doEAST TIMOR
tpECUADOR
ecEGYPT
egEL SALVADOR
svEQUATORIAL GUINEA
gqESTONIA
eeETHIOPIA
etFALKLAND ISLANDS
fkFAROE ISLANDS
foFIJI
fjFINLAND
fiFRANCE
frFRANCE METROPOLITAN
fxFRENCH GUIANA
gfFRENCH POLYNESIA
pfFRENCH SOUTHERN TERRITORIES
tfGABON
gaGAMBIA
gmGEORGIA
geGERMANY
deGHANA
ghGIBRALTER
giGREECE
grGREENLAND
glGRENADA
gdGUADELOUPE
gpGUAM
guGUATEMALA
gtGUINEA
gnGUINEA-BISSAU
gwGUYANA
gyHAITI
htHEARD & MCDONALD ISLAND
hmHONDURAS
hnHONG KONG
hkHUNGARY
huICELAND
isINDIA
inINDONESIA
idIRAN, ISLAMIC REPUBLIC OF
irIRAQ
iqIRELAND
ieISLE OF MAN
imISRAEL
ilITALY
itJAMAICA
jmJAPAN
jpJORDAN
joKAZAKHSTAN
kzKENYA
keKIRIBATI
kiKOREA, DEM. PEOPLES REP OF
kpKOREA, REPUBLIC OF
krKUWAIT
kwKYRGYZSTAN
kgLAO PEOPLE’S DEM. REPUBLIC
laLATVIA
lvLEBANON
lbLESOTHO
lsLIBERIA
lrLIBYAN ARAB JAMAHIRIYA
lyLIECHTENSTEIN
liLITHUANIA
ltLUXEMBOURG
luMACAO
moMACEDONIA
mkMADAGASCAR
mgMALAWI
mwMALAYSIA
myMALDIVES
mvMALI
mlMALTA
mtMARSHALL ISLANDS
mhMARTINIQUE
mqMAURITANIA
mrMAURITIUS
muMAYOTTE
ytMEXICO
mxMICRONESIA
fmMOLDAVA REPUBLIC OF
mdMONACO
mcMONGOLIA
mnMONTENEGRO
meMONTSERRAT
msMOROCCO
maMOZAMBIQUE
mzMYANMAR
mmNAMIBIA
naNAURU
nrNEPAL
npNETHERLANDS ANTILLES
anNETHERLANDS, THE
nlNEW CALEDONIA
ncNEW ZEALAND
nzNICARAGUA
niNIGER
neNIGERIA
ngNIUE
nuNORFOLK ISLAND
nfNORTHERN MARIANA ISLANDS
mpNORWAY
noOMAN
omPAKISTAN
pkPALAU
pwPALESTINE
psPANAMA
paPAPUA NEW GUINEA
pgPARAGUAY
pyPERU
pePHILIPPINES (REPUBLIC OF THE)
phPITCAIRN
pnPOLAND
plPORTUGAL
ptPUERTO RICO
prQATAR
qaREUNION
reROMANIA
roRUSSIAN FEDERATION
ruRWANDA
rwSAMOA
wsSAN MARINO
smSAO TOME/PRINCIPE
stSAUDI ARABIA
saSCOTLAND
ukSENEGAL
snSERBIA
rsSEYCHELLES
scSIERRA LEONE
slSINGAPORE
sgSLOVAKIA
skSLOVENIA
siSOLOMON ISLANDS
sbSOMALIA
soSOMOA,GILBERT,ELLICE ISLANDS
asSOUTH AFRICA
zaSOUTH GEORGIA, SOUTH SANDWICH ISLANDS
gsSOVIET UNION
suSPAIN
esSRI LANKA
lkST. HELENA
shST. KITTS AND NEVIS
knST. LUCIA
lcST. PIERRE AND MIQUELON
pmST. VINCENT & THE GRENADINES
vcSUDAN
sdSURINAME
srSVALBARD AND JAN MAYEN
sjSWAZILAND
szSWEDEN
seSWITZERLAND
chSYRIAN ARAB REPUBLIC
syTAIWAN
twTAJIKISTAN
tjTANZANIA, UNITED REPUBLIC OF
tzTHAILAND
thTOGO
tgTOKELAU
tkTONGA
toTRINIDAD AND TOBAGO
ttTUNISIA
tnTURKEY
trTURKMENISTAN
tmTURKS AND CALCOS ISLANDS
tcTUVALU
tvUGANDA
ugUKRAINE
uaUNITED ARAB EMIRATES
aeUNITED KINGDOM (no new registrations)
gbUNITED KINGDOM
ukUNITED STATES
usUNITED STATES MINOR OUTL.IS.
umURUGUAY
uyUZBEKISTAN
uzVANUATU
vuVATICAN CITY STATE
vaVENEZUELA
veVIET NAM
vnVIRGIN ISLANDS (USA)
viWALLIS AND FUTUNA ISLANDS
wfWESTERN SAHARA
ehYEMEN
yeZAMBIA
zmZIMBABWE
zw***
Expand for screenshot, demo and test
[▹ Check My IPx](https://ipx.ac/)[▹ Anonymity check](http://proxydb.net/anon)
[▹ What is my proxy](http://www.whatismyproxy.com)
[▹ DNS leak test](https://dnsleaktest.com/)
:white_square_button: **|** [**Screenshot**](https://drive.google.com/file/d/10oEKydkW7YzZFK7VLOvAzz3HSzSIoED4/view?usp=sharing) **|** [**Demo**](https://drive.google.com/file/d/16VfJfKZqqR0RYzVxmPgfhGNKwsuYHVph/view?usp=sharing) **|**
---
### Dependencies:
```bash
apt install openvpn
```
---### Installation:
```bash
sudo mv autovpn2.py /usr/local/bin/autovpn2
```
---### Frequently Asked Questions:
Expand for Frequently Asked Questions### FAQ:
> Why do I get this missing cipher error message below:`2024-10-11 20:51:59 DEPRECATED OPTION: --cipher set to 'AES-128-CBC' but missing in --data-ciphers (AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305). OpenVPN ignores --cipher for cipher negotiations.
2024-10-11 20:51:59 Note: Kernel support for ovpn-dco missing, disabling data channel offload.
2024-10-11 20:51:59 OpenVPN 2.6.9 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] [DCO]
2024-10-11 20:51:59 library versions: OpenSSL 3.2.2-dev , LZO 2.10
2024-10-11 20:51:59 DCO version: N/A
2024-10-11 20:51:59 WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info.
`VPNGate and autovpn2 client works with OpenVPN 2.4 cipher ['AES-128-CBC'](https://drive.google.com/file/d/1YhjYiK5RFTU1fJgGe5rV_LoOr8b3fkaX/view?usp=sharing)
The Fix is to fallback from 2.6.x to 2.4.x :(> Why do I sometimes get **`[autovpn2] rewriting config file`** stuck in a loop when I use country code JP?
The parser got a bad or corrupt config file for said country from the servers CSV List.You can also use the [vpngate-x86_64.AppImage](https://github.com/ruped24/autovpn2/releases/tag/v1.0) utility to fetch the list of connectable countries.
> The default USA (**US** [:us:](https://en.wikipedia.org/wiki/United_States)) servers seems to be slow to me, which country is the fastest?
In "my" seat-of-the-pants testing, Japan (**JP** [:jp:](https://en.wikipedia.org/wiki/Japan)) or Korea Republic (**KR** [:kr:](https://en.wikipedia.org/wiki/South_Korea)) servers seem to be "faster".> Can I change the default country code?
Yes, you can change the default [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) standard code in the script.
Change Line [21](https://github.com/ruped24/autovpn2/blob/80782a993fafc99a2b8eb67861f15bf654cef594/autovpn2.py#L21) and
Line [45](https://github.com/ruped24/autovpn2/blob/80782a993fafc99a2b8eb67861f15bf654cef594/autovpn2.py#L45) to the country code (Uppercase) of your choice.> How can I get a list of Connetable countries without goinng to [vpngate.net](https://www.vpngate.net/en/) website.
You can use the [vpngate-x86_64.AppImage](https://github.com/ruped24/autovpn2/releases/tag/v1.0) utility to go fetch the connectable list of countries.
> How to fix my DNS leak?Pick one of these free and public [DNS](https://www.lifewire.com/free-and-public-dns-servers-2626062) Servers.
> This is a technical question, WHY Python 2.7???! It's [EOL](https://www.python.org/dev/peps/pep-0373/#maintenance-releases) dude! :confused:
Haha, The truth is, I didn't want to fight (_choosing my battles_;) with [Python3](https://www.pythonconverter.com/)'s bytes to string conversions for this [_one-off_](http://www.wtfpl.net) script.
Personally, I compile my legacy Python 2.7 standalone scripts to a Linux ELF 64-bit LSB executable using [Nuitka](https://nuitka.net/doc/user-manual.html) and [Appimagekit](https://appimage.org).
The created binary executes independent of a Python installation.A [precompiled x86_64 autovpn2 binary](https://github.com/ruped24/autovpn2/releases/tag/v1.0) can be found under releases.
> What's with the name and the "2"?
I wrote this as a drop in replacement for the original [autovpn](https://en.kali.tools/?p=418) written in [Go](https://en.wikipedia.org/wiki/Go_(programming_language)), that's now in Github's [Digital Haven](https://github.com/adtac/autovpn).
The "2" is to not conflict with the original script if installed on said system.
```diff
- Note: autovpn2 defaults to the US servers. The Japan or Korea (JP, KR) servers are preferred.
```---
#### Legal Disclaimer:
###### We are not affiliated with [VPN Gate](https://www.vpngate.net/en/) in any way. We are not advocating the use of their or any Free VPN service.