GitHub mirror: Av0idD4rk/firegex
Go to file
2022-06-27 09:32:24 +02:00
backend Fixes, and made firegex responsive 2022-06-27 09:32:14 +02:00
config Update start_nginx.sh 2022-06-27 09:32:12 +02:00
frontend Fixes to Tooltip 2022-06-27 09:32:24 +02:00
.dockerignore Password Authentication 2022-06-27 09:31:39 +02:00
.gitignore Bug fixes and additional checks 2022-06-27 09:32:01 +02:00
Dockerfile Fix linux permissions 2022-06-27 09:32:11 +02:00
package-lock.json added tooltips and buttons 2022-06-27 09:32:13 +02:00
README.md Update README.md 2022-06-27 09:32:12 +02:00
start.py added #! /python3 in start.py 2022-06-27 09:32:11 +02:00

WORK IN PROGRESS

Firegex-API Documentation

This is a short description of the API

Documentation

Index

GET /api/general-stats

Server response:

{
    "services": <total number of services>,
    "closed": <total number of rejected packets>,
    "regex": <total number of regexes>
}

GET /api/services

Server response:

[
    {
        "id": <service_id>,
        "status": <service status>,
        "public_port": <public port>,
        "internal_port": <internal port>,
        "n_packets": <number of rejected packets>,
        "n_regex": <number of regexes>
    },
    {
        // Another service
    }
]

GET /api/service/<serv>

Server response:

{
    "id": <service_id>,
    "status": <service status>,
    "public_port": <public port>,
    "internal_port": <internal port>,
    "n_packets": <number of rejected packets>,
    "n_regex": <number of regexes>
}

GET /api/service/<serv>/stop

Server response:

{
    "status": "ok"
}

GET /api/service/<serv>/start

Server response:

{
    "status": "ok"
}

GET /api/service/<serv>/delete

Server response:

{
    "status": "ok"
}

GET /api/service/<serv>/pause

Server response:

{
    "status": "ok"
}

GET /api/service/<serv>/regen-port

Server response:

{
    "status": "ok"
}

GET /api/service/<serv>/regexes

Server response:

[
    {
        "id": <regex id>,
        "service_id": <service_id>,
        "regex": <base64 encoded regex>,
        "is_blacklist": <true|false>,
        "n_packets": <number of blocked packets>,
        "mode": <"C"|"S"|"B"> // Client to server, server to client or both
    },
    {
        // Another regex
    }
]

GET /api/regex/<regex_id>

Server response:

{
    "id": <regex id>,
    "service_id": <service_id>,
    "regex": <base64 encoded regex>,
    "is_blacklist": <true|false>,
    "n_packets": <number of blocked packets>,
    "mode": <"C"|"S"|"B"> // Client to server, server to client or both
}

GET /api/regex/<regex_id>/delete

Server response:

{
    "status": "ok"
}

POST /api/regexes/add

Client request:

{
    "service_id": <service_id>,
    "regex": <base64 encoded regex>,
    "is_blacklist": <true|false>,
    "mode": <"C"|"S"|"B"> // Client to server, server to client or both
}

Server response:

{
    "status": "ok"
}

POST /api/services/add

Client request:

{
    "name": <the id used to identify the service>,
    "port": <the internal port>
}

Server response:

{
    "status": "ok"
}