mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 14:11:23 -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
|
@ -122,8 +122,9 @@ func (bc *BrokerChannel) Negotiate(offer *webrtc.SessionDescription) (
|
|||
// Encode the client poll request.
|
||||
bc.lock.Lock()
|
||||
req := &messages.ClientPollRequest{
|
||||
Offer: offerSDP,
|
||||
NAT: bc.natType,
|
||||
Offer: offerSDP,
|
||||
NAT: bc.natType,
|
||||
Version: messages.ClientVersion1_0,
|
||||
}
|
||||
encReq, err := req.EncodeClientPollRequest()
|
||||
bc.lock.Unlock()
|
||||
|
|
|
@ -43,8 +43,9 @@ func (t errorTransport) RoundTrip(req *http.Request) (*http.Response, error) {
|
|||
// offer.
|
||||
func makeEncPollReq(offer string) []byte {
|
||||
encPollReq, err := (&messages.ClientPollRequest{
|
||||
Offer: offer,
|
||||
NAT: nat.NATUnknown,
|
||||
Offer: offer,
|
||||
NAT: nat.NATUnknown,
|
||||
Version: messages.ClientVersion1_0,
|
||||
}).EncodeClientPollRequest()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue