Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternate caps.shs #316

Open
mplorentz opened this issue Jul 22, 2022 · 6 comments
Open

Alternate caps.shs #316

mplorentz opened this issue Jul 22, 2022 · 6 comments
Labels
Bug Something isn't working

Comments

@mplorentz
Copy link
Contributor

I'd like to run a room on an alternate SSB network. I have the room running via docker-compose, and I can see my secret in the ssb-go-room-secrets directory. I tried adding adding a config file there with my caps dictionary, but it doesn't seem to be picked up by the room. Is there another way to pass caps keys to the room?

@decentral1se
Copy link
Member

Hey @mplorentz i'm unfamiliar with this feature but I server cli options available:

  -shscap string
    	secret-handshake app-key (or capability) (default "1KHLiKZvAvjbY1ziZEHMXawbCEIM6qwjCDm3VYRan/s=")

Perhaps a config option is not supported? Unsure.

@mplorentz
Copy link
Contributor Author

Ah thanks @decentral1se that looks like what I want but it doesn't seem to be working when I set it. My client (go-ssb/Planetary) says:

level=error ts="2022-07-26 18:38:37.3088830 (UTC)" where=ssbConnectPeer err="connecting to \"net:192.168.1.131:8008~shs:bGo2yHoSjTFVYmZxPD9+AZM2LYnp6A/5WxHzezfDLls=\" failed: node/connect: error dialing: error wrapping connection: secrethandshake: failed during data transfer of receiving challenge: EOF"

@boreq I think you fixed a bug related to alternate caps in cryptoscope/ssb a few months ago. Do you remember the details of that and do you think that go-ssb-room would have the same issue? I think they share many of the underlying Go modules.

@boreq
Copy link
Contributor

boreq commented Jul 28, 2022

@mplorentz

The problem which you are probably referring to that I fixed was related to not being able to redeem invites on the test network. This was caused by the fact that the code always used the default network key. The linked commit allows configuring an alternate network key when redeeming invites.

I suspect that this is a separate problem.

planetary-social/ssb@fc36feb

@decentral1se
Copy link
Member

@mplorentz and to clarify, you can connect when not using the -shscap option on the CLI? You should be able to confirm that go-sbot is processing your expected value by inspecting the .ssb-go/running-config.json also.

@stevenroose
Copy link
Contributor

I am very confused as to how the shscap work. In the code it says "appkey" so I supposed it should be a unique key. But my setup never works if I put any other 32 bytes in that field than the default ones. Do they need to be the fixed 1KHLiKZvAvjbY1ziZEHMXawbCEIM6qwjCDm3VYRan/s=?

@boreq
Copy link
Contributor

boreq commented Oct 28, 2022

I am very confused as to how the shscap work. In the code it says "appkey" so I supposed it should be a unique key. But my setup never works if I put any other 32 bytes in that field than the default ones. Do they need to be the fixed 1KHLiKZvAvjbY1ziZEHMXawbCEIM6qwjCDm3VYRan/s=?

Yes, the main network uses a predefined network key. It is sometimes referred to as the "app key" but the protocol guide consistently calls it a "network key". I find the name "app key" confusing. Different network keys can be used to set up alternate networks for example for testing purposes.

https://ssbc.github.io/scuttlebutt-protocol-guide/#handshake

@decentral1se decentral1se added the Bug Something isn't working label Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants