# IPFS companion proxy in web worker?

**URL:** <https://discuss.ipfs.tech/t/ipfs-companion-proxy-in-web-worker/4937>\
**Category:** Help\
**Tags:** ipfs-companion\
**Created:** [February 27, 2019, 2:48pm UTC](https://discuss.ipfs.tech/t/ipfs-companion-proxy-in-web-worker/4937 "2019-02-27T14:48:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![icidasset](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/icidasset/32/2294_2.png) [@icidasset](https://discuss.ipfs.tech/u/icidasset)\
**Post date:** [February 27, 2019, 2:48pm UTC](https://discuss.ipfs.tech/t/ipfs-companion-proxy-in-web-worker/4937/1 "2019-02-27T14:48:27Z")

</div>

Hey folks,

I was wondering if there was a way to have the `window.ipfs` IPFS API proxy available in a web worker?  
Instead of just the main thread.

Somewhat related, do most people run the IPFS API on port 5001?  
I might skip `window.ipfs` integration all together if that’s the case, although I don’t know if that’s a good idea.

Thanks!

---

<div class="post-metadata">

**Author:** ![lidel](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/lidel/32/9853_2.png) [@lidel](https://discuss.ipfs.tech/u/lidel)\
**Post date:** [February 28, 2019, 8:02pm UTC](https://discuss.ipfs.tech/t/ipfs-companion-proxy-in-web-worker/4937/2 "2019-02-28T20:02:55Z")

</div>

WebExtensions are unable to inject scripts into workers, so unless you add some code to your page to proxy `window.ipfs` from the main page to worker via [ipfs-postmsg-proxy](https://github.com/tableflip/ipfs-postmsg-proxy), it won’t work.

Related issue with more on this very topic:

> <https://github.com/ipfs-shipyard/ipfs-companion/issues/676>

---

<div class="post-metadata">

**Author:** ![icidasset](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/icidasset/32/2294_2.png) [@icidasset](https://discuss.ipfs.tech/u/icidasset)\
**Post date:** [February 28, 2019, 8:35pm UTC](https://discuss.ipfs.tech/t/ipfs-companion-proxy-in-web-worker/4937/3 "2019-02-28T20:35:57Z")

</div>

Thanks @lidel!  
I somehow missed that Github issue, really helpful summary of the current state of things 🙌
