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

@ -7,10 +7,10 @@ package control
import (
"fmt"
"github.com/cilium/ebpf"
"github.com/v2rayA/dae/common"
"github.com/v2rayA/dae/common/consts"
"github.com/v2rayA/dae/component/routing"
"github.com/cilium/ebpf"
"net/netip"
"strconv"
)
@ -88,6 +88,9 @@ func (b *RoutingMatcherBuilder) AddIp(values []netip.Prefix, outbound string) {
}
func (b *RoutingMatcherBuilder) AddFinal(outbound string) {
if b.err != nil {
return
}
b.Final = outbound
b.rules = append(b.rules, bpfRouting{
Type: uint8(consts.RoutingType_Final),