alexkirsz / dispatch

Combine internet connections, increase your download speed
Apache License 2.0
353 stars 28 forks source link

I don't understand how to use it #9

Closed rustydigits closed 1 year ago

rustydigits commented 1 year ago

As an amateur dev with still a lot to learn, I struggle understanding how to use this program.

My OS is KDE Neon, based on Ubuntu 22.04. I have an ethernet connection [ADSL] and a wifi connection [4G hotspot]. Both work when used independently, with a low bandwith (128 Kb/s) in my rural area - hence my looking for a bonding solution.

When I do "dispatch list", I get :

[wifi interface] 192.168.0.100
[ethernet interface] 192.168.1.5

Therefore, I start the proxy using: dispatch start 192.168.0.100 192.168.1.5

Then I went to the OS settings, and activated manually a proxy, by entering "localhost" in the SOCKS section, port 1080. I also manually configured my browser to use that proxy, since I read that Firefox and many other browsers don't use the system proxy for some reason.

Then I configured a widget to monitor the bandwith on both interfaces and started using different software (browser, torrent, radio app). It still "works" but only the ethernet connection is used.

Should my configuration work?

alexkirsz commented 1 year ago

Yes, your configuration should work in your case. Half of the connections should start on your ethernet connection, and half should start on your Wi-Fi interface.

Can you run dispatch start --debug 192.168.0.100 192.168.1.5 and see if anything gets printed to the console when you try to use the proxy?

rustydigits commented 1 year ago

Thanks for your quick reply, I appreciate it.

Weirdly enough, the debug option raises the following error:

Error: Found argument '--debug' which wasn't expected, or isn't valid in this context

USAGE:
    dispatch start [OPTIONS] <addresses>...

For more information try --help
alexkirsz commented 1 year ago

My mistake, you should run dispatch --debug start 192.168.0.100 192.168.1.5 instead.

rustydigits commented 1 year ago

OK, it works now. There is plenty going out. Should I copy and paste here part of it or should I look for something in particular? I spotted this among the lines:

   0: An error occurred during the proxy handshake procedure
   1: Failed to connect to address `31.14.40.30:80`
   2: Connection refused (os error 111)
alexkirsz commented 1 year ago

This error seems normal. This can happen when a website you're trying to connect to is down. For instance, if you go on a website with a lot of images and scripts, it can happen that the host of one of these images or scripts is down, resulting in this error.

Provided there's no personal information in there (like the address of a personal website), please upload the full log somewhere so I may have a look.

rustydigits commented 1 year ago

Here is the beginning of a large log file: https://pastebin.com/E4nqYQjx

rustydigits commented 1 year ago

You can also download the log file from my drive: https://drive.proton.me/urls/2D0AM7287M#sfxWvGF7Q3Ac

alexkirsz commented 1 year ago

The following error happens systematically when trying to use the network interface at address 192.168.0.100:

0: An error occurred during the proxy handshake procedure
1: Cannot assign requested address (os error 99)

However, 192.168.1.5 appears to work properly.

Can you share the output of dispatch list as well?

rustydigits commented 1 year ago

Yes, here it is:

> dispatch list
╔════════╦═══════════════╗
║   eno2 ║ 192.168.1.5   ║
╠════════╬═══════════════╣
║ wlp2s0 ║ 192.168.0.101 ║
╚════════╩═══════════════╝
alexkirsz commented 1 year ago

Seems like your Wi-Fi local address changed in the meantime, can you try again with dispatch start --debug 192.168.0.101 192.168.1.5?

rustydigits commented 1 year ago

ok, I wrote 100 in the bug report but it always was 192.168.0.101. It didn't change. I know that is confusing, sorry. The logs refers to 101, all the commands I type were using 101 etc.

I'm going to edit the previous posts to reflect this. => No, I won't, otherwise your replies don't make any sense anymore.

alexkirsz commented 1 year ago

I'm seeing 192.168.0.100 in the logs you sent. If the same error happens when using 192.168.0.101 then it's possible your Wi-Fi interface:

  1. might not be functioning properly;
  2. might be getting turned off by your OS when the ethernet interface is active (although I don't know if that's something OSes actually do);
  3. might not be accessible to the program.

I would try the following:

  1. Disabling your ethernet interface entirely, and try dispatch again using exclusively the Wi-Fi interface:
    dispatch --debug start 192.168.0.101

    If this works, it might be indicative that (2.) above might be happening.

  2. Do the same, but keeping both interfaces enabled (i.e. only try dispatching to the Wi-Fi interface).
rustydigits commented 1 year ago

Well, this is a mess. I just saw 192.168.0.100 in the log as well. Hum. OK, I'm going to start over, re-test and produce a new log file + follow your last instructions. Sorry again for the mix-up.

rustydigits commented 1 year ago

So I follow your instructions [1]: ethernet disabled and dispatch throug wifi:

> dispatch list
╔════════╦═══════════════╗
║ wlp2s0 ║ 192.168.0.101 ║
╚════════╩═══════════════╝

The log file: https://drive.proton.me/urls/FNCR26N180#akXGlabKnUtP

rustydigits commented 1 year ago

dispatch list ╔════════╦═══════════════╗ ║ eno2 ║ 192.168.1.5 ║ ╠════════╬═══════════════╣ ║ wlp2s0 ║ 192.168.0.101 ║ ╚════════╩═══════════════╝

dispatch --debug start 192.168.0.101 > dispatch_wifi_ethernet.log

=> the browser can not get a webpage. I closed it and restarted it just in case, but it still doesn't work.

The log file: https://drive.proton.me/urls/A32N9QJSRC#4l78XQlzQeBR

Note: The wifi (eg the 4G link) looks spotty. It might be that it doesn't work if the connection is poor, with many dropped packets etc. Simple hypothesis from a noob, of course.

rustydigits commented 1 year ago

I had a laptop where I could decide in the BIOS if the Ethernet and the Wifi connections were exclusive, one disabling the other. I'm going to reboot and check on my current desktop computer, just in case.

rustydigits commented 1 year ago

I checked the BIOS, but not such option for my current computer.

As I happen to have a second 4G phone, I tried using it (following your instructions) and I get exactly the same result: impossible to access a webpage as soon as I turn the Ethernet connection on. And it immediately works if I turn the Ethernet off.

I'm going to look into the Ubuntu documentation about a setting that could lead to this behavior.

alexkirsz commented 1 year ago

This might be related to (or the same issue as) https://github.com/alexkirsz/dispatch-proxy/issues/68

rustydigits commented 1 year ago

Hi,

It works! I made it work by tethering my mobile phone through USB rather than the wifi hotspot. So there is an issue with my wifi card and/or its configuration.

This is brilliant, my bandwith has increased noticeably: web browsing is at last fluid! I love it!

Thank you a lot for your support. Without your super gentle support, I would have given up.