const CloseTimeout … var errConnTunnelClosed … var errConnCloseTimeout … type conn … var _ … // Write sends the data through the connection over proxy service func (c *conn) Write(data []byte) (n int, err error) { … } // Read receives data from the connection over proxy service func (c *conn) Read(b []byte) (n int, err error) { … } func (c *conn) LocalAddr() net.Addr { … } func (c *conn) RemoteAddr() net.Addr { … } func (c *conn) SetDeadline(t time.Time) error { … } func (c *conn) SetReadDeadline(t time.Time) error { … } func (c *conn) SetWriteDeadline(t time.Time) error { … } // Close closes the connection, sends best-effort close signal to proxy // service, and frees resources. func (c *conn) Close() error { … }