Replace single-service-per-endpoint with all-ips mode running nginx, apache, and hitch+varnish simultaneously on 3 dedicated IPs per VM (eth1 alias IPs). Add a dedicated traffic VM with curl-impersonate for realistic TLS fingerprints, parallelized traffic generation, and paired SNI_HOSTS/TARGET_IPS lists for per-VM per-service hostname identification (e.g. rocky9-nginx-platform.test). Key changes: - run-tests-vm.sh: add setup_all_ips(), IP-specific Listen/bind directives with reset-before-apply pattern, graceful service availability checks - run-e2e-test.sh: traffic VM architecture, all-ips mode, eth1 network, paired IP/SNI lists, updated cleanup for alias IPs - generate-traffic.sh: parallel background jobs, curl-impersonate detection, auto source interface detection via ip route get, Host header in HTTP traffic - Vagrantfile: add traffic VM with provision-traffic.sh - provision-traffic.sh: install curl-impersonate and httpx for traffic gen - test-rpm.sh: multi-interface TC check, updated ja4ebpf config - clickhouse-init.sh: load CSV stubs for Anubis/bot-networks dictionaries - Remove obsolete correlator/sentinel/mod-reqin-log docs - Add h2_settings_ack column to http_logs schema - Upgrade Go toolchain to 1.25.0 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
52 lines
2.5 KiB
Bash
Executable File
52 lines
2.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# =============================================================================
|
|
# provision-traffic.sh — Provisionnement de la VM traffic (générateur de trafic)
|
|
#
|
|
# Installe :
|
|
# - curl-impersonate (TLS fingerprints Chrome/Firefox/Safari réalistes)
|
|
# - httpx[http2] + curl_cffi (trafic HTTP/2 Python)
|
|
# - curl standard (trafic HTTP port 80)
|
|
# =============================================================================
|
|
set -euo pipefail
|
|
|
|
log() { echo "[provision] $(date +%H:%M:%S) $*"; }
|
|
|
|
# ── 1. Mise à jour système ──────────────────────────────────────────────────
|
|
log "Mise à jour des dépôts..."
|
|
dnf install -y epel-release dnf-plugins-core
|
|
dnf update -y --quiet
|
|
|
|
# ── 2. curl + outils ──────────────────────────────────────────────────────
|
|
log "Installation curl et outils..."
|
|
dnf install -y curl python3 python3-pip
|
|
|
|
# ── 3. curl-impersonate (TLS fingerprints réalistes) ──────────────────────
|
|
log "Installation curl-impersonate..."
|
|
CURL_IMP_VERSION="0.6.1"
|
|
CURL_IMP_URL="https://github.com/lwthiker/curl-impersonate/releases/download/v${CURL_IMP_VERSION}/curl-impersonate-v${CURL_IMP_VERSION}.x86_64-linux-gnu.tar.gz"
|
|
|
|
cd /tmp
|
|
if curl -fsSL "$CURL_IMP_URL" -o /tmp/curl-impersonate.tar.gz 2>/dev/null; then
|
|
tar xzf /tmp/curl-impersonate.tar.gz
|
|
for bin in curl-impersonate-chrome curl-impersonate-firefox curl_chrome116 curl_ff125 curl-impersonate; do
|
|
if [ -f "$bin" ]; then
|
|
cp "$bin" /usr/local/bin/
|
|
chmod +x "/usr/local/bin/$bin"
|
|
fi
|
|
done
|
|
# Installer les shared libs pour curl-impersonate
|
|
mkdir -p /usr/local/lib/curl-impersonate
|
|
cp libcurl-impersonate* /usr/local/lib/curl-impersonate/ 2>/dev/null || true
|
|
ldconfig 2>/dev/null || true
|
|
rm -f /tmp/curl-impersonate.tar.gz
|
|
log "curl-impersonate installé : $(ls /usr/local/bin/curl-impersonate-* 2>/dev/null | wc -l) binaires"
|
|
else
|
|
log "WARN: curl-impersonate non disponible, fallback vers curl standard"
|
|
fi
|
|
|
|
# ── 4. httpx + curl_cffi (trafic HTTP/2 Python) ───────────────────────────
|
|
log "Installation httpx[http2] et curl_cffi..."
|
|
pip3 install --quiet "httpx[http2]" curl_cffi 2>/dev/null || \
|
|
pip3 install --quiet "httpx[http2]" 2>/dev/null || true
|
|
|
|
log "Provisionnement traffic terminé !" |