| 349 | } |
| 350 | |
| 351 | func (p *Proxy) proxyLocalRequest(proxy ingress.HTTPLocalProxy, w connection.ResponseWriter, req *http.Request, isWebsocket bool) { |
| 352 | if isWebsocket { |
| 353 | // These headers are added since they are stripped off during an eyeball request to origintunneld, but they |
| 354 | // are required during the Handshake process of a WebSocket request. |
| 355 | req.Header.Set("Connection", "Upgrade") |
| 356 | req.Header.Set("Upgrade", "websocket") |
| 357 | req.Header.Set("Sec-Websocket-Version", "13") |
| 358 | } |
| 359 | proxy.ServeHTTP(w, req) |
| 360 | } |
| 361 | |
| 362 | type bidirectionalStream struct { |
| 363 | reader io.Reader |