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

Can't connect nodejs and browser nodes #1219

Closed
JoseMiguelHerrera opened this issue Feb 15, 2018 · 5 comments
Closed

Can't connect nodejs and browser nodes #1219

JoseMiguelHerrera opened this issue Feb 15, 2018 · 5 comments
Labels
kind/support A question or request for support

Comments

@JoseMiguelHerrera
Copy link

JoseMiguelHerrera commented Feb 15, 2018

I know this has been discussed many times, but my app is dependant on this functionality and after days of testing I can't get it to work.

First I tried connecting my go-ipfs node with the browser node, to no avail. I did this by attempting the reverse proxy nginx method (using websockets), but I could not get it to connect.

Right now I'm trying the the nodejs node using p2p-websocket-star as I've seen being mentioned.

My server node config:

    "Addresses": {
        "Swarm": [
            "/dns4/ws-star.discovery.libp2p.io/tcp/443/wss/p2p-websocket-star"
        ],
        "API": "/ip4/127.0.0.1/tcp/5002",
        "Gateway": "/ip4/127.0.0.1/tcp/9090"
    },

My browser config:

const node = new IPFS({
  "Addresses": {
    "Swarm": [
    ],
    "API": "",
    "Gateway": ""
  },
  "Discovery": {
    "MDNS": {
      "Enabled": false,
      "Interval": 10
    },
    "webRTCStar": {
      "Enabled": true
    }
  },
  "Bootstrap": [
    "/dns4/ws-star.discovery.libp2p.io/tcp/443/wss/p2p-websocket-star/ipfs/QmVNqmWGV248kCZpJq2yXSYzTQi5the7vxs82HLfZj3tcK"
  ]
});

I don't really care how, but I need to get my browser node detecting the server node to fetch objects.

Help would GREATLY be appreciated.

@daviddias daviddias added the kind/support A question or request for support label Feb 19, 2018
@daviddias
Copy link
Member

@JoseMiguelHerrera you have switch the Bootstrap with Swarm addrs.

You just need for your browser config:

const node = new IPFS({
  "Addresses": {
     "Swarm": [
       "/dns4/ws-star.discovery.libp2p.io/tcp/443/wss/p2p-websocket-star
    ]
  }
})

They will find each other from there.

@daviddias daviddias added the status/deferred Conscious decision to pause or backlog label Feb 19, 2018
@daviddias
Copy link
Member

Closing, let us know if it didn't work for you.

@ghost ghost removed the status/deferred Conscious decision to pause or backlog label Mar 16, 2018
@nezzard
Copy link

nezzard commented Apr 14, 2018

It's not working for me. Add to browser node and trying to ipfs cat hash at go node

@aphelionz
Copy link
Contributor

I am also having trouble getting browser node content on public gateways... running 0.35 RC

@elie-h
Copy link

elie-h commented Apr 3, 2022

Having the same issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/support A question or request for support
Projects
None yet
Development

No branches or pull requests

5 participants