1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-01-06 01:05:35 -05:00

Use 'h2' for ALPN in TCP

This commit is contained in:
Darien Raymond
2018-01-02 18:16:36 +01:00
parent 27a63656ac
commit 30f27706e0
5 changed files with 44 additions and 19 deletions

View File

@@ -26,7 +26,7 @@ func Dial(ctx context.Context, dest net.Destination) (internet.Connection, error
return nil, err
}
if config := tls.ConfigFromContext(ctx, tls.WithDestination(dest)); config != nil {
if config := tls.ConfigFromContext(ctx, tls.WithDestination(dest), tls.WithNextProto("h2")); config != nil {
conn = tls.Client(conn, config.GetTLSConfig())
}