Now Reading
TxtNet-Browser/README.md at grasp · lukeaschenbrenner/TxtNet-Browser · GitHub

TxtNet-Browser/README.md at grasp · lukeaschenbrenner/TxtNet-Browser · GitHub

2023-04-21 16:58:34

Browse the Net over SMS, no WiFi or Cell Knowledge required!

App Icon

TextNet Browser is an Android app that enables anybody all over the world to browse the online with no cell knowledge connection! It makes use of SMS as a medium of transmitting HTTP requests to a server the place a pre-parsed HTML response is compressed utilizing Google’s Brotli compression algorithm and encoded utilizing a customized Base-114 encoding format (based mostly on Basest).

As well as, any person can act as a server utilizing their very own cellphone’s major cellphone quantity and a Wi-Fi/knowledge connection on the press of a button, permitting for peer-to-peer distributed networks.

Obtain

See the releases page for an APK obtain of the TxtNet Browser shopper. A Google Play launch is coming quickly.

TxtNet Browser is presently appropriate with Android 4.4-13+.

Working Server Situations (uptime not assured)

Nation Cellphone Quantity Notes
United States +1(913)203-2719 Helps SMS to these countries

Let me know if you’re inquisitive about internet hosting a server occasion on your space!

⚠️Please be aware: All internet visitors needs to be thought of unencrypted, as all requests are remodeled SMS and acquired in plaintext by the server!

The way it works (shopper)

This app makes use of a permission that enables a broadcast reciever to recieve and parse incoming SMS messages with out the necessity for the app to be registered because the person’s default messaging app. Whereas granting an app SMS permissions poses a safety concern, the code for this app is open supply and all code involving using web permissions are compartamentalized to the server module. This ensures that except the app is setup to be a server, no web visitors is transmitted. As well as, because the shopper, SMS messages are solely programatically despatched to and recieved from a registered server cellphone quantity.
The app communicates with a “server cellphone quantity”, which is a cellphone quantity managed by a “server host” that communicates instantly over SMS utilizing Android’s SMS APIs. Every URL request is shipped, encoded in a customized base 114, to the server. Normally, this solely requires 1 SMS, however simply in case, every message is prepended with an order specifier. When the server receives a request, the server makes use of an Android WebView part to programatically request the web site in a way that simulates an everyday request, to keep away from restrictions some providers (corresponding to Cloudflare) place on HTTP shoppers. By doing this, any Javascript may execute on the web site, permitting content material to be dynamically loaded into the HTML if wanted. As soon as the web page is loaded, solely the HTML is transferred again to the recipient machine. The HTML is stripped of pointless tags and attributes, compressed into uncooked bytes, after which encoded. As soon as encoded, the messages are cut up into 160 character numbered segments (maximizing the GSM-7 standard SMS measurement) and despatched to the shopper app for parsing and displaying.

Facet be aware: Compression financial savings have been estimated to be a median of 20% utilizing Brotli, however oftentimes it could possibly save rather more! For instance, the web site instance.com in stripped HTML is 285 characters, however solely requires 2 SMS messages (189 characters) to obtain. Even together with the 225% overhead in knowledge transmission, it’s nonetheless extra environment friendly!

Why encode the HTML within the first place?

SMS was created in 1984, and was created to make the most of the additional bytes from the info channels in cellphone signalling. It was initially conceived to solely help 128 characters in a 7-bit alphabet. When additional characters had been required to help a subset of the UTF-8 character set, a brand new normal known as UCS-2 was created. Nonetheless restricted by the 160 bytes obtainable, UCS-2 helps extra characters (a lot of which present up in HTML paperwork) however limits SMS sizes to 70 characters per SMS. By encoding all knowledge in GSM-7, extra knowledge may be despatched per SMS message than sending the uncooked HTML over SMS. It’s potential that it could be much more environment friendly to create an encoding system utilizing all of the characters obtainable in UCS-2, however this limits compatibility and is out of the scope of the mission.

Server Internet hosting

TxtNet Browser has been rewritten to incorporate a built-in server internet hosting choice contained in the app. As a substitute of the now-deprecated Python server utilizing a paid SMS API, any person can now act as a server host, permitting for distributed communication.
To allow the background service, faucet on the overflow menu and choose “TxtNet Server Internet hosting”. As soon as the required permissions are granted, you’ll be able to press on the “Begin Service” toggle to initialize a background service.
TxtNet Server makes use of your major cell quantity related to the energetic provider subscription SIM as a quantity that others can add and connect with.
Please be aware that this function remains to be in early levels of growth and sure has many points. Please submit difficulty experiences for any issues you encounter.
For Android 4.4-6.0, you’ll need to run adb instructions one time as specified within the app. For Android 6.0-10.0, you might also use Skizuku, however a PC will nonetheless be required as soon as. For Android 11+, no PC is required to activate the server utilizing Shizuku.

Desktop Server Set up (Deprecated)


The present supply code is pointed at my very own server, utilizing a Twilio API with credit I’ve bought. If you want to run your personal server, observe the directions beneath:
1. Register for an account at [Twilio](https://twilio.com/), buy a toll-free quantity with SMS functionality, and buy credit. (This mission won’t work with Twilio free accounts)
2. Create a Twilio utility for the quantity.
3. Join an [ngrok](http://ngrok.com/) account and obtain the ngrok utility
4. Open the ngrok listing and run this command: `./ngrok tcp 5000`
5. Go to the [active numbers](https://console.twilio.com/US1/develop/phone-numbers/manage/incoming) web page and add the ngrok url to the “A Message Comes In” part after deciding on “webhook”. For instance: “https://xyz.ngrok.io/receive_sms
6. Obtain the TxtNet Browser [server script](https://github.com/lukeaschenbrenner/TxtNet-Browser/blob/master/SMS_Server_Twilio.py) and set up all of the required modules utilizing “pip set up x”
7. Add your Twilio API ID and Key into your atmosphere variables, and run the script! `python3 ./SMS_Server_Twilio.py`
8. Within the TxtNet Browser app, press the three dots and press “Change Server Cellphone Quantity”. Enter within the cellphone quantity you bought from Twilio and press OK!

FAQ/Troubleshooting

Bugs:

  • Many carriers are unnecessarily price limiting incoming textual content messages, so a web page could look as if it “stalled” whereas loading on giant pages. As of now the one strategy to repair that is to attend!
  • In congested networks, it is potential for a cell provider to drop a number of SMS messages earlier than they’re recieved by the shopper. At present, the app has no logic to mitigate this difficulty, so any web sites which have stalled for a major period of time needs to be requested once more.
  • In Android 12 (or presumably a brand new model of Google Messages?), there’s a new and “improved” messages blocking function. This leads to no SMS messages getting by when a quantity is blocked, which makes the blocking function of TxtNet Browser break the app! As a substitute of blocking messages, to get round this “function”, you’ll be able to silent message notifications from the server cellphone quantity.
    Silence Number
    Contacts Popup
    Migrating Contacts

Screenshots (TxtNet 1.0)

Demo (TxtNet 1.0)

demo.mp4

See Also


Demo video proven above

Growth

???? In case you are expert in Android UI design, your assist could be drastically appreciated! ???? A constant theme and darkish mode could be nice additions to this app.

Be happy to submit pull requests! I’m a second-year CS pupil with fundamental information of Android Growth and Server Growth, and drastically respect assist and help from the neighborhood.

Future Influence

My long-term objective with this mission is to finally attain communities the place such a service could be virtually helpful, which can embrace:

  • These in international locations with a low median earnings and prohibitively costly knowledge plans
  • Those that reside beneath oppressive governments, with close to impenetrable web censorship

For those who suppose you would possibly be capable to assist funding a neighborhood nation code cellphone quantity or server, or have another concepts, please get in touch with the e-mail in my profile description!

License

GPLv3 – See LICENSE.md

Credit

Thanks to everybody who has contributed to the libraries utilized by this app, particularly Brotli and Basest. Particular thanks goes to Coldsauce, whose authentic mission Cosmos Browser was the unique inspiration for this mission!
My authentic reply to his Hacker Information remark is here.
As well as, I wish to thank Zachary Wander from XDA for his or her wonderful Shizuku implementation tutorial and Aayush Atharva for the wonderful basis they created with Brotli4J, permitting for a streamlined forking course of to create the library BrotliDroid used on this app.

Source Link

What's Your Reaction?
Excited
0
Happy
0
In Love
0
Not Sure
0
Silly
0
View Comments (0)

Leave a Reply

Your email address will not be published.

2022 Blinking Robots.
WordPress by Doejo

Scroll To Top