neevek / omnip

An all in one proxy implementation written in Rust.
21 stars 5 forks source link

Add dashboard server port command line argument #4

Open absolutely-vivid opened 1 month ago

absolutely-vivid commented 1 month ago

Hi, I added a command line argument to let the user choose port for the dashboard server. If a port isn't specified, it falls back to the original behavior of picking a random port.

neevek commented 1 month ago

Hi vivid,

There are two things we need to take into account when adding this feature:

  1. If the newly added command line option accepts a sockaddr, the user can specify any ip address other than the one used to run the omnip server, which the dashboard server will fail to bind on. Maybe specifying a port is enough.
  2. The specified port may be in use, we need to handle the error in that case.