-
Notifications
You must be signed in to change notification settings - Fork 698
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
Add SkipTLSHandshake optional function to CustomDialer #1147
Conversation
This option to skip the TLS wrapper is meant to be used if a custom dialer already handled the TLS handshake. I discussed my use case, which is using NATS from a Wasm module running in the browser in Slack with @derekcollison. There may be other use cases when the custom dialer is using some kind of tunneling, for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. Would be nice to have documentation on this though. As skipTLSDialer
will not be visible in godoc, I would suggest to document this either on CustomDialer
interface or CustomDialer
field on Options
.
@wallyqs Also,
|
5ae4fe2
to
51c8882
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! One check still failing (field skipTLS
unused), I've added a suggestion.
Signed-off-by: Waldemar Quevedo <[email protected]> Co-authored-by: Piotr Piotrowski <[email protected]>
d7099ff
to
65b7870
Compare
I want to thank all of you that worked on this and got it upstream so quickly! |
Follow up from #1146
This adds a small interface
SkipTLSHandshake() bool
that when implemented aCustomDialer
may opt into skipping the handshake if not needed by the dialer implementation./cc @oderwat