mirror of
https://github.com/fatedier/frp.git
synced 2026-06-30 06:11:59 -06:00
The ws/wss transport carries a raw byte stream (yamux), but the golang.org/x/net/websocket Conn defaults to text frames (PayloadType TextFrame). Per RFC 6455 §5.6 a text frame must contain valid UTF-8, so RFC-compliant intermediaries (API gateways / reverse proxies) validate the payload and close the connection when the binary tunnel data is not valid UTF-8. This goes unnoticed peer-to-peer because x/net/websocket does not validate UTF-8 on read, but it breaks the connection through a compliant validating proxy. Set PayloadType to BinaryFrame on both the server listener and the client dialer so the tunnel is framed as binary. |
||
|---|---|---|
| .. | ||
| conn.go | ||
| conn_test.go | ||
| dial.go | ||
| dns.go | ||
| http.go | ||
| kcp.go | ||
| listener.go | ||
| proxyprotocol.go | ||
| proxyprotocol_test.go | ||
| tls.go | ||
| udp.go | ||
| websocket.go | ||