pyamsoft / tetherfi

TetherFi - Internet sharing without Root
Apache License 2.0
399 stars 31 forks source link

Can't Connect to Tailscale+Moonlight from TetherFi Hotspot Client #342

Open ataraxia-admail opened 1 day ago

ataraxia-admail commented 1 day ago

Firstly, its a great app. My issue involves using tetherFi for sharing uncapped 5g internet from phone to ipad. So, it works as intended, but Ipad can't connect to tailscale when using tetherFi hotspot shared from my phone. I saw from other posts that you said you also use it to connect it to your tailscale networks, i hope that you can help me with this issue.

pyamsoft commented 1 day ago

Hi

At least for my own setup, as long as my phone (the device running TetherFi) is connected to TailScale, then every device connected to my phone is also connected to the TailScale tunnel

Since the phone is a proxy, all devices using TetherFi will appear as though they "are" the phone. So you wouldn't connect your iPad to TailScale itself in this setup.

ataraxia-admail commented 17 hours ago

Well, there comes another issue. With my previously mentioned setup, my goal is to use moonlight on my ipad to remotely control my pc, I'm not sure if was even meant to work if I do as you say, turning on tailscale on my phone only since my moonlight would just say "Connection time out" upon doing so.

pyamsoft commented 17 hours ago

Depending on how you use moonlight it might work - I use moonlight as an RDP basically here's how it works for me.

I only allow moonlight connections over TS, so I've got machine1 in moonlight at the direct IP of 100.200.3.4.

For my own setup, the phone is connected to the tailnet and is able to see machine1 by IP, and thus a proxied laptop is also able to see machine1 via direct IP.

If that is not working for you, not sure why sadly :(

pyamsoft commented 17 hours ago

I assume your moonlight back end is using sunshine not the nvidia game stream? I have no idea if the official nvidia GS would work with this

ataraxia-admail commented 15 hours ago

Yes i am using sunshine + moonlight setup. Are there any configurations you have done on your pc/tailscale/moonlight/sunshine?Mine was a pretty basic setup from tutorials.

I tried re-adding the host and found out that if doing so with TetherFi connected, my ipad's moonlight just couldn't pair with my pc, even with the correct paring pin, it would just say wrong pin while the request will times out, doesnt really matter since i can just pair it beforehand but i guess am trying to find the reason behind TetherFi preventing moonlight from working correctly. My phone is still able to remotely access my desktop even so there's that.

pyamsoft commented 15 hours ago

Ah yeah the PIN wouldnt work over the proxy I dont think.

You should be able to first add the device normally off of TetherFi, and then once you are authorized, connect to TetherFi, and manually add the device by IP address in moonlight, which will keep the PIN active and will just "override" the known IP address.

I hope that makes sense, but this what had worked for me

pyamsoft commented 15 hours ago

I assume the PIN step in moonlight doesn't use normal HTTP communication, so TetherFi is unable to "speak it", which is why it doesn't work

ataraxia-admail commented 14 hours ago

and manually add the device by IP address in moonlight, which will keep the PIN active and will just "override" the known IP address.

Wait what do you mean by that, do i add the PC's IP(tailscale ip) in moonlight 2nd time even after connecting to tetherFi or i just do it beforehand as mentioned and it should theoretically just be able to access it which didn't work for me?

Currently this is what i did, (assumes tetherFi connection works correctly in ipad)

  1. Adds and Pairs PC(tailscale ip) to ipad moonlight.
  2. Turns on tetherFi on phone
  3. Turns on mobile data on phone
  4. Connects to tailscale on phone
  5. Connects ipad to tetherFi hotspot
  6. Opens moonlight and connects to the PC (fails)
pyamsoft commented 7 hours ago

Those steps you've outlined above are the exact ones that work for me :(

Unfortunately I don't know enough about how TS and moonlight and sunshine function internally to be of further help here, sorry :(

pyamsoft commented 7 hours ago

One important difference for our setups is that I am connecting 2 PCs, while you are connecting and iPad and a PC

Maybe something about specially the iPad mobile app is a limiting factor

Sorry that I can't be more help

pyamsoft commented 17 minutes ago

Hi

After some rerunning of tests and various reading into sunshine and moonlight I need to apologize

Due to the fact that right now we are only an HTTP proxy, moonlight will not work over a proxy connection like TetherFi. I was misremembering information from a previous test build.

TailScale does work for anything that is a "normal" http - but as sunshine heavily uses UDP it will NOT work.

Sorry again for the confusion - at the moment sunshine/moonlight is not able to be supported.