mirror of
https://github.com/NohamR/BrunoServer.git
synced 2026-05-24 19:58:42 +00:00
Compare commits
3 Commits
08ec6b86d1
...
9153dcabd2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9153dcabd2 | ||
|
|
b450fd09a4 | ||
|
|
dca8ae70df |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
venv
|
||||
20
Dockerfile
Normal file
20
Dockerfile
Normal file
@@ -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"]
|
||||
15
README.md
15
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.
|
||||
|
||||
@@ -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 {}
|
||||
|
||||
Reference in New Issue
Block a user