mirror of
https://github.com/fatedier/frp.git
synced 2026-04-28 20:19:10 +08:00
tcp multiplexing over http connect tunnel
This commit is contained in:
@@ -212,6 +212,17 @@ func TestHttp(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestTcpMux(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
conn, err := gnet.DialTcpByProxy(fmt.Sprintf("http://%s:%d", "127.0.0.1", consts.TEST_TCP_MUX_FRP_PORT), "tunnel1")
|
||||
if assert.NoError(err) {
|
||||
res, err := util.SendTcpMsgByConn(conn, consts.TEST_TCP_ECHO_STR)
|
||||
assert.NoError(err)
|
||||
assert.Equal(consts.TEST_TCP_ECHO_STR, res)
|
||||
}
|
||||
}
|
||||
|
||||
func TestWebSocket(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user