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

expose the security protocol on the ConnectionState #1907

Merged
merged 4 commits into from
Nov 21, 2022

Conversation

marten-seemann
Copy link
Contributor

In preparation for the integration test needed for #1906. Will also be needed to report swarm metrics (#1356).

@@ -89,9 +92,14 @@ func New(secureMuxer sec.SecureMuxer, muxers []StreamMuxer, psk ipnet.PSK, rcmgr
}
u.muxerIDs = make([]string, 0, len(muxers))
for _, m := range muxers {
u.msmuxer.AddHandler(string(m.ID), nil)
u.muxerMuxer.AddHandler(string(m.ID), nil)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Future refactor: We can have the mulstreamMuxer accept a generic for the Handler then we can a reference to the muxer/security upgrader directly in the multistream muxer instead of passing nil here, then having to get the reference ourselves: https:/libp2p/go-libp2p/pull/1907/files#diff-bac06b53f2856923e32085b096994a99dd77a67ce02a3ff4cb64d3610c2345fdR301

// The stream multiplexer used on this connection (if any).
StreamMultiplexer string
// The security protocol used on this connection (if any).
Security string
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 Thanks for this rename. I think this makes a lot more sense.

@marten-seemann marten-seemann merged commit 6d39263 into master Nov 21, 2022
@marten-seemann marten-seemann deleted the expose-security branch November 21, 2022 21:47
@marten-seemann marten-seemann mentioned this pull request Nov 22, 2022
35 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants