This commit is contained in:
fatedier
2019-01-31 16:49:23 +08:00
Unverified
parent c41de6fd28
commit 48990da22e
11 changed files with 29 additions and 30 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ import (
)
type HttpProxy struct {
BaseProxy
*BaseProxy
cfg *config.HttpProxyConf
closeFuncs []func()
+1 -1
View File
@@ -24,7 +24,7 @@ import (
)
type HttpsProxy struct {
BaseProxy
*BaseProxy
cfg *config.HttpsProxyConf
}
+6 -6
View File
@@ -135,33 +135,33 @@ func NewProxy(runId string, rc *controller.ResourceController, statsCollector st
case *config.TcpProxyConf:
basePxy.usedPortsNum = 1
pxy = &TcpProxy{
BaseProxy: basePxy,
BaseProxy: &basePxy,
cfg: cfg,
}
case *config.HttpProxyConf:
pxy = &HttpProxy{
BaseProxy: basePxy,
BaseProxy: &basePxy,
cfg: cfg,
}
case *config.HttpsProxyConf:
pxy = &HttpsProxy{
BaseProxy: basePxy,
BaseProxy: &basePxy,
cfg: cfg,
}
case *config.UdpProxyConf:
basePxy.usedPortsNum = 1
pxy = &UdpProxy{
BaseProxy: basePxy,
BaseProxy: &basePxy,
cfg: cfg,
}
case *config.StcpProxyConf:
pxy = &StcpProxy{
BaseProxy: basePxy,
BaseProxy: &basePxy,
cfg: cfg,
}
case *config.XtcpProxyConf:
pxy = &XtcpProxy{
BaseProxy: basePxy,
BaseProxy: &basePxy,
cfg: cfg,
}
default:
+1 -1
View File
@@ -19,7 +19,7 @@ import (
)
type StcpProxy struct {
BaseProxy
*BaseProxy
cfg *config.StcpProxyConf
}
+1 -1
View File
@@ -23,7 +23,7 @@ import (
)
type TcpProxy struct {
BaseProxy
*BaseProxy
cfg *config.TcpProxyConf
realPort int
+1 -1
View File
@@ -30,7 +30,7 @@ import (
)
type UdpProxy struct {
BaseProxy
*BaseProxy
cfg *config.UdpProxyConf
realPort int
+1 -1
View File
@@ -24,7 +24,7 @@ import (
)
type XtcpProxy struct {
BaseProxy
*BaseProxy
cfg *config.XtcpProxyConf
closeCh chan struct{}