trunk icon indicating copy to clipboard operation
trunk copied to clipboard

Allow binding to port 0 and on specified interfaces

Open rjmac opened this issue 2 years ago • 1 comments

This is an alternate fix for #252 - I think it would be extremely surprising for a program which has been told to bind to port X to choose of its own accord to bind to port Y instead, so this doesn't. Instead it makes use of the existing facility of the OS to allow the user to specifically say "I do not care what port this gets bound to, just choose one for me".

Also this also allows you to select a specific network interface - it's still 0.0.0.0 by default but it should probably actually be a loopback interface.

Finally, this now prints a URL that you can copy and paste (or click on, if your terminal supports that) to open the application, in addition to showing the bound interface and port.

Checklist

  • [X] Updated CHANGELOG.md describing pertinent changes.
  • [ ] Updated README.md with pertinent info (may not always apply).
  • [ ] Updated site content with pertinent info (may not always apply).
  • [X] Squash down commits to one or two logical commits which clearly describe the work you've done. If you don't, then Dodd will 🤓.

rjmac avatar Oct 03 '21 17:10 rjmac

@thedodd updated; you're right about being the same feature. I kept my change which made the config values IpAddrs rather than Strings (because it seems right to push that sort of syntactic validation out as far as possible) but other than that it was a trivial rebase.

rjmac avatar Nov 19 '21 01:11 rjmac

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

github-actions[bot] avatar Nov 03 '23 00:11 github-actions[bot]

This PR was closed because it has been stalled for 10 days with no activity.

github-actions[bot] avatar Nov 13 '23 00:11 github-actions[bot]