CESNET / UltraGrid

UltraGrid low-latency audio and video network transmission system
http://www.ultragrid.cz
Other
492 stars 53 forks source link

Feature request for [HOLEPUNCH] #260

Open maybites opened 1 year ago

maybites commented 1 year ago

Hi

Marvelous job you did with the new [HOLEPUNCH] feature. I have built it into the telemersive-route, and it works very well.

But I have two features that would make it even better:

  1. Would it be possible to give more feedback on the current connection status?

To be specific:

Currently the logoutput when starting up ultragrid with holepunch looks like this:

"/uv.exe" -t spout:name="Spout Demo Sender" -c libavcodec:codec=H.264:bitrate=10M -Nholepunch:room=IASpace_ch_2:coord_srv="someurl.zhdk.ch:12418":stun_srv="stun4.l.google.com:19302"

UltraGrid 1.7+ (master rev 1e50d51 built Oct 18 2022 08:20:31)

but doesn't give any indication it waits for another peer. Desireable would be something like:

[HOLEPUNCH] Connection: Waiting for remote client...

and once the connection is established:

[HOLEPUNCH] Connection: Established

  1. Would it be possible to reconnect?

it would be nice if PeerA falls back into waiting for a new Peer if the client PeerB stops:

[HOLEPUNCH] Connection: Dropped
[HOLEPUNCH] Connection: Waiting for remote client...

At the moment PeerA does nothing and needs to be restarted.

mpiatka commented 1 year ago

Hi,

Would it be possible to give more feedback on the current connection status?

Sure, I've added those messages in that exact format.

Would it be possible to reconnect?

Unfortunately the code is structured in such a way that this would probably require big changes and I can't think of a nice way to do this right now. I'll leave this open for the time being and maybe I'll figure something out later.

maybites commented 1 year ago

Sure, I've added those messages in that exact format.

Highly appreciated.

Unfortunately the code is structured in such a way that this would probably require big changes and I can't think of a nice way to do this right now. I'll leave this open for the time being and maybe I'll figure something out later.

No worries. Thanks for considering.

sogorman commented 11 months ago

Holepunch has been fantastic and working well. Feature request; the ability to specify an ETH interface or interface IP that will be used for the punching.

In our case we have everything on a VPN 10.102.102.0/24 but like using holepunch to route video traffic over the WAN and not riding on top of our VPN for a number of reasons... but we do like to keep the VPN online for other communication.

In the example below it looks like (and verified) that holepunch is using the VPN interface 10.102.102.0/24 interfaces on the machines to route traffic as apposed to the WAN.

Ironically the VPN interface is 10.102.102.0/24 on both machines with no gateway.

Thoughts?

[HOLEPUNCH] Connection: Waiting for remote client...
[HOLEPUNCH] Remote client name: HotDog-NotHotDog.local
[HOLEPUNCH] Received candidate: a=candidate:1 1 UDP 2122317823 10.0.100.170 53336 typ host
[HOLEPUNCH] Local candidate port: 53336
[HOLEPUNCH] Received candidate: a=candidate:2 1 UDP 2122317567 10.102.102.101 53336 typ host
[HOLEPUNCH] Local candidate port: 53336
[HOLEPUNCH] Received candidate: a=candidate:3 1 UDP 1686109695 66.210.240.190 53336 typ srflx raddr 0.0.0.0 rport 0
[HOLEPUNCH] Local candidate  : 10.102.102.101:53336
[HOLEPUNCH] Remote candidate : 10.102.102.102:62837
[HOLEPUNCH] Connection: Waiting for remote client...
[HOLEPUNCH] Remote client name: HotDog-NotHotDog.local
[HOLEPUNCH] Received candidate: a=candidate:1 1 UDP 2122317823 10.0.100.170 63059 typ host
[HOLEPUNCH] Local candidate port: 63059
[HOLEPUNCH] Received candidate: a=candidate:2 1 UDP 2122317567 10.102.102.101 63059 typ host
[HOLEPUNCH] Local candidate port: 63059
[HOLEPUNCH] Received candidate: a=candidate:3 1 UDP 1686109695 66.210.240.190 63059 typ srflx raddr 0.0.0.0 rport 0
[HOLEPUNCH] Local candidate  : 10.102.102.101:63059
[HOLEPUNCH] Remote candidate : 10.102.102.102:56953
[HOLEPUNCH] Connection: Established
[holepunch] remote: 10.102.102.102
mpiatka commented 11 months ago

I've just added the option :bind_ip=<addr>, where you can put the local address that is configured on the desired interface (so for the WAN interface it would look something like this: :bind_ip=192.168.0.7).

sogorman commented 11 months ago

Fantastic, will give it a go when a new nightly armhf appimage is released. Appreciate you