实现websocket基本功能

This commit is contained in:
GoEdgeLab
2020-09-26 19:54:26 +08:00
parent fb786059b3
commit 6c79fb1d3f
6 changed files with 202 additions and 36 deletions

View File

@@ -0,0 +1,14 @@
package nodes
// 处理反向代理
func (this *HTTPRequest) doReverseProxy() {
// 判断是否为Websocket请求
if this.RawReq.Header.Get("Upgrade") == "websocket" {
this.doWebsocket()
return
}
// 普通HTTP请求
// TODO
}