Update tests to support rewrite
This commit is contained in:
parent
5c3b438863
commit
a36bad8bcf
@ -126,13 +126,11 @@ custom_domains = test6.frp.com
|
||||
host_header_rewrite = test6.frp.com
|
||||
header_X-From-Where = frp
|
||||
|
||||
[tcpmultiplexing]
|
||||
type = tcp
|
||||
# Unused
|
||||
remote_port = 0
|
||||
[tcphttptunnel1]
|
||||
type = tcphttptunnel
|
||||
local_ip = 127.0.0.1
|
||||
local_port = 10701
|
||||
custom_domains = tcpmulti1
|
||||
custom_domains = tunnel1
|
||||
|
||||
[wildcard_http]
|
||||
type = http
|
||||
|
@ -2,7 +2,7 @@
|
||||
bind_addr = 0.0.0.0
|
||||
bind_port = 10700
|
||||
vhost_http_port = 10804
|
||||
vhost_tcp_port = 10806
|
||||
tcp_http_tunnel_port = 10806
|
||||
log_level = trace
|
||||
token = 123456
|
||||
allow_ports = 10000-20000,20002,30000-50000
|
||||
|
@ -212,10 +212,10 @@ func TestHttp(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestTcpMultiplexing(t *testing.T) {
|
||||
func TestTcpHttpTunnel(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
conn, err := gnet.DialTcpByProxy(fmt.Sprintf("http://%s:%d", "127.0.0.1", consts.TEST_TCP_VHOST_FRP_PORT), "tcpmulti1")
|
||||
conn, err := gnet.DialTcpByProxy(fmt.Sprintf("http://%s:%d", "127.0.0.1", consts.TEST_TCP_HTTP_TUNNEL_FRP_PORT), "tunnel1")
|
||||
if assert.NoError(err) {
|
||||
res, err := util.SendTcpMsgByConn(conn, consts.TEST_TCP_ECHO_STR)
|
||||
assert.NoError(err)
|
||||
|
@ -40,7 +40,7 @@ var (
|
||||
TEST_HTTP_FOO_STR string = "http foo string: " + TEST_STR
|
||||
TEST_HTTP_BAR_STR string = "http bar string: " + TEST_STR
|
||||
|
||||
TEST_TCP_VHOST_FRP_PORT int = 10806
|
||||
TEST_TCP_HTTP_TUNNEL_FRP_PORT int = 10806
|
||||
|
||||
TEST_STCP_FRP_PORT int = 10805
|
||||
TEST_STCP_EC_FRP_PORT int = 10905
|
||||
|
Loading…
Reference in New Issue
Block a user