Open larrysalibra opened 7 years ago
Can we just start at 8888 and increment if there's a conflict?
This issue has come up several times recently (#1059, #978). I think @shea256's suggesting of incrementing ports is relatively reasonable, though I'd suggest also eventually supporting a config file.
The canonical package for finding open ports in node is https://github.com/indexzero/node-portfinder; it should be straightforward to integrate this into blockstackProxy.js.
Our refined architecture plan should should make it so that we don't have to have daemons listening on ports at all:
Running the app in a native browser #599 and loading it from a file instead of from localhost should address the port 8888 issue.
Resolving names via a remote node or the local DNS system would fix port conflicts with core.
Blockstack uses a number of ports and conflicts are going to happen.
Pietrorea on twitter points out that Portal's port
8888
conflicts with charles proxy: https://twitter.com/pietrorea/status/841770893714067457Port conflicts also happen when more than one user on a machine uses blockstack (#309).
There's an existing discussion on the forum about how to address these issues: https://forum.blockstack.org/t/multi-user-support-on-macos-beyond/808?u=larry