From dca8ae70dfe0041f44ca871f37f290499ca4a55b Mon Sep 17 00:00:00 2001 From: Basit Ali Ahmad <46881502+basitAliAhmad@users.noreply.github.com> Date: Wed, 13 May 2026 13:24:50 +0400 Subject: [PATCH 1/2] Fixed API versions according to requests originating from bruno client --- server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.py b/server.py index 4ba069e..8e7efd7 100644 --- a/server.py +++ b/server.py @@ -30,7 +30,7 @@ def _make_jwt_like(payload: dict) -> str: return f"{header_b64}.{payload_b64}.{signature_b64}" -@app.route("/api/v1/license/activate", methods=["POST"]) +@app.route("/api/v2/license/activate", methods=["POST"]) def activate_license(): """Handle license activation request.""" payload = request.get_json(silent=True) or {} @@ -101,7 +101,7 @@ def verify_activation_otp(activation_id: str): }), 200 -@app.route("/api/v1/license/verify", methods=["POST"]) +@app.route("/api/v2/license/verify", methods=["POST"]) def verify_license(): """Verify license token.""" payload = request.get_json(silent=True) or {} From b450fd09a451a7760a2bc5ecd2a362f44a7b42e4 Mon Sep 17 00:00:00 2001 From: Basit Ali Ahmad <46881502+basitAliAhmad@users.noreply.github.com> Date: Wed, 13 May 2026 13:25:18 +0400 Subject: [PATCH 2/2] Added support for docker. The server can run over docker --- .gitignore | 1 + Dockerfile | 20 ++++++++++++++++++++ README.md | 15 ++++++++++++++- 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 Dockerfile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f5e96db --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +venv \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..902ed4b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +# Use an official Python runtime as a parent image +FROM python:3.11.15-slim + +# Set the working directory inside the container +WORKDIR /app + +# Copy requirements file to image +COPY requirements.txt requirements.txt + +# Install any needed packages specified in requirements.txt +RUN pip install --no-cache-dir -r requirements.txt + +# Copy the rest of the application code into the container +COPY server.py server.py + +# Make port 5000 available to the world outside this container +EXPOSE 5000 + +# Run the application +CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:5000", "server:app"] diff --git a/README.md b/README.md index bd7749a..e441889 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This Flask-based server implements the license activation and verification endpo Clone the repository and install dependencies: ```bash git clone https://github.com/NohamR/BrunoServer.git && cd BrunoServer -pip install flask +pip install -r requirements.txt ``` ## Usage @@ -42,6 +42,19 @@ To use this license server with Bruno: - Default: `http://127.0.0.1:5000` 3. Use any license key for activation and any otp for verification. +#### Option 3: Run Your Own over Docker +1. Create docker image: +```bash +docker build -t bruno-server . +``` +2. Run docker image in container: +```bash +docker run -d --name bruno-server -p 5000:5000 bruno-server +``` +3. Use the option 'License Server' from activation and enter `http://localhost:5000` as License Server URL +4. Enter any text in License Key and Email. +5. When prompted for OTP, enter any text. Bruno Ultimate will be activated. + ## Legal Notice This software is provided for educational and development purposes only. The authors do not condone piracy or license violations.