fix: ip matching problem and add control plane direct

This commit is contained in:
mzz2017
2023-01-24 16:27:19 +08:00
parent 799cd006c0
commit 14b215752f
9 changed files with 63 additions and 47 deletions

View File

@ -37,11 +37,10 @@ func (c *ControlPlane) handleConn(lConn net.Conn) (err error) {
switch consts.OutboundIndex(value.Outbound) {
case consts.OutboundDirect:
case consts.OutboundControlPlaneRoute:
// FIXME: check and re-route.
case consts.OutboundControlPlaneDirect:
value.Outbound = uint8(consts.OutboundDirect)
c.log.Debugf("outbound: %v => %v",
consts.OutboundControlPlaneRoute.String(),
consts.OutboundControlPlaneDirect.String(),
consts.OutboundIndex(value.Outbound).String(),
)
default: