Client Update v0.10.2

Published at November 1, 2020 ·  2 min read

Share on:

We’ve had several issues reported recently that are all related to websockets. There have been reports in the past, however, I’ve been able to duplicate an issue by a user by working with them to duplicate their environment and track it down.

Websocket Proxying

The Packetriot client is written in Go and uses httputil.ReverseProxy for its reverse-proxying needs. I’ve been under the impression for some time that Go has support websockets in its reverse proxy code since version 1.12.0.

Currently we are building with Go 1.15.1 and I did a quick read through the code there looks like there are blocks checking for connection upgrades (websockets) and handling them. So I’m still confused why this doesn’t work correctly using httputil.ReverseProxy.

I added a block in our code that checks for the Connection: Upgrade header value and circumvents our use of httputil.ReverseProxy and dial the upstream server directly and relay the connection to it.

This looks to have fixed the issues that I was able to duplicate.

Thanks

I want to thank the user that provided me enough information to duplicate their environment so I could look at this more closely.

I’ve had other users explain that websockets worked fine for them and this intermittent reporting of behavior gave me the idea that perhaps an environment in an end users’ setup was incorrectly configured.

If anymore issues with websockets are found please let us know.

Cheers!


Related posts

Client Update v0.10.8

Client Update v0.10.4

Client Update v0.10.1

Client Update v0.10.0

HTTP Inspector

Client Update v0.9.19

Client Update v0.9.17