|
|
@ -53,8 +53,9 @@ var (
|
|
|
|
ProxyUdpPortNotAllowed string = "udp_port_not_allowed"
|
|
|
|
ProxyUdpPortNotAllowed string = "udp_port_not_allowed"
|
|
|
|
ProxyUdpPortNormal string = "udp_port_normal"
|
|
|
|
ProxyUdpPortNormal string = "udp_port_normal"
|
|
|
|
ProxyUdpRandomPort string = "udp_random_port"
|
|
|
|
ProxyUdpRandomPort string = "udp_random_port"
|
|
|
|
|
|
|
|
ProxyHttpProxy string = "http_proxy"
|
|
|
|
|
|
|
|
|
|
|
|
ProxyHttpProxy string = "http_proxy"
|
|
|
|
ProxyRangeTcpPrefix string = "range_tcp"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
func init() {
|
|
|
@ -286,3 +287,15 @@ func TestPluginHttpProxy(t *testing.T) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func TestRangePortsMapping(t *testing.T) {
|
|
|
|
|
|
|
|
assert := assert.New(t)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for i := 0; i < 3; i++ {
|
|
|
|
|
|
|
|
name := fmt.Sprintf("%s_%d", ProxyRangeTcpPrefix, i)
|
|
|
|
|
|
|
|
status, err := getProxyStatus(name)
|
|
|
|
|
|
|
|
if assert.NoError(err) {
|
|
|
|
|
|
|
|
assert.Equal(client.ProxyStatusRunning, status.Status)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|