티스토리 뷰
반응형
https://openvpn.net/community-downloads/
Community Downloads | OpenVPN
Visit this page to download the latest version of the open source VPN, OpenVPN.
openvpn.net
릴리즈 보면서 적당히 최신순으로
여기서 Windows 64-bit MSI installer 로 설치한다 . 윈도우 기준
윈도우에서 시스템 환경 변수 편집으로들어가서 시스템속성 -> 환경 변수
환경변수에 추가해준다.
https://gist.github.com/Lazza/bbc15561b65c16db8ca8
VPNGate Python script
VPNGate Python script. GitHub Gist: instantly share code, notes, and snippets.
gist.github.com
vpngate.py
#!/usr/bin/env python
"""Pick server and start connection with VPNGate (http://www.vpngate.net/en/)"""
import requests, os, sys, tempfile, subprocess, base64, time
__author__ = "Andrea Lazzarotto"
__copyright__ = "Copyright 2014+, Andrea Lazzarotto"
__license__ = "GPLv3"
__version__ = "1.0"
__maintainer__ = "Andrea Lazzarotto"
__email__ = "andrea.lazzarotto@gmail.com"
if len(sys.argv) != 2:
print 'usage: ' + sys.argv[0] + ' [country name | country code]'
exit(1)
country = sys.argv[1]
if len(country) == 2:
i = 6 # short name for country
elif len(country) > 2:
i = 5 # long name for country
else:
print 'Country is too short!'
exit(1)
try:
vpn_data = requests.get('http://www.vpngate.net/api/iphone/').text.replace('\r','')
servers = [line.split(',') for line in vpn_data.split('\n')]
labels = servers[1]
labels[0] = labels[0][1:]
servers = [s for s in servers[2:] if len(s) > 1]
except:
print 'Cannot get VPN servers data'
exit(1)
desired = [s for s in servers if country.lower() in s[i].lower()]
found = len(desired)
print 'Found ' + str(found) + ' servers for country ' + country
if found == 0:
exit(1)
supported = [s for s in desired if len(s[-1]) > 0]
print str(len(supported)) + ' of these servers support OpenVPN'
# We pick the best servers by score
winner = sorted(supported, key=lambda s: float(s[2].replace(',','.')), reverse=True)[0]
print "\n== Best server =="
pairs = zip(labels, winner)[:-1]
for (l, d) in pairs[:4]:
print l + ': ' + d
print pairs[4][0] + ': ' + str(float(pairs[4][1]) / 10**6) + ' MBps'
print "Country: " + pairs[5][1]
print "\nLaunching VPN..."
_, path = tempfile.mkstemp()
f = open(path, 'w')
f.write(base64.b64decode(winner[-1]))
f.write('\nscript-security 2\nup /etc/openvpn/update-resolv-conf\ndown /etc/openvpn/update-resolv-conf')
f.close()
x = subprocess.Popen(['sudo', 'openvpn', '--config', path])
try:
while True:
time.sleep(600)
# termination with Ctrl+C
except:
try:
x.kill()
except:
pass
while x.poll() != 0:
time.sleep(1)
print '\nVPN terminated'
한국은 korea 로 해주면됩니다. Korea Republic Of ...
당연히 북한은없겠죠 ㅋㅋ
리눅스는
sudo apt-get install openvpn
실행해본뒤에 ip 조회 사이트로 체크해보시면 편합니다
반응형
'웹' 카테고리의 다른 글
javascript 스크롤 페이지 이동 유지하기 . (0) | 2022.12.30 |
---|---|
Chat GPT 설명 (0) | 2022.12.26 |
해당 회원이 쓴 글 목록만 출력하는 아미나 위젯 (0) | 2021.04.15 |
그누보드 아미나 멀티카테고리 (2차분류) 버전 (0) | 2021.04.15 |
트위터 인스타그램 등 sns 와 이미지 동영상 주소로 미리보기 자동 변환 토글 버튼 출처포함 (0) | 2021.01.30 |
댓글
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- Apache
- 텔레그램봇
- 그누보드5
- Fullcalendar
- 루팅
- SSL
- 오토셋
- Cloudflare
- 아파치
- 에러
- Magisk
- 셀레니움
- 파이썬
- 제로보드
- .htaccess
- 멀티계정
- 파이선
- 당근
- python
- 텔레그램
- 그누보드
- php
- php8
- xe
- lsposed
- 윈도우
- 회원가입
- 클라우드플레어
- 유튜브
- 아미나
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
글 보관함