ssb-server icon indicating copy to clipboard operation
ssb-server copied to clipboard

Make it easy to run your own P2P scuttlebot network

Open bitalias opened this issue 10 years ago • 8 comments

E.g. for testing purposes or inside a company.

bitalias avatar Mar 31 '16 02:03 bitalias

This would relate to running a Test-Net as well. Should be doable through the handshake-capability.

pfrazee avatar Mar 31 '16 02:03 pfrazee

Does that mean that if I change the value in ssb-cap.js I'm sure that my messages will never be replicated to the official and only to the nodes running my secret key?

arj03 avatar Apr 14 '16 09:04 arj03

It would mean your node could only make direct connections to nodes using the same ssb-cap.js. The log messages could in theory make their way to other nodes; for instance, if one of the nodes then changed its ssb-cap.js to match another networks'.

On Thu, Apr 14, 2016 at 4:20 AM, Anders Rune Jensen < [email protected]> wrote:

Does that mean that if I change the value in ssb-cap.js I'm sure that my messages will never be replicated to the official and only to the nodes running my secret key?

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/ssbc/scuttlebot/issues/332#issuecomment-209844037

pfrazee avatar Apr 14 '16 16:04 pfrazee

I'm creating an app for private networks (such as one inside a company) using scuttlebot.

Changing the handshake key isn't enough for my case. Because, for example, when you connect to company B's network after connecting to company A's network, you don't like to share messages on company A with members of company B.

So I need a way to separate data safely. Do you have any idea on this case?

uiur avatar Aug 23 '16 04:08 uiur

@uiureo yes. We just need to also use the app key in the signature - the simplest would be to prepend the appkey to the message before signing, then messages from the wrong network would appear invalid. This would also be worthwhile for creating a test network.

https://github.com/ssbc/ssb-keys/blob/master/index.js#L105-L116JB

dominictarr avatar Aug 23 '16 11:08 dominictarr

I think this issue is resolved. You can now pass a different appkey or caps into sbot and it seems to recognize it along the entire stack. http://github.com/evbogue/decent shows how to do this.

Does this qualify as 'easy' though? Unsure.

evbogue avatar Oct 01 '17 18:10 evbogue

Is this what is meant by this issue? You can pass in the app key as an argument when you start sbot:

sbot server -- --caps.shs="abc"

This is the object syntax from minimist https://github.com/substack/minimist/blob/master/test/parse.js#L180

Then in ssb-client, pass in the same key

Client(keys,{
    path: '/Users/me/.ssb',
    appKey: 'abc',
}, (err, sbot) => {})

nichoth avatar Oct 15 '17 23:10 nichoth

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 01 '18 16:11 stale[bot]