# Can't seem to get browser js-ipfs functioning over the net using webrtc-star or circuit-relay

**URL:** https://discuss.ipfs.tech/t/cant-seem-to-get-browser-js-ipfs-functioning-over-the-net-using-webrtc-star-or-circuit-relay/10953
**Category:** Help
**Tags:** js-ipfs
**Created:** [April 16, 2021, 8:41pm UTC](https://discuss.ipfs.tech/t/cant-seem-to-get-browser-js-ipfs-functioning-over-the-net-using-webrtc-star-or-circuit-relay/10953 "2021-04-16T20:41:13Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![Discordian](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/discordian/32/4692_2.png) [@Discordian](https://discuss.ipfs.tech/u/Discordian)
#### Post date: [April 17, 2021, 6:13am UTC](https://discuss.ipfs.tech/t/cant-seem-to-get-browser-js-ipfs-functioning-over-the-net-using-webrtc-star-or-circuit-relay/10953/4 "2021-04-17T06:13:56Z")

</div>

> [@Discordian](#):
>
> 1. What are the pros/cons of webrtc-star and circuit-relay?
> 2. Can they be used in conjunction?
> 3. How do I achieve connectivity given my scenarios below? (What am I doing wrong?)
> 4. Why do I lose connection after some time to peers I connect to through the relay?
> 5. Why can I not reconnect to these peers after the disconnection? I’m still peered with the relay itself.
> 6. Any way I can announce my p2p-circuit multiaddress? It doesn’t display in `ipfs.id()` , and I need to manually connect.

1. webrtc-star allows browser-browser communication, circuit-relay is useful when this isn’t possible
2. Yes.
3. For star, connecting to local peers is expected, for relay, this:

```js
await ipfs.swarm.connect("/dns6/ipfs.thedisco.zone/tcp/4430/p2p/12D3KooWChhhfGdB9GJy1GbhghAAKCUR99oCymMEVS4eUcEy67nt/p2p-circuit/p2p/<TARGET_PEERID>");

```

1. js-ipfs doesn’t implement a keepalive, you have to do this yourself: [Peers disconnect every 10 minutes](https://discuss.ipfs.tech/t/peers-disconnect-every-10-minutes/8105)
2. Not sure
3. For now I’m going to put an additional software on my node that looks for js-ipfs peers and announces their p2p-circuit multiaddress over a pubsub channel

---

_[View the full topic](https://discuss.ipfs.tech/t/cant-seem-to-get-browser-js-ipfs-functioning-over-the-net-using-webrtc-star-or-circuit-relay/10953)._
