trunk
trunk copied to clipboard
Allow binding to port 0 and on specified interfaces
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 🤓.
@thedodd updated; you're right about being the same feature. I kept my change which made the config values IpAddr
s rather than String
s (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.
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.
This PR was closed because it has been stalled for 10 days with no activity.