overte-org / overte

Overte open source virtual worlds platform.
https://overte.org/
Other
147 stars 51 forks source link

Assignment clients use incorrect ports when port is specified #321

Open ksuprynowicz opened 1 year ago

ksuprynowicz commented 1 year ago

When ports are specified for assignment-client, local port is correct but external ports are still choosen at random, causing connections to fail if UDP hole punching fails. A way to specify external port too would be preferable, because UDP hole punching is not always reliable.

Both of these fail in the same way:

./assignment-client/assignment-client -n 6 --min-listen-port 48000
./assignment-client/assignment-client  -t 0 -p 48000
./assignment-client/assignment-client  -t 1 -p 48001
...
./assignment-client/assignment-client  -t 6 -p 48006

image

OfficialR3ido101 commented 1 year ago

There seems to be a turn connection issue LimitedNodeList.cpp#L1110

image

ksuprynowicz commented 1 year ago

For example for the port 40105 it says: [02/14 23:31:31] [DEBUG] [hifi.networking] [870333] [assignment-client] New public socket received from STUN server is 213.134.187.120:36693 (was :0) On some systems ports are mapped correctly and on some not.

daleglass commented 1 year ago

We should add a way to listen on specific address:ports. This way you can make it only listen on specific interfaces.

daleglass commented 1 year ago

I tried to look into this one, but so far couldn't reproduce it

OfficialR3ido101 commented 1 year ago

When starting the assignment clients i am doing bash ./run_assignment_client -t 0 -p 1024