FAForever / java-ice-adapter

A P2P connection proxy for Supreme Commander: Forged Alliance using ICE
MIT License
5 stars 12 forks source link

Add command line parameters to allow/block interfaces/ip addresses #23

Closed BenKluwe closed 2 years ago

BenKluwe commented 5 years ago

Set org.ice4j.ice.harvest.ALLOWED_INTERFACES, org.ice4j.ice.harvest.BLOCKED_INTERFACES, org.ice4j.ice.harvest.ALLOWED_ADDRESSES and org.ice4j.ice.harvest.BLOCKED_ADDRESSES via command line options so the gathering does not time out indefinitely on windows when multiple adapters are active but only one is connected to the internet.

BenKluwe commented 5 years ago

See also https://github.com/FAForever/downlords-faf-client/issues/1461

BenKluwe commented 5 years ago

It turns out that this option may not be necessary, but still useful to have. Using this (with increased timeout, see here) to see whether or not the timeout would be reached showed that binding an interface did not have an effect on the time it takes to gather candidates. It seems as though the underlying ice4j implementation first gathers all potential candidates and then chooses which ones to use based on the above system properties.