tuntox icon indicating copy to clipboard operation
tuntox copied to clipboard

make UDP connections more likely

Open zoff99 opened this issue 4 years ago • 4 comments

by removing the start_port and end_port the connection more often uses UDP and is much faster. with those lines i always only get TCP relayed connections.

zoff99 avatar Oct 25 '20 15:10 zoff99

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

sonarqubecloud[bot] avatar Oct 25 '20 15:10 sonarqubecloud[bot]

https://github.com/gjedeer/tuntox/blob/3196377fe33d6a23f22fb47ed4f2b174e370d086/main.c#L1476

also this line means that you will RUN a tcp relay (which you may not want), it has nothing to do with using TCP relays. if you set the value to 0 then you will NOT run a tcp relay. something you may want to allow in the options

zoff99 avatar Oct 25 '20 15:10 zoff99

also this line means that you will RUN a tcp relay

Yes, I'm aware. If --help is not clear about it, your suggestion on different wording is welcome.

I wanted to help the network by making more TCP relays available, but it doesn't seem that any kind of gossip protocol about relays is even in the roadmap, so it makes no sense because all Tox clients are using hard coded relays anyway.

by removing the start_port and end_port the connection more often uses UDP and is much faster.

I did not know that. I still want to retain the ability for users to specify which UDP ports to use (because of port forwarding) so I'm definitely not going to merge your PR as is, but perhaps it's a good idea to stick with defaults instead of random values. Thanks.

gjedeer avatar Oct 26 '20 11:10 gjedeer

https://github.com/TokTok/c-toxcore/blob/master/toxcore/tox.h#L610-L611

If both start_port and end_port are 0, the default port range will be
used: [33445, 33545].

zoff99 avatar Nov 20 '21 07:11 zoff99

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

sonarqubecloud[bot] avatar May 06 '23 08:05 sonarqubecloud[bot]