AtlatestRepositorysigil-http3
sigil-http3 / tree / scriptsphantom-continuous-punch-run.sh
1
#!/usr/bin/env bash2
set -euo pipefail3
cd "$(dirname "$0")/.."4
umask 0775
mkdir -p build6
node --check scripts/continuous-punch-window.mjs7
node --check scripts/punch-firewall.mjs8
timeout --foreground 15 node --test test/test-continuous-punch-window.mjs9
export HTTP3_CONTINUOUS_PUNCH_RUN=110
node scripts/prepare-punch-inputs.mjs11
export HTTP3_IPV6_ADDRESS12
HTTP3_IPV6_ADDRESS=$(node --input-type=module -e '13
import { networkInterfaces } from "node:os";14
const addresses = networkInterfaces()[process.env.HTTP3_INTERFACE]?.filter(a => a.family === "IPv6" && /^[23]/.test(a.address) && !a.internal);15
if (!addresses?.length) throw new Error("No assigned global IPv6");16
console.log(addresses[0].address);')17
export HTTP3_PREFLIGHT_SAN="IP:127.0.0.1,IP:::1,IP:$HTTP3_IPV6_ADDRESS,DNS:localhost"18
export HTTP3_PREFLIGHT_PREBUILT=1 HTTP3_PREFLIGHT_HTTPS_PAGE=1 HTTP3_PREFLIGHT_QUERY=119
export HTTP3_SPIKE_SDK_JOB=http3-example HTTP3_SPIKE_TRACE=1 HTTP3_SPIKE_TRACE_PROBE=120
HTTP3_PREFLIGHT_HOST=::1 bash scripts/phantom-browser-preflight.sh21
export HTTP3_SOURCE_REVISION22
HTTP3_SOURCE_REVISION=$(git rev-parse HEAD)23
exec node scripts/continuous-punch-window.mjs run