Improve port allocation logic for tiny proxy.
Description
Environment
Activity

Antia Puentes February 19, 2020 at 11:54 AM
Since WAM does not use tinyproxy anymore ( and ), this issue has become obsolete and we can close it.

Jacobo Aragunde Pérez September 27, 2019 at 3:44 PM
The move to token-based security would let us get rid of this component, let's put this on hold.

jose bollo September 16, 2019 at 7:50 AM
I agree that asking the OS to allocates the port is the best. How handling error of allocation is the big thing. Refusing to start with a clear error message is the only issue.

AK December 11, 2018 at 9:41 AM
There is a similar implementation for allocating a port to af-binder services.
In the current implementation, to get the random port number, use 0 in a bind then use getsockname to retrieve the allocated port.
Current implementation seems to be better than generating random port number dynamically.
delegating port generation to OS seems to be safest.
It's not pre computed and can not be easily guessed.
OS will handle resource allocation
OS will handle port conflict resolution
Details
Details
Assignee

Reporter

Currently, we ask OS to provide free port and pass it to tinyproxy to listen to communication.
We need to handle the following cases
What if OS fails to provide a free port number
Can we predefine port range for tinyproxy usage?