{"id":15107088,"url":"https://github.com/shadowsocks/badvpn","last_synced_at":"2025-09-27T05:31:32.339Z","repository":{"id":47588515,"uuid":"45686048","full_name":"shadowsocks/badvpn","owner":"shadowsocks","description":"NCD scripting language, tun2socks proxifier, P2P VPN","archived":false,"fork":true,"pushed_at":"2024-11-02T08:02:19.000Z","size":6108,"stargazers_count":164,"open_issues_count":1,"forks_count":110,"subscribers_count":19,"default_branch":"shadowsocks-android","last_synced_at":"2024-12-08T01:00:42.001Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"ambrop72/badvpn","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shadowsocks.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"security/BEncryption.c","support":null}},"created_at":"2015-11-06T14:18:20.000Z","updated_at":"2024-12-06T11:38:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/shadowsocks/badvpn","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadowsocks%2Fbadvpn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadowsocks%2Fbadvpn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadowsocks%2Fbadvpn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadowsocks%2Fbadvpn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shadowsocks","download_url":"https://codeload.github.com/shadowsocks/badvpn/tar.gz/refs/heads/shadowsocks-android","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234391380,"owners_count":18824809,"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":[],"created_at":"2024-09-25T21:04:21.164Z","updated_at":"2025-09-27T05:31:31.323Z","avatar_url":"https://github.com/shadowsocks.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BadVPN\n\n## Introduction\n\nIn this project I host some of my open-source networking software.\nAll of the software is written in C and utilizes a custom-developed framework for event-driven programming.\nThe extensive code sharing is the reason all the software is packaged together.\nHowever, it is possible to compile only the required components to avoid extra dependencies.\n\n### NCD programming language\n\nNCD (Network Configuration Daemon) is a daemon and programming/scripting language for configuration of network interfaces and other aspects of the operating system.\nIt implements various functionalities as built-in modules, which may be used from an NCD program wherever and for whatever purpose the user needs them.\nThis modularity makes NCD extremely flexible and extensible. It does a very good job with hotplugging in various forms, like USB network interfaces and link detection for wired devices.\nNew features can be added by implementing statements as C-language modules using a straightforward interface.\n\n### Tun2socks network-layer proxifier\n\nThe tun2socks program \"socksifes\" TCP connections at the network layer.\nIt implements a TUN device which accepts all incoming TCP connections (regardless of destination IP), and forwards the connections through a SOCKS server.\nThis allows you to forward all connections through SOCKS, without any need for application support.\nIt can be used, for example, to forward connections through a remote SSH server.\n\n### Peer-to-peer VPN\n\nThe VPN part of this project implements a Layer 2 (Ethernet) network between the peers (VPN nodes).\nThe peers connect to a central server which acts as a communication proxy allowing the peers to establish direct connections between each other (data connections).\nThese connections are used for transferring network data (Ethernet frames), and can be secured with a multitude of mechanisms. Notable features are:\n\n- UDP and TCP transport\n- Converges very quickly after a new peer joins\n- IGMP snooping to deliver multicasts efficiently (e.g. for IPTV)\n- Double SSL: if SSL is enabled, not only do peers connect to the server with SSL, but they use an additional layer of SSL when exchanging messages through the server\n- Features related to the NAT problem:\n  - Can work with multiple layers of NAT (needs configuration)\n  - Local peers inside a NAT can communicate directly\n  - Relaying as a fallback (needs configuration)\n\n## Requirements\n\nNCD only works on Linux. Tun2socks works on Linux and Windows. The P2P VPN works on Linux, Windows and FreeBSD (not tested often).\n\n## Installation\n\nThe build system is based on CMake. On Linux, the following commands can be used to\nbuild:\n\n```\ncd \u003cbadvpn-source-dir\u003e\nmkdir build\ncd build\ncmake .. -DCMAKE_INSTALL_PREFIX=\u003cinstall-dir\u003e\nmake install\n```\n\nIf you only need tun2socks or udpgw, then add the following arguments to the `cmake`\ncommand: `-DBUILD_NOTHING_BY_DEFAULT=1 -DBUILD_TUN2SOCKS=1 -DBUILD_UDPGW=1`.\nOtherwise (if you want the VPN software), you will first need to install the OpenSSL\nand NSS libraries and make sure that CMake can find them.\n\nWindows builds are not provided. You can build from source code using Visual Studio by\nfollowing the instructions in the file `BUILD-WINDOWS-VisualStudio.md`.\n\n## License\n\nThe BSD 3-clause license as shown below applies to most of the code.\n\n```\nCopyright (c) 2009, Ambroz Bizjak \u003cambrop7@gmail.com\u003e\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n1. Redistributions of source code must retain the above copyright\n   notice, this list of conditions and the following disclaimer.\n2. Redistributions in binary form must reproduce the above copyright\n   notice, this list of conditions and the following disclaimer in the\n   documentation and/or other materials provided with the distribution.\n3. Neither the name of the author nor the\n   names of its contributors may be used to endorse or promote products\n   derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n```\n\nList of third-party code included in the source:\n- lwIP - A Lightweight TCP/IP stack. License: `lwip/COPYING`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshadowsocks%2Fbadvpn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshadowsocks%2Fbadvpn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshadowsocks%2Fbadvpn/lists"}