aboutsummaryrefslogtreecommitdiff
path: root/run_request.go
AgeCommit message (Collapse)Author
2024-02-21all: add global HTTP headers for TargetShulhan
The Headers field on Target define the global headers that will be send along with all HTTPTarget or WebSocketTarget. The same header can also be defined on HTTPTarget that override the value of Target.
2024-02-16target: changes Opts to non-pointerShulhan
Previously, we use pointer to indicated that the Target can be attacked or not. Since HTTPTarget now have AllowAttack, this options can be changes to non-pointer.
2024-02-08all: allow submit free form request body in HTTPTargetShulhan
In HTTPTarget the field RawBody can be filled by anything by user. Those field can be activated by setting WithRawBody. Implements: https://todo.sr.ht/~shulhan/gorankusu/3
2024-02-07all: rename the project to gorankusuShulhan
The original idea of "trunks" is because the core library that we use for load testing is named "vegeta" (from Dragon Ball) [1][2], and Vegeta has a son named Trunks. In English, trunks also have multiple meanings. In order to have a unique name, we rename the project to "gorankusu", which is a combination of "go" (the main programming language that built the application) and "torankusu" the Hepburn of "Trunks". [1]: https://github.com/tsenart/vegeta/ [2]: https://en.wikipedia.org/wiki/Vegeta Implements: https://todo.sr.ht/~shulhan/gorankusu/2
2024-02-05all: implement form input fileShulhan
The FormInput now can be set to FormInputKindFile that will rendered as "<input type='file' ...>" on the web user interface. Once submitted, the file name, type, size, and lastModification will be stored under FormInput Filename, Filetype, Filesize, and Filemodms. Implements: https://todo.sr.ht/~shulhan/trunks/1
2024-02-05all: add type to customize how to dump HTTP request and responseShulhan
The HTTPRequestDumper define an handler to convert [http.Request] into [RunResponse] DumpRequest. The HTTPResponseDumper define an handler to convert [http.Response] into [RunResponse] DumpResponse.
2024-01-25all: fix warnings recommended by linter reviveShulhan
Most of the fixes related to naming variables with acronyms, for example HTTP, JSON, URL, and so on.
2024-01-25all: support parameter binding in HTTP PathShulhan
If HTTP Path contains key, for example "/:book", and the Params contains the same key, the Path will be filled with value from Params. The same key in Params will be deleted and not send on query parameter or body.
2022-08-21all: remove unused field Locker in RunRequestShulhan
2022-08-21all: fix all linter warningsShulhan
Some linter, govet, warns about possible copied Mutex on HttpRequest. To fix this we implement method clone and Stringer on HttpRequest.
2022-08-21all: reformat with Go 1.19 gofmtShulhan
2022-03-14all: changes the license of trunks software to GPL 3.0 or laterShulhan
See https://kilabit.info/journal/2022/gpl for more information.
2021-12-10all: realign all structsShulhan
Changes, * AttackResult storage size decreased -24 bytes * Environment storage size decreased -32 bytes * HttpTarget storage size decreased -24 bytes * RunRequest storage size decreased -32 bytes * RunResponse storage size decreased -8 bytes * Target storage size decreased -16 bytes * WebSocketTarget storage size decreased -8 bytes
2021-09-25all: prevent leaking Target and HttpTarget headers and variablesShulhan
In case two or more users access the Trunks web and set the target variables, the last user that run any HttpTarget will set the Target variables or HttpTarget headers/variables. The next user that open the Trunks web will see the values of headers and variables from the latest run. This changes fix this issue by generating new RunRequest using request original target
2021-09-06all: set the original HTTP target if IsCustomizable is trueShulhan
If the HTTP target IsCustomizable, user can set the request method, path, and/or request type. When user changes those values, the values should overwrite the configuration on server, so the Run method can use it for creating request.
2021-04-09all: reformat "if ... && ..." on RunRequestShulhan
2021-03-24all: implement target for WebSocketShulhan
One can register WebSocketTarget just like HttpTarget, its have ID, Name, Headers, and Params. Unlike HTTP, the WebSocket target only able to execute Run, it does not have "Attack", yet.
2021-03-21all: rename loadTestingResult to AttackResultShulhan
2021-03-21all: implement API and interface for attack functionalityShulhan
When the user click "Attack" it will call the API to run the load testing. If there is load testing currently, it will return with an error. On success, the result of load testing will be stored on directory defined in Environment.ResultsDir with file named <HttpTarget.ID>.<date_time>.<RPS>x<Duration>s.<ResultsSuffix>.bin This file contains the vegeta.Results.
2021-03-15trunks: a module for testing HTTP servicesShulhan
Trunks is a library and HTTP service that provide web user interface to test HTTP service, similar to Postman, and for load testing. For the load testing we use vegeta [1] as the backend. [1] https://github.com/tsenart/vegeta