getanteon / ddosify-docker-extension

Ddosify Docker Extension - High-performance, simple-to-use load testing tool written in Golang
https://ddosify.com/
GNU Affero General Public License v3.0
28 stars 10 forks source link

Add config file support #1

Open fatihbaltaci opened 2 years ago

fatihbaltaci commented 2 years ago

Add config file support from Ddosify. Users should be able to import a config file on the Ddosify Docker extension. If a config file is imported, the other options like target URL, load types, etc. must be disabled.

MoskalykA commented 1 year ago

Hi, I would like to do this. Do I need to make a small button that opens the file explorer or just specify the access path in plain text?

fatihbaltaci commented 1 year ago

Hi @MoskalykA, a small button that opens the file explorer would be great.

I assigned this issue to you, thanks.

MoskalykA commented 1 year ago

Hi @MoskalykA, a small button that opens the file explorer would be great.

I assigned this issue to you, thanks.

I am setting the options according to the file however I don't understand how to set this up: https://github.com/ddosify/ddosify/blob/master/config_examples/config.json#L13

fatihbaltaci commented 1 year ago

Hi @MoskalykA, this the basic config file:

//ddosify_config.json
{
    "request_count": 20,
    "load_type": "linear",
    "duration": 5,
    "proxy": "http://proxy_host.com:proxy_port",
    "output": "stdout",
    "steps": [
        {
            "id": 1,
            "url": "https://test_site1.com/endpoint_1",
            "protocol": "https",
            "method": "POST",
            "headers": {
                "ContenType": "application/xml",
                "header1": "header2"
            },
            "payload": "Body content 1",
            "timeout": 3,
            "auth": {
                "username": "test_user",
                "password": "12345"
            }
        }
    ]
}

You will start ddosify with a -config option like this in this line:

ddosify -config config_examples/config.json

Once the user selects the config file, the other options like target URL, load types, etc. must be disabled or disappear.

If you have other questions, please let me know, thanks.