From aac791d299c23bdc298e8e923cc22604a8a70baa Mon Sep 17 00:00:00 2001 From: fred Date: Thu, 3 Nov 2022 22:55:45 +0100 Subject: [PATCH] https://github.com/ipfs/js-ipfs/blob/master/docs/DELEGATE_ROUTERS.md --- install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install.sh b/install.sh index 8dad6706..195afc70 100755 --- a/install.sh +++ b/install.sh @@ -207,6 +207,11 @@ ipfs config --json Experimental.Libp2pStreamMounting true ipfs config --json Experimental.P2pHttpProxy true ipfs config --json Swarm.ConnMgr.LowWater 0 ipfs config --json Swarm.ConnMgr.HighWater 0 + +## For ipfs.js = https://github.com/ipfs/js-ipfs/blob/master/docs/DELEGATE_ROUTERS.md +ipfs config --json Addresses.Swarm | jq '. += ["/ip4/0.0.0.0/tcp/30215/ws"]' > /tmp/30215.ws +ipfs config --json Addresses.Swarm "$(cat /tmp/30215.ws)" + myIP=$(hostname -I | awk '{print $1}' | head -n 1) ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://'$myIP':8080", "http://127.0.0.1:8080", "http://astroport", "https://astroport.com", "https://qo-op.com", "https://tube.copylaradio.com", "http://libra.copylaradio.com:8080" ]' ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST"]'