Compare commits

..

No commits in common. "779d5e9b18950c64a822a324fc3b38f500d31278" and "ca6b3d4eb2a5d2b4c3a5041287ba947653ac0fe9" have entirely different histories.

4 changed files with 15 additions and 15 deletions

View File

@ -60,8 +60,8 @@ You can find an example config structure in the [config.json](https://github.com
"url": "https://example.com",
"no_proxy_check": false,
"timeout": 2000,
"dodos": 10,
"requests": 1000,
"dodos_count": 10,
"request_count": 1000,
"params": {},
"headers": {},
"cookies": {},
@ -108,8 +108,8 @@ If the Headers, Params, Cookies and Body fields have multiple values, each reque
| Yes | - | --yes | -y | Boolean | Answer yes to all questions | false |
| URL | url | --url | -u | String | URL to send the request to | - |
| Method | method | --method | -m | String | HTTP method | GET |
| Requests | requests | --requests | -r | Integer | Total number of requests to send | 1000 |
| Dodos (Threads) | dodos | --dodos | -d | Integer | Number of dodos (threads) to send requests in parallel | 1 |
| Request count | request_count | --request-count | -r | Integer | Total number of requests to send | 1000 |
| Dodos count (Threads) | dodos_count | --dodos-count | -d | Integer | Number of dodos (threads) to send requests in parallel | 1 |
| Timeout | timeout | --timeout | -t | Integer | Timeout for canceling each request (milliseconds) | 10000 |
| No Proxy Check | no_proxy_check | --no-proxy-check| - | Boolean | Disable proxy check | false |
| Params | params | - | - | Key-Value {String: [String]} | Request parameters | - |

View File

@ -3,8 +3,8 @@
"url": "https://example.com",
"no_proxy_check": false,
"timeout": 10000,
"dodos": 1,
"requests": 1,
"dodos_count": 1,
"request_count": 1,
"params": {},
"headers": {},
"cookies": {},

View File

@ -12,7 +12,7 @@ import (
)
const (
VERSION string = "0.5.502"
VERSION string = "0.5.501"
DefaultUserAgent string = "Dodo/" + VERSION
ProxyCheckURL string = "https://www.google.com"
DefaultMethod string = "GET"
@ -107,8 +107,8 @@ type Config struct {
Method string `json:"method" validate:"http_method"` // custom validations: http_method
URL string `json:"url" validate:"http_url,required"`
Timeout uint32 `json:"timeout" validate:"gte=1,lte=100000"`
DodosCount uint `json:"dodos" validate:"gte=1"`
RequestCount uint `json:"requests" validation_name:"request-count" validate:"gte=1"`
DodosCount uint `json:"dodos_count" validate:"gte=1"`
RequestCount uint `json:"request_count" validation_name:"request-count" validate:"gte=1"`
NoProxyCheck Option[bool] `json:"no_proxy_check"`
}

View File

@ -28,9 +28,9 @@ Flags:
-h, --help help for dodo
-v, --version version for dodo
-c, --config-file string Path to the config file
-d, --dodos uint Number of dodos(threads) (default %d)
-d, --dodos-count uint Number of dodos(threads) (default %d)
-m, --method string HTTP Method (default %s)
-r, --request uint Number of total requests (default %d)
-r, --request-count uint Number of total requests (default %d)
-t, --timeout uint32 Timeout for each request in milliseconds (default %d)
-u, --url string URL for stress testing
--no-proxy-check bool Do not check for proxies (default false)
@ -74,10 +74,10 @@ func CLIConfigReader() (*config.CLIConfig, error) {
flag.StringVar(&url, "url", "", "URL to send the request")
flag.StringVar(&url, "u", "", "URL to send the request")
flag.UintVar(&dodosCount, "dodos", 0, "Number of dodos(threads)")
flag.UintVar(&dodosCount, "dodos-count", 0, "Number of dodos(threads)")
flag.UintVar(&dodosCount, "d", 0, "Number of dodos(threads)")
flag.UintVar(&requestsCount, "requests", 0, "Number of total requests")
flag.UintVar(&requestsCount, "requests-count", 0, "Number of total requests")
flag.UintVar(&requestsCount, "r", 0, "Number of total requests")
flag.UintVar(&timeout, "timeout", 0, "Timeout for each request in milliseconds")
@ -107,9 +107,9 @@ func CLIConfigReader() (*config.CLIConfig, error) {
cliConfig.Method = method
case "url", "u":
cliConfig.URL = url
case "dodos", "d":
case "dodos-count", "d":
cliConfig.DodosCount = dodosCount
case "requests", "r":
case "requests-count", "r":
cliConfig.RequestCount = requestsCount
case "timeout", "t":
var maxUint32 uint = 4294967295