mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Parse ClientPollRequest version in DecodeClientPollRequest
Instead of IPC.ClientOffers. This makes things consistent with EncodeClientPollRequest which adds the version while serializing.
This commit is contained in:
parent
6fd0f1ae5d
commit
829cacac5f
6 changed files with 52 additions and 57 deletions
|
@ -146,8 +146,9 @@ func clientOffers(i *IPC, w http.ResponseWriter, r *http.Request) {
|
|||
if len(body) > 0 && body[0] == '{' {
|
||||
isLegacy = true
|
||||
req := messages.ClientPollRequest{
|
||||
Offer: string(body),
|
||||
NAT: r.Header.Get("Snowflake-NAT-Type"),
|
||||
Offer: string(body),
|
||||
NAT: r.Header.Get("Snowflake-NAT-Type"),
|
||||
Version: messages.ClientVersion1_0,
|
||||
}
|
||||
body, err = req.EncodeClientPollRequest()
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue