upgrade to py3.14 and fedora 43
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -13,8 +13,8 @@ COPY ./frontend/ .
|
|||||||
RUN bun run build
|
RUN bun run build
|
||||||
|
|
||||||
# Base fedora container
|
# Base fedora container
|
||||||
FROM --platform=$TARGETARCH quay.io/fedora/fedora:42 AS base
|
FROM --platform=$TARGETARCH quay.io/fedora/fedora:43 AS base
|
||||||
RUN dnf -y update && dnf install -y python3.13 libnetfilter_queue \
|
RUN dnf -y update && dnf install -y python3.14 libnetfilter_queue \
|
||||||
libnfnetlink libmnl libcap-ng-utils nftables \
|
libnfnetlink libmnl libcap-ng-utils nftables \
|
||||||
vectorscan libtins python3-nftables libpcap && dnf clean all
|
vectorscan libtins python3-nftables libpcap && dnf clean all
|
||||||
|
|
||||||
@@ -23,13 +23,13 @@ WORKDIR /execute
|
|||||||
|
|
||||||
FROM --platform=$TARGETARCH base AS compiler
|
FROM --platform=$TARGETARCH base AS compiler
|
||||||
|
|
||||||
RUN dnf -y update && dnf install -y python3.13-devel @development-tools gcc-c++ \
|
RUN dnf -y update && dnf install -y python3.14-devel @development-tools gcc-c++ \
|
||||||
libnetfilter_queue-devel libnfnetlink-devel libmnl-devel \
|
libnetfilter_queue-devel libnfnetlink-devel libmnl-devel \
|
||||||
vectorscan-devel libtins-devel libpcap-devel boost-devel
|
vectorscan-devel libtins-devel libpcap-devel boost-devel
|
||||||
|
|
||||||
COPY ./backend/binsrc /execute/binsrc
|
COPY ./backend/binsrc /execute/binsrc
|
||||||
RUN g++ binsrc/nfregex.cpp -o cppregex -std=c++23 -O3 -lnetfilter_queue -pthread -lnfnetlink $(pkg-config --cflags --libs libtins libhs libmnl)
|
RUN g++ binsrc/nfregex.cpp -o cppregex -std=c++23 -O3 -lnetfilter_queue -pthread -lnfnetlink $(pkg-config --cflags --libs libtins libhs libmnl)
|
||||||
RUN g++ binsrc/nfproxy.cpp -o cpproxy -std=c++23 -O3 -lnetfilter_queue -lpython3.13 -pthread -lnfnetlink $(pkg-config --cflags --libs libtins libmnl python3)
|
RUN g++ binsrc/nfproxy.cpp -o cpproxy -std=c++23 -O3 -lnetfilter_queue -lpython3.14 -pthread -lnfnetlink $(pkg-config --cflags --libs libtins libmnl python3)
|
||||||
|
|
||||||
#Building main conteiner
|
#Building main conteiner
|
||||||
FROM --platform=$TARGETARCH base AS final
|
FROM --platform=$TARGETARCH base AS final
|
||||||
@@ -37,10 +37,10 @@ FROM --platform=$TARGETARCH base AS final
|
|||||||
COPY ./backend/requirements.txt /execute/requirements.txt
|
COPY ./backend/requirements.txt /execute/requirements.txt
|
||||||
COPY ./fgex-lib /execute/fgex-lib
|
COPY ./fgex-lib /execute/fgex-lib
|
||||||
|
|
||||||
RUN dnf -y update && dnf install -y gcc-c++ python3.13-devel uv git &&\
|
RUN dnf -y update && dnf install -y gcc-c++ python3.14-devel uv git &&\
|
||||||
uv pip install --no-cache --system ./fgex-lib &&\
|
uv pip install --no-cache --system ./fgex-lib &&\
|
||||||
uv pip install --no-cache --system -r /execute/requirements.txt &&\
|
uv pip install --no-cache --system -r /execute/requirements.txt &&\
|
||||||
uv cache clean && dnf remove -y gcc-c++ python3.13-devel uv git && dnf clean all
|
uv cache clean && dnf remove -y gcc-c++ python3.14-devel uv git && dnf clean all
|
||||||
|
|
||||||
COPY ./backend/ /execute/
|
COPY ./backend/ /execute/
|
||||||
COPY --from=compiler /execute/cppregex /execute/cpproxy /execute/modules/
|
COPY --from=compiler /execute/cppregex /execute/cpproxy /execute/modules/
|
||||||
|
|||||||
@@ -4,5 +4,5 @@ uvicorn[standard]
|
|||||||
psutil
|
psutil
|
||||||
python-jose[cryptography]
|
python-jose[cryptography]
|
||||||
python-socketio
|
python-socketio
|
||||||
git+https://github.com/google/brotli.git@35d4992ac8eb1eca3b6c5f220e76cfc8b7e470aa
|
git+https://github.com/google/brotli.git
|
||||||
#git+https://salsa.debian.org/pkg-netfilter-team/pkg-nftables#egg=nftables&subdirectory=py
|
#git+https://salsa.debian.org/pkg-netfilter-team/pkg-nftables#egg=nftables&subdirectory=py
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ from firegex.nfproxy.internals.exceptions import (
|
|||||||
from firegex.nfproxy.internals.models import FullStreamAction, ExceptionAction
|
from firegex.nfproxy.internals.models import FullStreamAction, ExceptionAction
|
||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
from collections import deque
|
from collections import deque
|
||||||
from zstd import ZSTD_uncompress
|
from compression import zstd
|
||||||
import gzip
|
import gzip
|
||||||
import io
|
import io
|
||||||
import zlib
|
import zlib
|
||||||
@@ -200,7 +200,7 @@ class InternalCallbackHandler:
|
|||||||
break
|
break
|
||||||
elif enc == "zstd":
|
elif enc == "zstd":
|
||||||
try:
|
try:
|
||||||
decoding_body = ZSTD_uncompress(decoding_body)
|
decoding_body = zstd.decompress(decoding_body)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error decompressing zstd: {e}: skipping", flush=True)
|
print(f"Error decompressing zstd: {e}: skipping", flush=True)
|
||||||
decode_success = False
|
decode_success = False
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ typer
|
|||||||
pydantic>=2
|
pydantic>=2
|
||||||
typing-extensions>=4.7.1
|
typing-extensions>=4.7.1
|
||||||
pycryptodome
|
pycryptodome
|
||||||
zstd
|
|
||||||
watchfiles
|
watchfiles
|
||||||
fgex
|
fgex
|
||||||
websockets
|
websockets
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ ERROR=0
|
|||||||
|
|
||||||
pip3 install -r requirements.txt
|
pip3 install -r requirements.txt
|
||||||
|
|
||||||
until curl --output /dev/null --silent --fail http://localhost:4444/api/status; do
|
until curl --output /dev/null --silent --fail http://127.0.0.1:4444/api/status; do
|
||||||
printf '.'
|
printf '.'
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user