[ci skip] Add reverse proxy mode to f1-stream
Replace CPU-intensive headless Chrome + WebRTC pipeline with a lightweight Go reverse proxy that strips anti-framing headers (X-Frame-Options, CSP) and embeds streaming sites in iframes. - New internal/proxy package with URL rewriting for HTML/CSS - JS shim injection to intercept fetch/XHR/WebSocket/createElement - Referer reconstruction for correct cross-origin auth (HLS streams) - Inline iframe viewer preserving site navigation (not fullscreen overlay)
This commit is contained in:
parent
f7710b6067
commit
450dfc28e4
34 changed files with 6223 additions and 7 deletions
|
|
@ -1,4 +1,21 @@
|
|||
FROM nginx
|
||||
FROM golang:1.24-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o /f1-stream .
|
||||
|
||||
COPY . /usr/share/nginx/html
|
||||
EXPOSE 80
|
||||
FROM alpine:3.20
|
||||
RUN apk add --no-cache \
|
||||
ca-certificates \
|
||||
chromium nss freetype harfbuzz ttf-freefont \
|
||||
mesa-dri-gallium mesa-gl \
|
||||
dbus \
|
||||
xvfb-run xorg-server \
|
||||
pulseaudio pulseaudio-utils \
|
||||
ffmpeg
|
||||
ENV CHROME_PATH=/usr/bin/chromium-browser
|
||||
COPY --from=builder /f1-stream /f1-stream
|
||||
COPY static/ /static/
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["/f1-stream"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue