tetherfi icon indicating copy to clipboard operation
tetherfi copied to clipboard

Simply put, Tetherfi works partially at best.

Open SharpFangz69 opened this issue 9 months ago • 11 comments

Hello, to be frank this is the first issue I've ever opened on Github before. So please forgive me for any errors or faux pas I might make. I am open to any constructive forms of criticism and suggestions.

I have an Unlimited Data Plan with no throttling, and an Unlimited Hotspot plan but that becomes throttled. But I prefer to share my Data Plan. I use another app that is proprietary (Netshare) that shares a SOCKS proxy from my phone's data plan to my computer, and then I connect to TUN via v2rayN on the very same computer. It works almost always and it behaves just like a regular internet connection. My Android device is an unlocked A25 5G (no-root) and my host machine is Arch Linux. However there are two things with my current setup that I am not satisfied with.

  1. It's still a proprietary app.
  2. It supports no USB-tethering, for a more stable internet such as voice-chatting and playing games.

However TetherFi supports USB connections, and it is open-source. It's supposed to do everything Netshare does and more, but simply put it doesn't work.

  1. Wi-Fi Direct I am using the experimental SOCKS proxy and the only thing that somewhat work is Telegram. (I use a 3rd party client named 64gram.) I can send messages, voice recordings, etc...but I cannot join a voice chat. However I can do so with Netshare + SOCKS

  2. USB Tethering

It flat-out doesn't work. I've enabled USB-tethering, Location, and I am connected directly to the computer (no USB hub) with an USB cable and it refuses to work.

Image

Image

Image

SharpFangz69 avatar Feb 27 '25 22:02 SharpFangz69

Hi :) thanks for opening the issue

  1. Yeah the SOCKS code is still buggy related to UDP. To keep a long story short, it was very very broken, and Telegram uses UDP for voice chat. The next release version should be better, but I don't have a release timeline for it yet.

  2. USB tethering is a super duper hack, frankly I'm surprised I managed to get something that even slightly works on my own device. For this, I'd love to know the specific error message presented in TetherFi Broadcast Status. You can dismiss this error dialog and then click the little i icon by Broadcast Status to see the specific error.

Also I'd love if you could please show me your TetherFi hotspot screen when WiFi direct is running, as well as how you configure Telegram Proxy settings, if you would be able to :)

Thanks!

pyamsoft avatar Feb 28 '25 01:02 pyamsoft

Regarding the USB tethering issue, sadly I can't confirm it on my desktop PC (Arch btw :) ) it is working

I will say though

The first time I connected and turned on USB tethering in the phone settings, it did not work. It just hung forever on the first curl command, so I know the proxy was up and I was talking to "something" but it's like the Android USB stack wasn't "letting me in". I turned the USB tether switch on and off a few times in system settings and restarted the TetherFi hotspot a few times and then it started working.

I then opened a different build of the TetherFi app and it worked instantly, so its "something" on the Android system that doesn't like USB tethering when it first starts or something - not sure.

Here's a curl log showing that I am connected via USB tether:


# A simple "does the USB tether connection work"
❯ curl --proxy http://192.168.225.78:8228 example.com
<!doctype html>
<html>
<head>
    <title>Example Domain</title>

    <meta charset="utf-8" />
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <style type="text/css">
    body {
        background-color: #f0f0f2;
        margin: 0;
        padding: 0;
        font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;

    }
    div {
        width: 600px;
        margin: 5em auto;
        padding: 2em;
        background-color: #fdfdff;
        border-radius: 0.5em;
        box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);
    }
    a:link, a:visited {
        color: #38488f;
        text-decoration: none;
    }
    @media (max-width: 700px) {
        div {
            margin: 0 auto;
            width: auto;
        }
    }
    </style>
</head>

<body>
<div>
    <h1>Example Domain</h1>
    <p>This domain is for use in illustrative examples in documents. You may use this
    domain in literature without prior coordination or asking for permission.</p>
    <p><a href="https://www.iana.org/domains/example">[More information...](https://www.iana.org/domains/example)</a></p>
</div>
</body>
</html>

# This is the IP of my mobile data network - so the command over USB is correctly using "Prefer Cellular"
# t-mobile in the US
❯ curl --proxy http://192.168.225.78:8228 icanhazip.com
172.58.*.*

# ip output showing that 192.168.225.78 is the USB tether connection
❯ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether c0:a5:e8:44:d4:87 brd ff:ff:ff:ff:ff:ff
10: enp195s0f3u1u2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000
    link/ether fa:10:68:3f:c0:f8 brd ff:ff:ff:ff:ff:ff
    altname enxfa10683fc0f8
    inet 192.168.225.235/24 brd 192.168.225.255 scope global dynamic noprefixroute enp195s0f3u1u2
       valid_lft 3465sec preferred_lft 3465sec
    inet6 fe80::d270:fe7b:2c2c:5924/64 scope link noprefixroute
       valid_lft forever preferred_lft forever

pyamsoft avatar Feb 28 '25 03:02 pyamsoft

Hi :) thanks for opening the issue

  1. Yeah the SOCKS code is still buggy related to UDP. To keep a long story short, it was very very broken, and Telegram uses UDP for voice chat. The next release version should be better, but I don't have a release timeline for it yet.
  2. USB tethering is a super duper hack, frankly I'm surprised I managed to get something that even slightly works on my own device. For this, I'd love to know the specific error message presented in TetherFi Broadcast Status. You can dismiss this error dialog and then click the little i icon by Broadcast Status to see the specific error.

