ipfs / ipfs-desktop

An unobtrusive and user-friendly desktop application for IPFS on Windows, Mac and Linux.
https://docs.ipfs.tech/install/ipfs-desktop/
MIT License
5.86k stars 851 forks source link

Automatically detect/update if local gateway port changes in config #1765

Open promeneur opened 3 years ago

promeneur commented 3 years ago

Describe the bug when ipfs local gateway changes the port 8080 to 8081 then FF ipfs companion does not change port 8080 to 8081

To Reproduce Steps to reproduce the behavior:

  1. launch vlc using port 8080 for remote control
  2. launch ipfs-desktop
  3. ipfs-desktop offers to change to 8081
  4. i accept 5 i launch FF then i click on ipfs companion
  5. i see that local gateway port is still 8080
  6. Expected behavior in ipfs companion local gateway port automatically changes to 8081

Desktop (please complete the following information):

jessicaschilling commented 3 years ago

Thanks - the core team will discuss in our next triage, but please be aware in the meantime that this can be changed manually in Companion's settings page.

jessicaschilling commented 3 years ago

Let's use this issue to investigate how hacky/costly it would be for Companion to "know" if the local gateway port changes, and act accordingly. It's a common frustration for anyone who, for example:

  1. Is doing any of the myriad tasks that already claim the commonly-used port 8080
  2. Starts IPFS (in this example, Desktop)
  3. Gets the Desktop alert that the port is in use, changes port
  4. Forgets all about this until tries to open an IPFS-hosted artifact in a Companion-enabled browser, and then gets a very generic error
lidel commented 3 years ago

Companion is polling peer list, we could additionally/instead read subset of config with gateway port. This most likely needs https://github.com/ipfs/ipfs-companion/issues/721#issuecomment-494602685 to land first tho.