Support configurable TLS probes in the API and dashboard
This commit is contained in:
1 parent
0bde5627f0
commit
c7fdd2c430
38 files changed
+495
-203
No files matched your search
@@ -14,10 +14,13 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
"slices"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"cloudipvalidator/internal/inbound"
|
||||
|
||||
"cloudipvalidator/internal/config"
|
||||
"cloudipvalidator/internal/db"
|
||||
"cloudipvalidator/internal/openstack"
|
||||
@@ -857,18 +860,16 @@ func (o *Orchestrator) expectedCheckCount(ctx context.Context) (int, error) {
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
inbound, err := o.DB.GetInboundChecks(ctx)
|
||||
settings, err := o.DB.GetInboundChecks(ctx)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
inboundPerSite := len(inbound.Ports)
|
||||
if inbound.ICMP {
|
||||
inboundPerSite := len(settings.Ports) + len(inbound.EffectiveTLSChecks(settings.Ports, settings.TLSChecks))
|
||||
if settings.ICMP {
|
||||
inboundPerSite++
|
||||
}
|
||||
for _, p := range inbound.Ports {
|
||||
if p == 443 || p == 22 {
|
||||
inboundPerSite++
|
||||
}
|
||||
if slices.Contains(settings.Ports, 22) {
|
||||
inboundPerSite++
|
||||
}
|
||||
return egress + inboundPerSite*len(sites), nil
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user