Also I'd love if you could please show me your TetherFi hotspot screen when WiFi direct is running, as well as how you configure Telegram Proxy settings, if you would be able to :)

Thanks!

  1. Alright I will simply wait concerning UDP improvements with SOCKS. I can't wait to eventually ditch Netshare.

  2. I will have to fiddle with the USB tethering settings and see what works. It seems to be an Android issue and not exactly the issue with your app.

Thank you for your hard work concerning the app, if fully stable/functional this could be a life-changer for many people. Especially those who can't afford much or are on the go.

I will attempt to troubleshoot and show anything of note, I will update with my next post.

SharpFangz69 avatar Feb 28 '25 04:02 SharpFangz69

Here's my Wifi direct setup w/Telegram

Image Image

Image

(On second thought I probably don't need to obscure that anyways. Maybe I do, whatever.)

SharpFangz69 avatar Feb 28 '25 04:02 SharpFangz69

Here's the error I get with direct USB connection

Image

SharpFangz69 avatar Feb 28 '25 04:02 SharpFangz69

OK great :)

First off

For general reference, all IP addresses in TetherFi are private, so showing 192.168.49.1 or whatever is not a risk, since everyone has this number at home :)

Two, the HTTP server runs on 8228. In that blue screenshot above, you should change the port for HTTP to 8228, SOCKS runs on 8229 so that is fine.

Three:

The USB error is a good thing, this is a fun one.

Right now, the USB code is implemented by looking for special interfaces named "RNDIS" or "NCM"

Yours may be named something else. If you are in an environment that can run Android code, I can give you a code snippet to run that will show your special interface names, so that I can add them. If you do not have an Android dev environment, I will give you a simple APK in a few days that will just print out on screen what your Interface names are.

pyamsoft avatar Feb 28 '25 04:02 pyamsoft

OK great :)

First off

For general reference, all IP addresses in TetherFi are private, so showing 192.168.49.1 or whatever is not a risk, since everyone has this number at home :)

Two, the HTTP server runs on 8228. In that blue screenshot above, you should change the port for HTTP to 8228, SOCKS runs on 8229 so that is fine.

Three:

The USB error is a good thing, this is a fun one.

Right now, the USB code is implemented by looking for special interfaces named "RNDIS" or "NCM"

Yours may be named something else. If you are in an environment that can run Android code, I can give you a code snippet to run that will show your special interface names, so that I can add them. If you do not have an Android dev environment, I will give you a simple APK in a few days that will just print out on screen what your Interface names are.

I would prefer the APK thanks, but what exactly is the "Android Dev Environment?" I can run ADB

SharpFangz69 avatar Feb 28 '25 23:02 SharpFangz69

By dev environment I mean the full Android Studio setup :)

No worries, I should be able to make a simple APK and get it to you in a few weeks - I hope thats alright.

pyamsoft avatar Feb 28 '25 23:02 pyamsoft

By dev environment I mean the full Android Studio setup :)

No worries, I should be able to make a simple APK and get it to you in a few weeks - I hope thats alright.

I suppose I do? But sure yeah I could also wait for an APK as well.

SharpFangz69 avatar Mar 01 '25 21:03 SharpFangz69

Hello again

Here is a simple APK that you can install on your device which will display some network related information that TetherFi needs for the USB connection logic. networktest

Please install this and then:

  • Plug your device into a USB cable
  • Start USB tethering
  • Open this app, it may be called com.pyamsoft.networktest.MainActivity on your Launcher
  • Wait a little bit, it may be blank as it thinks.
    • Take a screenshot of whatever contents it outputs. Thank you!

If you are curious, you can find the entire code for this APK here

pyamsoft avatar Mar 04 '25 03:03 pyamsoft

Hello again

Here is a simple APK that you can install on your device which will display some network related information that TetherFi needs for the USB connection logic. networktest

