Python VPN server.
Project description
VPN Server implemented in pure Python. (For Research Purposes Only)
Introduction
All VPN softwares are stupid, clumsy and hard to configure. So comes python-vpn.
NO app install needed
NO server configuration file
NO network interface added
NO iptables or “/etc” modified
Press “RETURN” to start, “CTRL+C” to stop.
QuickStart
$ pip3 install pvpn
Successfully installed pvpn-0.2.1
$ pvpn -p yourpassword
Serving on UDP :500 :4500...
^C
$ pvpn -wg 9000
Serving on UDP :500 :4500...
Serving on UDP :9000 (WIREGUARD)...
^C
Open server’s UDP port :500 :4500 to your device. In device’s system setting, add an “IPSec” (iOS) or “IPSec IKE PSK” (Android) node, write down the server address and password “yourpassword”. Connect.
If you prefer wireguard VPN, specify “-wg (port)” parameter and open server’s (port) UDP port to your device. Paste the printed server public key to wireguard client settings, write down the server address:port. Connect.
You should modify the default password “test” with a good one. See “pvpn -h” for more options.
Features
Clean, lightweight
IKEv1, IKEv2, L2TP auto-detection
WireGuard
TCP stack
TCP/UDP tunnel
DNS cache
Protocols
Protocol Name |
Name in iOS |
Name in Android |
Name in MacOS |
Name in Windows |
---|---|---|---|---|
L2TP PSK ✔ |
L2TP |
“L2TP/IPSec PSK” |
L2TP/IPSec |
L2TP |
IKEv1 PSK ✔ |
IPsec [1] |
“IPSec Xauth PSK” |
Cisco IPSec |
IPSec |
IKEv2 PSK ✔ |
IKEv2 [2] |
“IPSec IKEv2 PSK” |
IKEv2 |
IKEv2 |
WireGuard ✔ |
WireGuard App [3] |
Examples
TCP Tunnel
If the remote host match in file "rules.country", tunnel through http proxy. $ pvpn -r http://remote_server:port?rules.country
UDP Tunnel
Redirect all DNS requests to 8.8.8.8. $ pvpn -ur tunnel://8.8.8.8:53?{53}
Specifications
IPSec/ESP
RFC2406 IP Encapsulating Security Payload (ESP)
RFC3947 Negotiation of NAT-Traversal in the IKE
RFC3948 UDP Encapsulation of IPsec ESP Packets
IKE/ISAKMP
RFC2407 The Internet IP Security Domain of Interpretation for ISAKMP
RFC2408 Internet Security Association and Key Management Protocol (ISAKMP)
RFC2409 The Internet Key Exchange (IKE)
IANA_01 Internet Key Exchange (IKE) Attributes
IANA_02 “Magic Numbers” for ISAKMP Protocol
DRAFT_1 The ISAKMP Configuration Method
DRAFT_2 Extended Authentication within IKE (XAUTH)
IKEv2
RFC7296 Internet Key Exchange Protocol Version 2 (IKEv2)
IANA_03 Internet Key Exchange Version 2 (IKEv2) Parameters
RFC3748 Extensible Authentication Protocol (EAP)
RFC5106 The Extensible Authentication Protocol-Internet Key Exchange Protocol version 2 (EAP-IKEv2) Method
Diffie Hellman
RFC3526 More Modular Exponential (MODP) Diffie-Hellman groups for Internet Key Exchange (IKE)
RFC5903 Elliptic Curve Groups modulo a Prime (ECP Groups) for IKE and IKEv2
RFC5114 Additional Diffie-Hellman Groups for Use with IETF Standards
L2TP
RFC2661 Layer Two Tunneling Protocol “L2TP”
RFC3193 Securing L2TP using IPsec
RFC1549 PPP in HDLC Framing
RFC1661 The Point-to-Point Protocol (PPP)
RFC1332 The PPP Internet Protocol Control Protocol (IPCP)
WireGuard
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pvpn-0.2.5.tar.gz
.
File metadata
- Download URL: pvpn-0.2.5.tar.gz
- Upload date:
- Size: 39.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02756aa5f1598dc9e06740a9e7a7e1fc992c04d515d6e6596629858a8807bb21 |
|
MD5 | dc5d18d51461908c11f3210b29db7551 |
|
BLAKE2b-256 | 51b0d6ba46f715a0d73b88cb768a1f396d5e376ecd7a892987916682fc42c631 |
File details
Details for the file pvpn-0.2.5-py3-none-any.whl
.
File metadata
- Download URL: pvpn-0.2.5-py3-none-any.whl
- Upload date:
- Size: 70.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1cd78dbfdb62b90ff9e6c01de862f58dbafd783f38ccddb2607ed84554c70a2 |
|
MD5 | 124c0c415fca9221f69a49fe21c03f87 |
|
BLAKE2b-256 | 2b435a52804632fb70426e324d1f36b58d30871f37403ddf4b64f349e29541e1 |