golang go语言 反向 websocket 代理演示代码
通过go语言实现websocket反向代理功能
package main
import (
"fmt"
"github.com/fasthttp/websocket"
"github.com/valyala/fasthttp"
proxy "github.com/yeqown/fasthttp-reverse-proxy"
"log"
)
var upgraders = &websocket.FastHTTPUpgrader{
ReadBufferSize: 1024,
WriteBufferSize: 1024,
// 解决跨域问题
CheckOrigin: func(r *