Genymobile / gnirehtet

Gnirehtet provides reverse tethering for Android
Apache License 2.0
6.31k stars 578 forks source link

Issue with using Torrent Clients when connected #29

Closed Zero3K closed 6 years ago

Zero3K commented 7 years ago

When I use a Torrent Client on my Android Tablet when connected to my PC via gnirehtet, the downloads I start via the client eventually get slower/stop working.

rom1v commented 7 years ago

Hi @Zero3K, I found a possible cause for this problem.

Could you test branch issue29-totest, please?

Zero3K commented 7 years ago

It didn't help.

EDIT: I think I have a different issue now. It disconnected from the relay server without me unplugging it/closing the adb.exe process.

rom1v commented 7 years ago

Thank you.

It didn't help.

EDIT: I think I have a different issue now.

Do you still have the initial issue?

In particular, did you observe this line in the logs when you had this problem:

Client buffer full, delaying packet processing

I think I have a different issue now. It disconnected from the relay server without me unplugging it/closing the adb.exe process.

I just reproduced that problem, adb reverse seems to fail at some point. When you restart it, it works again:

adb reverse tcp:31416 tcp:31416
Zero3K commented 7 years ago
  1. I don't know.
  2. Is it fixable or not?

On June 20, 2017, 4:22 AM, Romain Vimont wrote: Thank you.

It didn't help.

EDIT: I think I have a different issue now.

Do you still have the initial issue?

I think I have a different issue now. It disconnected from the relay server without me unplugging it/closing the adb.exe process.

I just reproduced that problem, adb reverse seems to fail at some point. When you restart it, it works again:

adb reverse tcp:31416 tcp:31416

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

rom1v commented 7 years ago

Do you still have the initial issue?

I don't know.

OK. Anyway, there was a problem, that I fixed in commit 91e7103a58938404bad951657ab2559b32043a1b. This may, or may not, be the cause of issue 29.

Is it fixable or not?

I don't know, the adb reverse failure is not related to gnirehtet.

Zero3K commented 7 years ago

How about having it try to reconnect if it gets disconnected while still plugged in?

rom1v commented 7 years ago

How about having it try to reconnect if it gets disconnected while still plugged in?

The device does not know if it is plugged in or not: it only knows if it may connect to the relay server (through the adb reverse tunnel).

The relay server detects that a client has been disconnected (the associated socket has been closed), but it does not know that it's because the adb reverse tunnel is down.

Detecting such a failure would require an active monitoring: the relay server would have to poll the result of adb devices and adb reverse --list commands every second (for instance), compare them, and reexecute the adb reverse command if something is wrong. Too heavyweight and ugly for such a workaround.

Are you often disconnected this way? It happened only once to me, and possibly because my adb daemon has been killed because I started an adb client with a different version (so I'm not even sure I had the problem).

Zero3K commented 7 years ago

Yes, I am being disconnected that way quite often when using Vuze to download a torrent while connected to the relay server.

Zero3K commented 7 years ago

Have you figured out how to fix the disconnecting issue or not?

rom1v commented 7 years ago

No, I have not.

Zero3K commented 7 years ago

Any news since then?

rom1v commented 7 years ago

No news, in fact I cannot reproduce (I downloaded using LibreTorrent on Android).

rom1v commented 6 years ago

Could you check if you still have this issue in the last release (both Java and Rust), please?