mmatczuk / go-http-tunnel

Fast and secure tunnels over HTTP/2
GNU Affero General Public License v3.0
3.2k stars 304 forks source link

Add WebSockets proxy #14

Open mmatczuk opened 7 years ago

mmatczuk commented 7 years ago

If you think this is needed vote by adding :+1: thanks!

jenskastensson commented 6 years ago

(Y)

hugows commented 6 years ago

@jenskastensson you have to click the smiley icon on the original comment by mmatczuk

dyu commented 6 years ago

I just tried this with the tcp protocol and it works. Any foreseeable problems with this approach? The other project that has native websockets proxy is frp and it works as well from my tests.

afiz commented 6 years ago

Any idea when the websocket can be supported? I test it just now, still not going through.

Dear dyu, i also tested 'frp', and websocket is working. But is it secured? I don't see any TLS words at its websites

david81 commented 5 years ago

Another vote for WSS support. Would love to use this for remote access to a Home Assistant instance

AkeemMcLennon commented 5 years ago

@mmatczuk httputil.ReverseProxy was updated in Go 1.12 to support websockets automatically. Theoretically you might be able to close this ticket for free by recompiling against go1.12. See https://github.com/golang/go/issues/26937

I haven't had a chance to test against your project in particular, but I've had success with other code that "just works" after upgrading. I stumbled across both github issues while doing some research, so I thought it might be useful to let you know.

Grabber commented 5 years ago

@mmatczuk and @AkeemMcLennon

go version go1.12.4 linux/amd64

2019/04/14 20:33:49 http: proxy error: can't switch protocols using non-Hijacker ResponseWriter type *http2.responseWriter

https://stackoverflow.com/questions/27075478/when-to-use-hijack-in-golang

Grabber commented 5 years ago

Over a tcp tunnel, websocket is working with go 1.12.4

uri commented 4 years ago

Over a tcp tunnel, websocket is working with go 1.12.4

@Grabber can you elaborate on what you did?

hons82 commented 3 years ago

@mmatczuk and @AkeemMcLennon

go version go1.12.4 linux/amd64

2019/04/14 20:33:49 http: proxy error: can't switch protocols using non-Hijacker ResponseWriter type *http2.responseWriter

https://stackoverflow.com/questions/27075478/when-to-use-hijack-in-golang

I'd still be interested in this feature.... Can anybody out there give me a hint on how that could be implemented? Or point me to a source to "copy"?

fyi #32763