Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Consider adding support for a HTTPS gateway #1789

Closed
satazor opened this issue Dec 21, 2018 · 5 comments
Closed

Consider adding support for a HTTPS gateway #1789

satazor opened this issue Dec 21, 2018 · 5 comments
Assignees
Labels
exp/expert Having worked on the specific codebase is important kind/wontfix P4 Very low priority status/ready Ready to be worked

Comments

@satazor
Copy link
Contributor

satazor commented Dec 21, 2018

  • Version: 0.33.1
  • Platform: MacOS
  • Subsystem:

Type:

Feature

Severity:

Low

Description:

It would be awesome if we could (maybe optionally) expose a HTTPS gateway alongside the HTTP one. Sometimes, I want to share a web application built with peer-base within a workshop/talk, but it won't work. The reason is that security context is broken because the URL is something like http://<my-lan-ip>:8080/ipfs/<cid> and IPFS fails to boot because window.crypto is not defined.

At the moment, we have to use https://github.com/naugtur/https-proxy-cli.

Steps to reproduce the error:

  1. Clone https://github.com/ipfs-shipyard/workshop-todo-dapp
  2. git checkout with-peer-base
  3. npm i
  4. npm run build
  5. ipfs add -r build
  6. open the folder cid in your local gateway with localhost and see that it works
  7. open the folder cid in your local gateway with your lan ip and see that it doesn't work due to window.crypto being undefined
@satazor
Copy link
Contributor Author

satazor commented Dec 21, 2018

Btw, I've create this here so that we can have a discussion but probably this should be added to go-ipfs as well if everyone agrees.

@pgte
Copy link
Contributor

pgte commented Dec 21, 2018

@satazor do you mean exposing websocket-start rendezvous server through wss://?

@satazor
Copy link
Contributor Author

satazor commented Dec 21, 2018

@pgte I meant the http gateway to also be exposed in https. It would be awesome to add a DApp built with peer-base in my local IPFS node and share it with people within the same network via http://<my-lan-ip>:8080/ipfs/<cid>. This requires it to be HTTPS otherwise it breaks the security context and window.crypto won't be accessible.

The same thing applies to the exposed WS yes! Related: libp2p/js-libp2p-rendezvous#5

@satazor satazor changed the title Consider adding support for a HTTPs gateway Consider adding support for a HTTPS gateway Dec 21, 2018
@pgte
Copy link
Contributor

pgte commented Dec 21, 2018

@satazor ha, gotcha!

@alanshaw alanshaw added exp/novice Someone with a little familiarity can pick up status/deferred Conscious decision to pause or backlog P4 Very low priority labels Jan 3, 2019
@daviddias daviddias added exp/expert Having worked on the specific codebase is important status/ready Ready to be worked and removed exp/novice Someone with a little familiarity can pick up status/deferred Conscious decision to pause or backlog labels Jan 11, 2019
@SgtPooki SgtPooki moved this to 🥞 Todo in js-ipfs deprecation May 17, 2023
@achingbrain
Copy link
Member

js-ipfs is being deprecated in favor of Helia. You can #4336 and read the migration guide.

This is not planned for Helia but a module that implements this could be written that uses Helia behind the scenes.

@github-project-automation github-project-automation bot moved this from 🥞 Todo to ✅ Done in js-ipfs deprecation May 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
exp/expert Having worked on the specific codebase is important kind/wontfix P4 Very low priority status/ready Ready to be worked
Projects
No open projects
Status: Done
Development

No branches or pull requests

5 participants