go-http-tunnel icon indicating copy to clipboard operation
go-http-tunnel copied to clipboard

Add WebSockets proxy

Open mmatczuk opened this issue 7 years ago • 10 comments

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

mmatczuk avatar Feb 21 '17 20:02 mmatczuk

(Y)

jenskastensson avatar Nov 22 '17 17:11 jenskastensson

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

hugows avatar Nov 23 '17 17:11 hugows

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.

dyu avatar Feb 27 '18 19:02 dyu

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

afiz avatar Apr 29 '18 08:04 afiz

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

david81 avatar Nov 06 '18 21:11 david81

@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.

AkeemMcLennon avatar Mar 23 '19 01:03 AkeemMcLennon

@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 avatar Apr 14 '19 23:04 Grabber

Over a tcp tunnel, websocket is working with go 1.12.4

Grabber avatar Apr 15 '19 16:04 Grabber

Over a tcp tunnel, websocket is working with go 1.12.4

@Grabber can you elaborate on what you did?

uri avatar May 29 '20 13:05 uri

@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

hons82 avatar Mar 26 '21 08:03 hons82