test backend codec ndpi
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 1m40s
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 1m40s
This commit is contained in:
@@ -24,7 +24,8 @@ PYTHON_VERSION="3" # aktuelle Python 3 Version
|
||||
# -----------------------------
|
||||
echo "==> Update & Upgrade"
|
||||
apt update && apt upgrade -y
|
||||
apt install -y git curl build-essential nginx python3 python3-pip python3-venv unzip wget python3-dev libnetfilter-queue-dev libnfnetlink-dev libpcap-dev
|
||||
apt install -y git curl build-essential nginx python3 python3-pip python3-venv unzip wget python3-dev \
|
||||
libnetfilter-queue-dev libnfnetlink-dev libpcap-dev autoconf automake libtool pkg-config libjson-c-dev
|
||||
|
||||
# -----------------------------
|
||||
# Node.js installieren (LTS)
|
||||
@@ -61,6 +62,31 @@ cd "$BACKEND_DIR"
|
||||
python3 -m venv venv
|
||||
source venv/bin/activate
|
||||
pip install --upgrade pip
|
||||
|
||||
# -----------------------------
|
||||
# nDPI installieren (system lib + python bindings)
|
||||
# -----------------------------
|
||||
if ! ldconfig -p | grep -q "libndpi"; then
|
||||
echo "==> Build and install nDPI library"
|
||||
NDPIDIR="/tmp/nDPI"
|
||||
rm -rf "$NDPIDIR"
|
||||
git clone --depth 1 https://github.com/ntop/nDPI.git "$NDPIDIR"
|
||||
cd "$NDPIDIR"
|
||||
./autogen.sh
|
||||
./configure --prefix=/usr
|
||||
make -j"$(nproc)"
|
||||
make install
|
||||
ldconfig
|
||||
else
|
||||
echo "==> nDPI library already installed"
|
||||
fi
|
||||
|
||||
if [ -d "/tmp/nDPI/python" ]; then
|
||||
echo "==> Install nDPI Python bindings"
|
||||
pip install /tmp/nDPI/python
|
||||
fi
|
||||
|
||||
cd "$BACKEND_DIR"
|
||||
pip install -r requirements.txt
|
||||
deactivate
|
||||
|
||||
@@ -199,6 +225,9 @@ npm run build
|
||||
# Backend Dependencies
|
||||
cd $BACKEND_DIR
|
||||
source venv/bin/activate
|
||||
if [ -d "/tmp/nDPI/python" ]; then
|
||||
pip install /tmp/nDPI/python
|
||||
fi
|
||||
pip install -r requirements.txt
|
||||
deactivate
|
||||
|
||||
|
||||
Reference in New Issue
Block a user