From 3a3295d91168f199f5db955637c3498c1d4bf960 Mon Sep 17 00:00:00 2001 From: Lucas Clemente Date: Wed, 31 Aug 2016 23:32:27 +0200 Subject: [PATCH] add our server id to the REJ handshake message --- handshake/crypto_setup.go | 1 + handshake/tags.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/handshake/crypto_setup.go b/handshake/crypto_setup.go index 88ee5d3e..4db8b3be 100644 --- a/handshake/crypto_setup.go +++ b/handshake/crypto_setup.go @@ -196,6 +196,7 @@ func (h *CryptoSetup) handleInchoateCHLO(sni string, chlo []byte, cryptoData map replyMap := map[Tag][]byte{ TagSCFG: h.scfg.Get(), TagSTK: token, + TagSVID: []byte("quic-go"), } if h.scfg.stkSource.VerifyToken(h.ip, cryptoData[TagSTK]) == nil { diff --git a/handshake/tags.go b/handshake/tags.go index cdcc14d5..92d4d843 100644 --- a/handshake/tags.go +++ b/handshake/tags.go @@ -27,6 +27,8 @@ const ( TagMIDS Tag = 'M' + 'I'<<8 + 'D'<<16 + 'S'<<24 // TagUAID is the user agent ID TagUAID Tag = 'U' + 'A'<<8 + 'I'<<16 + 'D'<<24 + // TagSVID is the server ID (unofficial tag by us :) + TagSVID Tag = 'S' + 'V'<<8 + 'I'<<16 + 'D'<<24 // TagTCID is truncation of the connection ID TagTCID Tag = 'T' + 'C'<<8 + 'I'<<16 + 'D'<<24 // TagPDMD is the proof demand