feat: support independent tcp4, tcp6, udp4, udp6 connectivity check

This commit is contained in:
mzz2017
2023-02-08 20:15:24 +08:00
committed by mzz
parent 551e79d9e5
commit 5e7b68822a
26 changed files with 738 additions and 222 deletions

View File

@ -58,7 +58,7 @@ func (c *ControlPlane) handleConn(lConn net.Conn) (err error) {
if outboundIndex < 0 || int(outboundIndex) >= len(c.outbounds) {
return fmt.Errorf("outbound id from bpf is out of range: %v not in [0, %v]", outboundIndex, len(c.outbounds)-1)
}
dialer, err := outbound.Select()
dialer, err := outbound.Select(consts.L4ProtoStr_TCP, consts.IpVersionFromAddr(dst.Addr()))
if err != nil {
return fmt.Errorf("failed to select dialer from group %v: %w", outbound.Name, err)
}