fix(ja4ebpf): split bpf2go generate into Ja4Tc + Ja4Ssl, fix RPM systemd-rpm-macros
- Use two separate //go:generate directives (Ja4Tc for tc_capture.c, Ja4Ssl
for uprobe_ssl.c) to avoid duplicate LICENSE symbol and multi-file clang issue
- Update loader.go to hold tcObjs/sslObjs separately with correct field names:
UprobeSslSetFd, UprobeSslReadEntry, UretprobeSslReadExit,
KprobeAccept4Entry, KretprobeAccept4Exit
- Add systemd-rpm-macros to all three RPM build stages (el8/el9/el10)
so that %{_unitdir} macro resolves correctly
- RPMs now build successfully for el8, el9, el10
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
56
tests/integration/nginx-varnish/platform/varnish.vcl
Normal file
56
tests/integration/nginx-varnish/platform/varnish.vcl
Normal file
@ -0,0 +1,56 @@
|
||||
vcl 4.1;
|
||||
# =============================================================================
|
||||
# varnish.vcl — Stack nginx + varnish
|
||||
# Varnish reçoit le trafic HTTP/1.1 depuis nginx (après terminaison TLS).
|
||||
# Il proxyfie vers le backend HTTP simple sur 127.0.0.1:8080.
|
||||
# =============================================================================
|
||||
|
||||
backend default {
|
||||
.host = "127.0.0.1";
|
||||
.port = "8080";
|
||||
.probe = {
|
||||
.url = "/health";
|
||||
.interval = 5s;
|
||||
.timeout = 2s;
|
||||
.window = 3;
|
||||
.threshold = 2;
|
||||
}
|
||||
}
|
||||
|
||||
sub vcl_recv {
|
||||
# Normalisation de l'URL (suppression du double slash)
|
||||
if (req.url ~ "//") {
|
||||
set req.url = regsuball(req.url, "//+", "/");
|
||||
}
|
||||
|
||||
# Transmission des en-têtes de provenance (déjà ajoutés par nginx)
|
||||
if (req.http.X-Forwarded-For) {
|
||||
set req.http.X-Forwarded-For = req.http.X-Forwarded-For;
|
||||
}
|
||||
|
||||
# Ne pas mettre en cache les requêtes POST/PUT/DELETE
|
||||
if (req.method != "GET" && req.method != "HEAD") {
|
||||
return (pass);
|
||||
}
|
||||
|
||||
# Cache les requêtes GET/HEAD
|
||||
return (hash);
|
||||
}
|
||||
|
||||
sub vcl_backend_response {
|
||||
# TTL de cache court pour les tests (évite les faux positifs)
|
||||
set beresp.ttl = 5s;
|
||||
set beresp.grace = 10s;
|
||||
}
|
||||
|
||||
sub vcl_deliver {
|
||||
# Ajout des en-têtes de debug Varnish (vérifiés par les tests)
|
||||
if (obj.hits > 0) {
|
||||
set resp.http.X-Cache = "HIT";
|
||||
} else {
|
||||
set resp.http.X-Cache = "MISS";
|
||||
}
|
||||
# X-Varnish est ajouté automatiquement par Varnish
|
||||
set resp.http.Via = "1.1 varnish (Varnish/test)";
|
||||
return (deliver);
|
||||
}
|
||||
Reference in New Issue
Block a user