TalalMash / Unofficial-Speedify-Installer-For-OpenWrt

Easily install & configure Speedify on OpenWrt using a web browser.
23 stars 3 forks source link

Beryl AX mt3000 - Using Speedify as Bonding VPN with WiFi-connected Internet #14

Open emmamei opened 1 month ago

emmamei commented 1 month ago

I have Speedify working on a Ubuntu 22.04 LTS Linux host without problems, and I use the speedify_cli command line to control it: the speedify UI never did work right.

If Speedify is installed correctly on the Beryl AX, the VPN commands are in /usr/share/speedify (as expected) and the programming included in this package is in /usr/lib/speedify.

When I start the system (currently) the default route is unset, and it needs WiFi devices to be reset in order to activate the proper routing.

That problem aside, the problem as seen from the web UI is that the devices disappear and the Internet connection disappears.

The problem as I see it is in the default routing set up by Speedify, and the fact that it won't restore any default routes after disconnection. If the default routes were fixed, then it would probably work. I'm also using ZeroTier which adds another network.

None of the networks add a host-specific route to the gateway through that device, as the Ubuntu 22.04 LTS system does, nor does the OpenWRT systems have default routes to other networks beside the VPN itself.

It also appears that the standard /usr/share/speedify/ShareSpeedify.sh is not run or used. Because of this, the standard setup for Raspberry Pi and the like don't work.

I'm currently attempting to work with the Beryl AX mt3000 router.

I have a full extensive routing description of what is happening during execution.

TalalMash commented 1 month ago

Hi, checkout this issue, GL.iNet load balancer may override the default routing table: https://github.com/TalalMash/Unofficial-Speedify-Installer-For-OpenWrt/issues/13

/usr/share/speedify/ShareSpeedify.sh is used for Linux systems with NetworkManager/IWD installed AFAIK. OpenWrt is using ubus.

Check the metrics of your network devices, equal metric may cause issues on older Owrt versions.

emmamei commented 1 month ago

I saw that posting; nowhere does it describe where that is to be found in the LuCI interface.

I finally found where it should be located: Network > Sharing or similar, but it turns out I don't have the software for that (mwan3 nor multiwan).

My system is a GL.iNet GL-MT3000 and the OS is reported as OpenWrt 23.05.3 r23809-234f1a2efa / LuCI openwrt-23.05 branch git-24.086.45142-09d5a38.

Neither ip route show nor cat /etc/config/network report any metric settings.

I also don't see any routes in this format:

default via <gw_ip> dev <device>

which would make the gateway reachable even if the default routes are removed...

TalalMash commented 1 month ago

Are you using an unofficial vanilla OpenWrt firmware or GL.iNet? For GL.iNet visit the setup page instead of LuCI: image

For changing metric, make sure all are more than 0 except the speedify interface: image

emmamei commented 1 month ago

I installed the latest OpenWRT; thus don't have the GL.inet interface.

emmamei commented 1 month ago

All interfaces including speedify and speedify6 have a gateway metric of 0.

I changed all WAN interfaces to use gateway metric of 20. I didn't change the LAN device metric; did not seem appropriate... Should I have done so?

emmamei commented 1 month ago

By the way... Once I have this figured out - and I believe I can figure this out - then I'll document the results and provide a text document to be used for others :+1:

TalalMash commented 1 month ago

That's correct, LAN shouldn't be changed. It seems like Speedify is going down and up while OpenWrt is reconfiguring the interface, try removing the "Bring up on boot" option.

You can post your /etc/config/network content with removed sensitive data here for easier diagnostics.

emmamei commented 1 month ago

That seems to have done it! Still havent gotten WiFi-based Internet to come up on reboot...

I also went through and added the appropriate packages, and got USB tethering to work as well.

Only problem now is, when Speedify is active, it doesn't seem to want to use more than one interface at a time. I've set the interfaces usb0 and phy0-sta0 and phy1-sta0 to Primary but none of them appear with the others - and if usb0 is used and removed, then the WiFi interfaces have to be restarted in order for Speedify to use them.

I really want Speedify to use multiple interfaces, including potentially multiple USB tethering devices and the WiFi-connected WAN, in order to provide one single Internet.

Almost there!

emmamei commented 1 month ago

/etc/config/network posted. config.network.txt

Another data point: Pairing and Sharing works fine, though apparently not as a bonded interface - both "interfaces" show up together on the Speedify web UI.

TalalMash commented 1 month ago

I see, try incrementing the metric, so each interface has a unique number, particularly wwan and wanusb.

emmamei commented 1 month ago

I increased the metric from 20 to 100 - across the board - then I increased wwan to 105 and wanusb to 110... But none of that changed anything.

I did note that if I just wait a little bit for things to settle, the WiFi internet and Speedify seem to come up appropriately. However, none of that provides multiple simultaneous connections according to the web UI. Also, the Pairing and Sharing device, also seems to only be a backup.

One note: when I activate the USB tethering, have the device active with Speedify, then remove the tethering device, Speedify seems to get confused or something - as it then finds no Internet connections at all, and the default routes are gone. A reboot fixes it.

So to summarize:

  1. Devices won't act as multiple simultaneous Internet sources.
  2. Removal of USB devices appears to hang Speedify, after it removes all default routes.

My use case here is to use the router with Speedify in such a way so that there is no Internet interruption when WiFi goes down, or a USB tether is added or removed. "Failover" always involves a hang by apps, as they now find their traffic coming from unexpected sources.

Imagine an RV connected to a camp WiFi, which then gets bogged down... Then we add one, then two, USB tethers and let the Internet run on those. Then perhaps we decide to leave the camp, and the two cellular USB tethers act in concert as they are able, to continue to provide seamless Internet service via ethernet and WiFi hotspot.

TalalMash commented 1 month ago

I remember interfaces being removed and added interrupted the network compared to losing internet connectivity in smoothwan when using non-defaults, there were few workarounds done on OpenWrt for the Pi I'll post them here later, regarding the other issues I'm not sure why, I haven't tested on latest version, will report back with findings.

emmamei commented 1 month ago

On my Linux system, which works splendidly (but is my desktop and not my router...) I set all usable interfaces to priority "always" via the command line.

Will give that a go later. I hope I can make this work - the ability to hotplug connections seamlessly was part of the goal for this setup.

I also added usb1 just now... in order to be able to have two phones tethered.

emmamei commented 1 month ago

All relevant interfaces are already set to priority always in the MT3000. The USB devices don't show until there is a "need" for such a device.

Next testing will be to see specifically what happens when a USB device is added, and what happens and is running when the tether is removed.

jacksongs commented 1 week ago

Hi both, been following this thread and just got a Beryl AX with Smoothwan/Speedify package in mind. Any updates on the above? Sounds like I should not flash the device with vanilla OpenWRT just yet as it seems the Gl.iNet firmware might be more robust at this point?

Looking to bond: -USB 4G dongle inserted in the Beryl AX -wifi from 4G iPhone -Ethernet from another 4G modem

Thanks, happy to troubleshoot if needed

spacesuitdiver commented 5 days ago

@emmamei how's this project going? You are still using the GLI.net firmware/software?