sonosaurus / sonobus

Source code for SonoBus, a real-time network audio streaming collaboration tool.
https://sonobus.net
GNU General Public License v3.0
1.55k stars 114 forks source link

[Feature Request] Add network interface selection #192

Open melMass opened 1 year ago

melMass commented 1 year ago

Hi,

I'm not sure why every mention of direct connect implies it's not fully working. I tested quite complex setup accross various OS (old mac, new macs, windows) and it works perfectly fine, I have a much better latency (almost none) than other solutions.

The only thing painful is I basically always use the same host/clients (using a local network with static IPs) and I have to manually type them each time. A way to either "recconect to last direct connection" or adding it to the recent list would make it much smoother.

Unrelated but the setup is basically SoundFlower -> SonoBus -> Ethernet -> Play on main computer. This way I'm successfully routing 3 computers audio to one sound system with unnoticeable latency,

Thanks

essej commented 1 year ago

I just want to say clearly right here, that my choice of the term "direct connect" was probably poor, it should have been "manual connect". When you use the private group connect style using multiple machines on your LAN, it does exactly the same peer-to-peer "direct" connection among the machines on your local network, only you don't have to actually type in their IP addresses. As in all SonoBus, there is no server where audio is routed, it will use the appropriate local IP address if the other ones in the group are on your local LAN, and the audio will still be going directly between the machines. However, if you have multiple network addresses inside your LAN (like wifi, vs ethernet), you might be able to force the issue using the manual connect.

The one thing manual connect does give you is the ability to not have everyone in a group talking to everyone else.

For using Private Group mode without hitting the internet at all (for the connection server), you can use your own connection server, and in fact every standalone SonoBus always has its own connection server you can use on port 10999, so if you choose one machine on your LAN that is running the standalone application (for example, let's say it has 192.168.1.5 as its IP address), you would put 192.168.1.5:10999 in the connection server field in the Private Group connect page for every client that you use in your LAN.

But all that said, yes, I should probably add a recents history for manual connections too :)

melMass commented 1 year ago

Thanks!

if you have multiple network addresses inside your LAN (like wifi, vs ethernet), you might be able to force the issue using the manual connect.

That's exactly my case :) I'm using a dedicated LAN router in ethernet and a main multibox in wifi. Using either public or private forces it to use the wifi one. I looked for settings to force an interface but I could not find one. Now that you describe it, maybe the feature request is more "Add network interface selection" to the main connect methods... What do you think?

melMass commented 1 year ago

And I don't mind at all using the other method but I had a "big" latency whereas using the ethernet interface I have none

essej commented 1 year ago

Good idea to have a manual network interface selector somewhere. Usually I disable wifi entirely when I'm using SB, just in case. I assume for whatever reason that isn't ideal for you...

melMass commented 1 year ago

Ohhh but I just discovered the standalone support CLI arguments! That does the trick for me, but I'm sure this feature will help others

essej commented 1 year ago

Ohhh but I just discovered the standalone support CLI arguments! That does the trick for me, but I'm sure this feature will help others

Which CLI arguments help you with this problem?

melMass commented 1 year ago

I think -c did but I might be wrong as I had to restart the host for it to pick it up

essej commented 1 year ago

So you are using the connection server in one of your running SonoBus standalone, and specifying it with the IP address that keeps it on the ethernet interface... that should work. You can do the same by just entering that on the Private Group page in the connection server field at the bottom...

Spacechild1 commented 1 year ago

Good idea to have a manual network interface selector somewhere.

@essej FWIW, I have just added a way to directly do this in AOO: https://git.iem.at/cm/aoo/-/commit/8f39b3dac07953e95188215a075e672d99217f8a.

It is much better to specify your own interface address than asking all other participants on the LAN to manually connect to you :-)

rjburrows commented 7 months ago

Good idea to have a manual network interface selector somewhere.

@essej FWIW, I have just added a way to directly do this in AOO: https://git.iem.at/cm/aoo/-/commit/8f39b3dac07953e95188215a075e672d99217f8a.

It is much better to specify your own interface address than asking all other participants on the LAN to manually connect to you :-)

Would this also solve the problem of a VPN connected client? In my use case, one member is behind a CGNAT firewall, and although I can run a VPN client on the host, it still routes / uses the primary network interface. In theory I would be able to select the VPN tunnel interface? At the moment the only option is to drop a router/VPN terminating device in the middle and route the client via that