{"id":13815232,"url":"https://github.com/qwj/python-vpn","last_synced_at":"2025-04-04T13:13:56.742Z","repository":{"id":37760687,"uuid":"163079367","full_name":"qwj/python-vpn","owner":"qwj","description":"VPN Server implemented in pure Python. (For Research Purposes Only)","archived":false,"fork":false,"pushed_at":"2023-04-23T13:53:24.000Z","size":130,"stargazers_count":342,"open_issues_count":10,"forks_count":97,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-07-30T05:18:29.687Z","etag":null,"topics":["esp","ike","ikev1","ikev2","ipsec","lightweight","psk","python","tunnel","vpn","wireguard"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qwj.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-12-25T12:06:59.000Z","updated_at":"2024-07-23T12:38:47.000Z","dependencies_parsed_at":"2024-01-07T22:49:33.780Z","dependency_job_id":"6874f083-9f7d-4e09-b7f4-ea06420cf12a","html_url":"https://github.com/qwj/python-vpn","commit_stats":{"total_commits":61,"total_committers":2,"mean_commits":30.5,"dds":"0.11475409836065575","last_synced_commit":"b09e4ab180e3cb4c6b480e9693e8f19854c7b6ec"},"previous_names":["qwj/python-esp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qwj%2Fpython-vpn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qwj%2Fpython-vpn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qwj%2Fpython-vpn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qwj%2Fpython-vpn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qwj","download_url":"https://codeload.github.com/qwj/python-vpn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247182420,"owners_count":20897381,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["esp","ike","ikev1","ikev2","ipsec","lightweight","psk","python","tunnel","vpn","wireguard"],"created_at":"2024-08-04T04:03:10.340Z","updated_at":"2025-04-04T13:13:56.716Z","avatar_url":"https://github.com/qwj.png","language":"Python","readme":"python-vpn\n============\n\n|made-with-python| |PyPI-version| |Hit-Count| |Downloads| |Downloads-month| |Downloads-week|\n\n.. |made-with-python| image:: https://img.shields.io/badge/Made%20with-Python-1f425f.svg\n   :target: https://www.python.org/\n.. |PyPI-version| image:: https://badge.fury.io/py/pvpn.svg\n   :target: https://pypi.python.org/pypi/pvpn/\n.. |Hit-Count| image:: http://hits.dwyl.io/qwj/python-vpn.svg\n   :target: https://pypi.python.org/pypi/pvpn/\n.. |Downloads| image:: https://pepy.tech/badge/pvpn\n   :target: https://pepy.tech/project/pvpn\n.. |Downloads-month| image:: https://pepy.tech/badge/pvpn/month\n   :target: https://pepy.tech/project/pvpn\n.. |Downloads-week| image:: https://pepy.tech/badge/pvpn/week\n   :target: https://pepy.tech/project/pvpn\n\nVPN Server implemented in pure Python. **(For Research Purposes Only)**\n\nIntroduction\n------------\n\nAll VPN softwares are stupid, clumsy and hard to configure. So comes **python-vpn**.\n\n- NO app install needed\n- NO server configuration file\n- NO network interface added\n- NO iptables or \"/etc\" modified\n\nPress \"RETURN\" to start, \"CTRL+C\" to stop.\n\nQuickStart\n----------\n\n.. code:: rst\n\n  $ pip3 install pvpn\n  Successfully installed pvpn-0.2.1\n  $ pvpn -p yourpassword\n  Serving on UDP :500 :4500...\n  ^C\n  $ pvpn -wg 9000\n  Serving on UDP :500 :4500...\n  Serving on UDP :9000 (WIREGUARD)...\n  ^C\n\nOpen 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.\n\nIf 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.\n\nYou should modify the default password \"test\" with a good one. See \"pvpn -h\" for more options.\n\nFeatures\n--------\n\n- Clean, lightweight\n- IKEv1, IKEv2, L2TP auto-detection\n- WireGuard\n- TCP stack\n- TCP/UDP tunnel\n- DNS cache\n\nProtocols\n---------\n\n+-------------------+----------------+-------------------+----------------+------------------+\n| Protocol Name     | Name in iOS    | Name in Android   | Name in MacOS  | Name in Windows  |\n+===================+================+===================+================+==================+\n| L2TP PSK ✔        | L2TP           | \"L2TP/IPSec PSK\"  | L2TP/IPSec     | L2TP             |\n+-------------------+----------------+-------------------+----------------+------------------+\n| IKEv1 PSK ✔       | IPsec **[1]**  | \"IPSec Xauth PSK\" | Cisco IPSec    | IPSec            |\n+-------------------+----------------+-------------------+----------------+------------------+\n| IKEv2 PSK ✔       | IKEv2 **[2]**  | \"IPSec IKEv2 PSK\" | IKEv2          | IKEv2            |\n+-------------------+----------------+-------------------+----------------+------------------+\n| WireGuard ✔       | WireGuard App **[3]**                                                  |\n+-------------------+----------------+-------------------+----------------+------------------+\n\n| **[1]** Do not use certificates\n| **[2]** Turn off \"user authentication\"\n| **[3]** Turn off \"preshared key\"\n\nExamples\n--------\n\n- TCP Tunnel\n\n  .. code:: rst\n\n    If the remote host match in file \"rules.country\", tunnel through http proxy.\n\n    $ pvpn -r http://remote_server:port?rules.country\n\n- UDP Tunnel\n\n  .. code:: rst\n\n    Redirect all DNS requests to 8.8.8.8.\n\n    $ pvpn -ur tunnel://8.8.8.8:53?{53}\n\nSpecifications\n--------------\n\nIPSec/ESP\n\n+ `RFC2406 \u003chttps://tools.ietf.org/html/rfc2406\u003e`_ IP Encapsulating Security Payload (ESP)\n+ `RFC3947 \u003chttps://tools.ietf.org/html/rfc3947\u003e`_  Negotiation of NAT-Traversal in the IKE\n+ `RFC3948 \u003chttps://tools.ietf.org/html/rfc3948\u003e`_ UDP Encapsulation of IPsec ESP Packets\n\nIKE/ISAKMP\n\n+ `RFC2407 \u003chttps://tools.ietf.org/html/rfc2407\u003e`_ The Internet IP Security Domain of Interpretation for ISAKMP\n+ `RFC2408 \u003chttps://tools.ietf.org/html/rfc2408\u003e`_ Internet Security Association and Key Management Protocol (ISAKMP)\n+ `RFC2409 \u003chttps://tools.ietf.org/html/rfc2409\u003e`_ The Internet Key Exchange (IKE)\n+ `IANA_01 \u003chttps://www.iana.org/assignments/ipsec-registry/ipsec-registry.xhtml\u003e`_ Internet Key Exchange (IKE) Attributes\n+ `IANA_02 \u003chttps://www.iana.org/assignments/isakmp-registry/isakmp-registry.xhtml\u003e`_ \"Magic Numbers\" for ISAKMP Protocol\n+ `DRAFT_1 \u003chttps://tools.ietf.org/html/draft-dukes-ike-mode-cfg-01\u003e`_ The ISAKMP Configuration Method\n+ `DRAFT_2 \u003chttps://tools.ietf.org/html/draft-beaulieu-ike-xauth-02\u003e`_ Extended Authentication within IKE (XAUTH)\n\nIKEv2\n\n+ `RFC7296 \u003chttps://tools.ietf.org/html/rfc7296\u003e`_ Internet Key Exchange Protocol Version 2 (IKEv2)\n+ `IANA_03 \u003chttps://www.iana.org/assignments/ikev2-parameters/ikev2-parameters.xhtml\u003e`_ Internet Key Exchange Version 2 (IKEv2) Parameters\n+ `RFC3748 \u003chttps://tools.ietf.org/html/rfc3748\u003e`_ Extensible Authentication Protocol (EAP)\n+ `RFC5106 \u003chttps://tools.ietf.org/html/rfc5106\u003e`_ The Extensible Authentication Protocol-Internet Key Exchange Protocol version 2 (EAP-IKEv2) Method\n\nDiffie Hellman\n\n+ `RFC3526 \u003chttps://tools.ietf.org/html/rfc3526\u003e`_ More Modular Exponential (MODP) Diffie-Hellman groups for Internet Key Exchange (IKE)\n+ `RFC5903 \u003chttps://tools.ietf.org/html/rfc5903\u003e`_ Elliptic Curve Groups modulo a Prime (ECP Groups) for IKE and IKEv2\n+ `RFC5114 \u003chttps://tools.ietf.org/html/rfc5114\u003e`_ Additional Diffie-Hellman Groups for Use with IETF Standards\n\nL2TP\n\n+ `RFC2661 \u003chttps://tools.ietf.org/html/rfc2661\u003e`_ Layer Two Tunneling Protocol \"L2TP\"\n+ `RFC3193 \u003chttps://tools.ietf.org/html/rfc3193\u003e`_ Securing L2TP using IPsec\n+ `RFC1549 \u003chttps://tools.ietf.org/html/rfc1549\u003e`_ PPP in HDLC Framing\n+ `RFC1661 \u003chttps://tools.ietf.org/html/rfc1661\u003e`_ The Point-to-Point Protocol (PPP)\n+ `RFC1332 \u003chttps://tools.ietf.org/html/rfc1332\u003e`_ The PPP Internet Protocol Control Protocol (IPCP)\n\nWireGuard\n\n+ `RFC7748 \u003chttps://tools.ietf.org/html/rfc7748\u003e`_ Elliptic Curves for Security\n+ `WireGuard \u003chttps://www.wireguard.com/protocol/\u003e`_ Protocol Specification\n\n\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqwj%2Fpython-vpn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqwj%2Fpython-vpn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqwj%2Fpython-vpn/lists"}