Skip to content

How TetherFi Works

pyamsoft edited this page Aug 3, 2024 · 1 revision

How TetherFi Works

Basic Networking

TetherFi works by creating something called an "HTTP proxy". Let's take a small example. Normal Internet traffic looks loosely like this:

laptop: I want to view google.com -> (sent to Internet)
Internet: I am seeing a request from a laptop for "google.com", here is that website, laptop -> (sent to laptop)
laptop: I see "google.com"

When you connect your laptop, TetherFi talks to the Internet "for your laptop", so all Internet traffic looks a little something like this:

laptop: I want to view google.com -> (sent to TetherFi)
TetherFi: Ok, I am a phone. I will ask the Internet for "google.com" -> (sent to Internet)
Internet: I am seeing a request from a phone for "google.com", here is that website, phone -> (sent to TetherFi)
TetherFi: I saw a response to "google.com", here you go laptop -> (sent to laptop)
laptop: I see "google.com"

As you can see, the above traffic has the following interesting bits:

  • All requests are sent by the phone, so all Internet traffic "looks like" the phone. This may end up being marked as your carrier as "phone data" instead of "hotspot data". This is NOT A GOAL of TetherFi, but is (generally speaking) what happens.

  • Since TetherFi sits in the middle, it always adds a bit of "extra waiting time" since it has to delegate and field all of these Internet requests. As a curious piece of historical Internet baggage, it is generally limited to 6-to-8 requests at a single time (but this is much lower-level than what is appropriate for a simple Wiki).

  • For those technically knowledgeable, TetherFi DOES NOT do SSL termination, so it CAN NOT see your HTTPS requests (aside from the initial CONNECT statement which is required for the protocol to function). It will never be a goal of TetherFi to terminate SSL, ever.

  • TetherFi ONLY speaks HTTP. This is because the Android Operating System that it runs on only provides the programming APIs to easily speak HTTP at a system level. While other protocols exist, like "raw" TCP or UDP, the system itself does not "guarantee" that all of these raw requests will be sent to TetherFi, so support for new protocols is slow but a constant exploration.

Clone this wiki locally