https://github.com/aleixrodriala/wa-tunnel Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code + Explore + All features + Documentation + GitHub Skills + Blog * Solutions + By Plan + Enterprise + Teams + Compare all + By Solution + CI/CD & Automation + DevOps + DevSecOps + Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles + Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} aleixrodriala / wa-tunnel Public * Notifications * Fork 26 * Star 657 Tunneling Internet traffic over Whatsapp License MIT license 657 stars 26 forks Star Notifications * Code * Issues 1 * Pull requests 0 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights aleixrodriala/wa-tunnel This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 1 branch 0 tags Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/a] Use Git or checkout with SVN using the web URL. [gh repo clone aleixr] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP * Codespaces is rolling out You don't have access just yet, but in the meantime, you can learn about Codespaces Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @aleixrodriala aleixrodriala Merge pull request #4 from klexas/main ... c4ac5d2 Nov 12, 2022 Merge pull request #4 from klexas/main Updating import reference c4ac5d2 Git stats * 13 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .gitattributes Initial commit Nov 11, 2022 .gitignore Initial Commit Nov 12, 2022 LICENSE Initial commit Nov 11, 2022 README.md fix typo: 'temporal' should be 'temporary' Nov 12, 2022 client.js Initial Commit Nov 12, 2022 package.json Initial Commit Nov 12, 2022 server.js Updating import reference Nov 12, 2022 utils.js Initial Commit Nov 12, 2022 wasocket.js Initial Commit Nov 12, 2022 View code [ ] wa-tunnel - HTTP Tunneling through Whatsapp Why? Setup Server side Client Side Usage Disclaimer TO-DO License README.md wa-tunnel - HTTP Tunneling through Whatsapp [6874747073] This is a Baileys based piece of code that lets you tunnel TCP data through two Whatsapp accounts. This can be usable in different situations, for example network carriers that give unlimited whatsapp data or airplanes where you also get unlimited social network data. It's using Baileys since it's a WS based multi-device whatsapp library and therefore could be used in android in the future, using Termux for example. The idea is to use it with a proxy setup on the server like this: [Client (restricted access) -> Whatsapp -> Server (proxy) -> Internet] Apologizes in advance since Javascript it's not one of my primary coding languages :/ Use only for educational purpose. Why? While travelling through South America network data on carriers is usually restricted to not many GBs but WhatsApp is usually unlimited, I tried to create this library since I didn't find any usable at the date. Setup You must have access to two Whatsapp accounts, one for the server and one for the client. You can forward a local port or use an external proxy. Server side Clone the repository on your server and install node dependencies. 1. cd path/to/wa-tunnel 2. npm install Then you can start the server with the following command where port is the proxy port and host is the proxy host you want to forward. And number is the client WhatsApp number with the country code alltogether and without +. node server.js host port number You can use a local proxy server like follows: node server.js localhost 3128 12345678901 Or you can use a normal proxy server like follows: node server.js 192.168.0.1 3128 12345678901 Client Side Clone the repository on your server and install node dependencies. 1. cd path/to/wa-tunnel 2. npm install Then you can start the server with the following command where port is the local port where you will connect and number is the server WhatsApp number with the country code alltogether and without +. node client.js port number For example node client.js 8080 1234567890 Usage The first time you open the script Baileys will ask you to scan the QR code with the whatsapp app, after that the session is saved for later usage. It may crash, that's normal after that just restart the script and you will have your client/server ready! It splits network packages to not get timed out by WhatsApp, at the moment it's hardcoded in wasocket.js, by default it's limited at 20k characters per message, I have done multiple tests and anything below that may get you banned for sending too many messages and any above 80k may timeout. Once you have both client and server ready you can test using curl and see the magic happen. curl -v -x proxyHost:proxyPort https://httpbin.org/ip With the example commands would be: curl -v -x localhost:8080 https://httpbin.org/ip It has been tested also with a normal browser like Firefox, it's slow but can be used. Disclaimer Using this library may get your WhatsApp account banned, use with a temporary number or at your own risk. TO-DO * Make an Android script to install node dependencies on termux * Documentation License MIT About Tunneling Internet traffic over Whatsapp Resources Readme License MIT license Stars 657 stars Watchers 2 watching Forks 26 forks Releases No releases published Packages 0 No packages published Contributors 2 * @aleixrodriala aleixrodriala Aleix Rodriguez Alameda * @timoteostewart timoteostewart Tim Stewart Languages * JavaScript 100.0% Footer (c) 2022 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.