Prefer QUIC fabric endpoints
This commit is contained in:
@@ -2781,7 +2781,10 @@ func meshOutboundSessionReportFromState(cfg config.Config, meshState *syntheticM
|
||||
}
|
||||
|
||||
func meshEndpointReport(cfg config.Config, identity state.Identity, meshState *syntheticMeshState, observedAt time.Time, candidates []mesh.PeerEndpointCandidate) map[string]any {
|
||||
transport := cfg.MeshAdvertiseTransport
|
||||
transport := strings.TrimSpace(candidates[0].Transport)
|
||||
if transport == "" {
|
||||
transport = strings.TrimSpace(cfg.MeshAdvertiseTransport)
|
||||
}
|
||||
if transport == "" {
|
||||
transport = "direct_tcp_tls"
|
||||
}
|
||||
@@ -3842,6 +3845,20 @@ func advertisedEndpointCandidates(cfg config.Config, identity state.Identity, me
|
||||
Priority: 10,
|
||||
})
|
||||
}
|
||||
if cfg.MeshQUICFabricEnabled && meshState != nil && strings.TrimSpace(meshState.QUICFabricListenAddr) != "" {
|
||||
candidates = append(candidates, mesh.PeerEndpointCandidate{
|
||||
EndpointID: identity.NodeID + "-quic-fabric",
|
||||
NodeID: identity.NodeID,
|
||||
Transport: "direct_quic",
|
||||
Address: "quic://" + meshState.QUICFabricListenAddr,
|
||||
Reachability: reachabilityFromConnectivityMode(cfg.MeshConnectivityMode),
|
||||
NATType: cfg.MeshNATType,
|
||||
ConnectivityMode: cfg.MeshConnectivityMode,
|
||||
Region: cfg.MeshRegion,
|
||||
Priority: 5,
|
||||
PolicyTags: []string{"fast-path"},
|
||||
})
|
||||
}
|
||||
candidates = append(candidates, interfaceEndpointCandidates(cfg, identity, meshState, observedAt)...)
|
||||
for i := range candidates {
|
||||
if candidates[i].EndpointID == "" {
|
||||
|
||||
Reference in New Issue
Block a user