Please install this and then:

  • Plug your device into a USB cable

  • Start USB tethering

  • Open this app, it may be called com.pyamsoft.networktest.MainActivity on your Launcher

  • Wait a little bit, it may be blank as it thinks.

    • Take a screenshot of whatever contents it outputs. Thank you!

If you are curious, you can find the entire code for this APK here

Ok I just got your reply, I will test this tomorrow

SharpFangz69 avatar Mar 11 '25 05:03 SharpFangz69

Hey, i have the same issue with the usb tethering, since the other guy hasnt done it, i decided to, so heres my screenshot, my phone is directly connected to my PC, usb tethering is enabled (it works just fine with my normal mobile hotspot). and this is what the debug app says:

Image

AjaxFNC-YT avatar Jun 02 '25 11:06 AjaxFNC-YT

Hi

Thanks for the info, I will need to add this code to the USB tethering handler; right now it won't work on your device.

I will hopefully find some time either this week, or next week to make this change.

You will need to wait though for the next release on to the store, I do not have a timeline for that yet. Thanks for patience and for your contribution to the project :)

pyamsoft avatar Jun 02 '25 12:06 pyamsoft

Hey, just another question real quick, when using TetherFi, it seems to still be using my hotspot data? i checked in my app, and it went from 11/30 to 18/30 while i was using tetherfi, not my real hotspot, does tetherfi bypass the limit? or should it not use any at all, and bypass if you are already at your limit, i just downloaded the app from the playstore, did all the permissions, set it to use WiFi Direct @ 5G, and the preferred netowrk is Cellular Data, then i just click start, i havent changed anything else, then on my pc i connect, and then connect to the proxy in my proxy settings

AjaxFNC-YT avatar Jun 03 '25 04:06 AjaxFNC-YT

Hi,

When using the Wi-Fi Direct option, TetherFi does not use any of the system hotspot functions.

Since TetherFi serves an HTTP proxy, all Internet requests "look like" they come from the phone itself instead of the computer device, so most carriers do not count this against hotspot data.

However, in your case, it sounds like your carrier tracks Hotspot usage via deeper packet inspection, perhaps TTL inspection on packets for example, and unfortunately as a third-party app there is nothing I can do against this.

Please be aware that TetherFi uses your normal phone data, so any usage will count against your mobile data plan itself. If you do not have an unlimited plan, you will notice increased usage.

pyamsoft avatar Jun 03 '25 04:06 pyamsoft

I do have an unlimited plan, im just worried that when i run out of hotspot data the app will stop working edit: and if it helps im using straight talk, they use verizon towers

AjaxFNC-YT avatar Jun 03 '25 05:06 AjaxFNC-YT

I can't reproduce your specific issue on my device, a T-Mobile Samsung Galaxy. When I am using the TetherFi hotspot, my hotspot data usage does not increase at all. I just used it now to download 2GB of an iOS update for a different phone.

If you hit your hotspot cap, and your carrier is somehow able to inspect your traffic in a deep context, then it would be according to your contract. Many nowadays would throttle hotspot speed, some shut off data connection. The answer here is unfortunately "it depends"

That being said, TetherFi is not intentionally using hotspot data, as third-party applications dont have access to that system API.

If TetherFi is not the right application for you, you may have better luck with other offerings on the store. Ones like PdaNet (not an endorsement, just an example) may have discovered other techniques for obfuscating their hotspot traffic that may serve you better if TetherFi does not.

pyamsoft avatar Jun 03 '25 05:06 pyamsoft

I tested it with my other phone that is fully out of hotspot (30GB/30GB) and it seems it was working, my computer said connected, no internet, but the internet was still working, i was able to watch youtube on the site, and also text chat my friends on discord, and do some basic web browsing, so i think ill be fine hopefully, and if it stops working on my current phone, ill just use my other phone, they are both connected to the same provider soooo yh

AjaxFNC-YT avatar Jun 03 '25 06:06 AjaxFNC-YT

Hey, could you add support for TCP requests/stuff? i googled it and it says it can be proxied, but idk how easy/hard it would be

AjaxFNC-YT avatar Jun 05 '25 06:06 AjaxFNC-YT

Hello, it is probably best to make a different issue to continue questions like these.

That being said, I think there is a bit of confusion here. TCP is the underlying communication that HTTP is built on. The proxy already supports TCP requests in the form of HTTP.

pyamsoft avatar Jun 05 '25 06:06 pyamsoft

oh, alright, i use this one AI and it says it tries to do some TCP request and it fails, but it works normally, if i have any more questions ill make a new issue

AjaxFNC-YT avatar Jun 05 '25 07:06 AjaxFNC-YT