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:
55
tests/integration/hitch-varnish/platform/varnish.vcl
Normal file
55
tests/integration/hitch-varnish/platform/varnish.vcl
Normal file
@ -0,0 +1,55 @@
|
||||
vcl 4.1;
|
||||
# =============================================================================
|
||||
# varnish.vcl — Stack hitch + varnish
|
||||
# Varnish reçoit le trafic de hitch avec le PROXY protocol header.
|
||||
# accept_from est limité à 127.0.0.1 (hitch tourne en local).
|
||||
# =============================================================================
|
||||
|
||||
# Activation du PROXY protocol : Varnish récupère la vraie IP client depuis
|
||||
# le header PROXY envoyé par hitch.
|
||||
# (configuré via -a "...PROXY" dans la ligne de commande varnishd)
|
||||
|
||||
backend default {
|
||||
.host = "127.0.0.1";
|
||||
.port = "8080";
|
||||
.probe = {
|
||||
.url = "/health";
|
||||
.interval = 5s;
|
||||
.timeout = 2s;
|
||||
.window = 3;
|
||||
.threshold = 2;
|
||||
}
|
||||
}
|
||||
|
||||
sub vcl_recv {
|
||||
# Normalisation URL
|
||||
if (req.url ~ "//") {
|
||||
set req.url = regsuball(req.url, "//+", "/");
|
||||
}
|
||||
|
||||
# Ne pas cacher les mutations
|
||||
if (req.method != "GET" && req.method != "HEAD") {
|
||||
return (pass);
|
||||
}
|
||||
|
||||
return (hash);
|
||||
}
|
||||
|
||||
sub vcl_backend_response {
|
||||
set beresp.ttl = 5s;
|
||||
set beresp.grace = 10s;
|
||||
}
|
||||
|
||||
sub vcl_deliver {
|
||||
# En-têtes de debug pour les tests
|
||||
if (obj.hits > 0) {
|
||||
set resp.http.X-Cache = "HIT";
|
||||
} else {
|
||||
set resp.http.X-Cache = "MISS";
|
||||
}
|
||||
# Indique que Varnish a traité la requête (vérifiable dans les tests)
|
||||
set resp.http.Via = "1.1 varnish (Varnish/hitch-varnish-test)";
|
||||
# Expose l'IP client vue par Varnish (après PROXY protocol de hitch)
|
||||
set resp.http.X-Client-IP = client.ip;
|
||||
return (deliver);
|
||||
}
|
||||
Reference in New Issue
Block a user