Skip to content
This repository has been archived by the owner on Aug 19, 2022. It is now read-only.

set an ALPN value in the tls.Config #32

Merged
merged 1 commit into from
Jul 30, 2019
Merged

set an ALPN value in the tls.Config #32

merged 1 commit into from
Jul 30, 2019

Conversation

marten-seemann
Copy link
Collaborator

Fixes #10.

This sets the application protocol (ALPN, see RFC 7301) to "libp2p". For TCP, use of ALPN is optional, but for QUIC, ALPN is mandatory, and the handshake fails if an endpoint doesn't send the ALPN extension, or if the two peers can't agree on a mutually supported application.

Since the the client sends this extension in the clear (it's part of the ClientHello message), this is one of the many ways that libp2p traffic sticks out. As part of our effort to make our traffic indistinguishable from normal web traffic, we might want to change this to the application name used by HTTP/2 or HTTP/3 at some point in the future, and use an upgrade mechanism like MASQUE.

@marten-seemann marten-seemann merged commit cc53c4f into master Jul 30, 2019
@marten-seemann marten-seemann deleted the alpn branch July 30, 2019 09:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

use ALPN
2 participants