ipfs-webui icon indicating copy to clipboard operation
ipfs-webui copied to clipboard

Not able to use private network gateway due to 1x1.png

Open sauloal opened this issue 4 years ago • 5 comments

Describe the bug

Not able to use private network gateway due to 1x1.png

As it is pinned to use bafybeibwzifw52ttrkqlikfzext5akxu7lz4xiwjgwzmqcpdzmp3n5vnbe, when using a private network, is not able to configure the public gateway as it fails the check Check

To Reproduce Steps to reproduce the behavior:

  1. Connect to a private swarm
  2. Try to change the public/private gateway
  3. Fails because can't find 1x1.png as the CID can't be found

Expected behavior Check availability of gateway another way Allow to not check availability of gateway Allow to set custom probe of gateway availability

Desktop (please complete the following information):

  • OS: Windows
  • Browser chrome
  • Version [UI v2.15.0]

sauloal avatar May 28 '22 20:05 sauloal

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review. In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment. Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

welcome[bot] avatar May 28 '22 20:05 welcome[bot]

  • this is a bug! thanks for finding this!

  • 1x1.png is bafybeibwzifw52ttrkqlikfzext5akxu7lz4xiwjgwzmqcpdzmp3n5vnbe is dag-pb which fails to load from public swarm because you have private networking set up

  • fix here is to replace bafybeibwzifw52ttrkqlikfzext5akxu7lz4xiwjgwzmqcpdzmp3n5vnbe

    • with identity CID that had the data inlined (raw-leave + identity hash)
    • OR we could replace 1x1.png CID with one for public/favicon.ico (which is already part of webui, so will be present in private setup that has webui cached)

    PR welcome!

lidel avatar Jun 06 '22 17:06 lidel

ipfs add -q --hash=IDENTITY 1x1.png
bafkqax4jkbheodikdifaaaaabveuqrcsaaaaaaiaaaaacaidaaaaajo3k3faaaaaanieyvcfaaaabj32hxnaaaaaaf2fetstabaonwdgaaaaacsjiravicgxmnqaaaaaaiaadyrbxqzqaaaaabeuktsevzbgbaq

Querying with private gateway (assume localhost:8080) result in http://localhost:8080/ipfs/bafkqax4jkbheodikdifaaaaabveuqrcsaaaaaaiaaaaacaidaaaaajo3k3faaaaaanieyvcfaaaabj32hxnaaaaaaf2fetstabaonwdgaaaaacsjiravicgxmnqaaaaaaiaadyrbxqzqaaaaabeuktsevzbgbaq

Return status code=400 CID incompatible with DNS label length limit of 63: kdi0v5uo6z0hrybvhqyb5faspyh4pgy7cxv64dd4iwn8a1i0u0ffpn8t8960j2or6bo81cjkc2vjcrm5ebdwdl7ou91u15r1v7ywl7bv29vi2nh3t4d8o95g2sv9tzoq3evs6dk23bcfgnw5ukgfi7ngi

Wonder why https://ipfs.io can handle it correctly.

ymlai87416 avatar Jun 08 '22 00:06 ymlai87416

I have submitted a pull request, which take @lidel idea.

The validating function now issues 3 requests. If any 1 of them success, It is considered as a valid server.

I did the testing and most public server can accept all 3 hashes. I also setup a private server and identity hash worked OK.

ymlai87416 avatar Jun 11 '22 10:06 ymlai87416

:tada: This issue has been resolved in version 2.18.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

ipfs-gui-bot avatar Sep 09 '22 23:09 ipfs-gui-bot