-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Support private networks via shared swarm.key #4005
Comments
This comment was marked as resolved.
This comment was marked as resolved.
I don't believe js-ipfs supports Private swarms via It seems all necessary primitives exist, what is missing is detection of secret in If anyone wishes to add this to js-ipfs, PR welcome 🙏 |
It seems that I tried to create a private IPFS network: async connect(){
process.env.LIBP2P_FORCE_PNET = "1" // enable private network
const swarmKey = await fse.readFile(AppConfig.ipfs.swarmKeyFile)
const ipfsConfig: any = {
repo: `./ipfs`,
EXPERIMENTAL: {
pubsub: true,
},
config: {
Bootstrap: [],
Addresses: {
Swarm: ["/ip4/0.0.0.0/tcp/4002", "/ip4/127.0.0.1/tcp/4003/ws"],
},
},
libp2p: {
modules: {
connProtector: new Protector(swarmKey),
},
},
}
this.node = await IPFS.create(ipfsConfig)
} It gives me an error After digging into I'm not sure if these are the right places to change and what are the side effects, but if everything is ok I can create a PR. |
@AlexMesser thank you for poking at this – please open a PR that make priv networks work. 🙏 it will be really valuable to have support for private networks in js-ipfs 👍 We can get js-libp2p team to review/bikeshed details there, if necessary. |
hello,it looks like that example running at node.js?can I used at browser with swarm.key? hope and waiting the answer please。 best wish! |
js-ipfs is being deprecated in favor of Helia. You can #4336 and read the migration guide. Please feel to reopen with any comments by 2023-06-02. We will do a final pass on reopened issues afterward (see #4336). @achingbrain to answer if private networks support is available in Helia |
This can be accomplished using the |
Hi. I need to connect js-ipfs to a private network.
How can I use my swarm.key during installation?
The text was updated successfully, but these errors were encountered: