[GH-ISSUE #14] Add WebSockets proxy #2

Open
opened 2026-05-05 10:56:31 -06:00 by gitea-mirror · 10 comments
Owner

Originally created by @mmatczuk on GitHub (Feb 21, 2017).
Original GitHub issue: https://github.com/mmatczuk/go-http-tunnel/issues/14

If you think this is needed vote by adding 👍 thanks!

Originally created by @mmatczuk on GitHub (Feb 21, 2017). Original GitHub issue: https://github.com/mmatczuk/go-http-tunnel/issues/14 If you think this is needed vote by adding :+1: thanks!
Author
Owner

@jenskastensson commented on GitHub (Nov 22, 2017):

(Y)

<!-- gh-comment-id:346414974 --> @jenskastensson commented on GitHub (Nov 22, 2017): (Y)
Author
Owner

@hugows commented on GitHub (Nov 23, 2017):

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

<!-- gh-comment-id:346671500 --> @hugows commented on GitHub (Nov 23, 2017): @jenskastensson you have to click the smiley icon on the original comment by mmatczuk
Author
Owner

@dyu commented on GitHub (Feb 27, 2018):

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.

<!-- gh-comment-id:368992345 --> @dyu commented on GitHub (Feb 27, 2018): 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](https://github.com/fatedier/frp) and it works as well from my tests.
Author
Owner

@afiz commented on GitHub (Apr 29, 2018):

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

<!-- gh-comment-id:385235978 --> @afiz commented on GitHub (Apr 29, 2018): 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
Author
Owner

@david81 commented on GitHub (Nov 6, 2018):

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

<!-- gh-comment-id:436414129 --> @david81 commented on GitHub (Nov 6, 2018): Another vote for WSS support. Would love to use this for remote access to a Home Assistant instance
Author
Owner

@AkeemMcLennon commented on GitHub (Mar 23, 2019):

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

<!-- gh-comment-id:475829724 --> @AkeemMcLennon commented on GitHub (Mar 23, 2019): @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.
Author
Owner

@Grabber commented on GitHub (Apr 14, 2019):

@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

<!-- gh-comment-id:483068262 --> @Grabber commented on GitHub (Apr 14, 2019): @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
Author
Owner

@Grabber commented on GitHub (Apr 15, 2019):

Over a tcp tunnel, websocket is working with go 1.12.4

<!-- gh-comment-id:483332754 --> @Grabber commented on GitHub (Apr 15, 2019): Over a tcp tunnel, websocket is working with go 1.12.4
Author
Owner

@uri commented on GitHub (May 29, 2020):

Over a tcp tunnel, websocket is working with go 1.12.4

@Grabber can you elaborate on what you did?

<!-- gh-comment-id:635964450 --> @uri commented on GitHub (May 29, 2020): >Over a tcp tunnel, websocket is working with go 1.12.4 @Grabber can you elaborate on what you did?
Author
Owner

@hons82 commented on GitHub (Mar 26, 2021):

@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

<!-- gh-comment-id:808050067 --> @hons82 commented on GitHub (Mar 26, 2021): > @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](https://github.com/golang/go/issues/32763)
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/go-http-tunnel#2
No description provided.