goptlib doesn't allow optimistic SOCKS data
goptlib wraps its socket in a bufio.ReadWriter while processing the SOCKS handshake. Before returning the socket back to the application, it makes sure there is no unread data sitting in the buffer (which would otherwise be lost).
In #24432 (moved), we're trying to have Tor Browser use meek-client as a proxy directly, not going through Tor. The problem (comment:19:ticket:24432) is that Tor Browser has a special optimistic data SOCKS patch that causes it to send data exactly where goptlib checks to make sure there isn't any.
A mild rewrite of goptlib's SOCKS code could eliminate the internal buffer and enable Tor Browser's optimistic data.