| Age | Commit message (Collapse) | Author |
|
The idea is to allow developer who browse the repository to see the file
immediately.
The one in the doc/ directory now contains the symlink.
|
|
|
|
Instead of inside the index.html split the CSS so we can modify them
without touching the HTML.
|
|
|
|
|
|
|
|
This include updating the git submodule on pakakeh.ts.
|
|
=== Breaking changes
* all: refactoring form input for multipart form-data
This changes replace handling type for storing multipart form-data
from "map[string][]byte" to [*multipart.Form] based on changes on
module "pakakeh.go".
=== Enhancements
* all: make HTTP Target Params works along with WithRawBody
Previously, if WithRawBody is true, the Params will not be rendered
and parsed during Run. This changes makes the Params works along with
WithRawBody. If Params are set it will be rendered along with text area
for raw body.
* _www: support HTTP target with content type "text/html"
In the Target form, user can select to send body as "text/html".
* all: add git.sr.ht APIs into example
The APIs is created using https://man.sr.ht/git.sr.ht/api.md as
reference. We also needs the API to create webhook since no other way
to create it in current sourcehut web.
=== Bug fixes
* _www: fix save on null Headers and Vars
If the user does not define the Headers, clicking Run on any HTTP
Target will result in error when "save" function executed before it.
* _www: fix form input type file where content is binary
If the file in FormInput is binary, the conversion to
"FormInput.value" will fail with an error like "invalid characters in
String".
* all: use [route.Path] to generate parameters
Using [route.String] does not works if the parameter can be empty,
while [route.Path] replace all keys and return the path as is.
=== Chores
* all: add task to initialize the repository and tools
The task "init" include initializing git submodule, installing third
party tools for linters, and installing node packages.
|
|
|
|
Previously, if WithRawBody is true, the Params will not be rendered
and parsed during Run.
This changes makes them Params works along with WithRawBody.
If Params are set it will be rendered along with text area for raw body.
|
|
If the file in FormInput is binary, the conversion to "FormInput.value"
will fail with an error like "invalid characters in String".
|
|
If the user does not define the Headers, clicking Run ony any HTTP
Target will result in error when "save" function executed before it.
|
|
This release replace "share" module with "pakakeh.go".
The "share" module repository has been moved to SourceHut with new name
"pakakeh.go". For more information about the changes see pakakeh.go
project at https://sr.ht/~shulhan/pakakeh.go.
|
|
On the "lib/http" we refactoring RequestMethod and RequestType type
from int to string for readability, when the value is encoded, for
example to JSON.
So instead of 0, 1 or 2; it will print "GET", "CONNECT", or "HEAD".
|
|
=== Breaking changes
* target: changes Opts to non-pointer
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.
* all: change the signature of default request/response dumper
Instead of function that use the signature of HTTPRequestDumper/
HTTPResponseDumper; change it to function that return HTTPRequestDumper/
HTTPResponseDumper. In this way, the documentation can show the clear
relation between function and its type.
=== New features
* all: add global HTTP headers for Target
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.
* all: add default HTTPRunHandler
Previously, the default HTTPRunHandler is hidden, called dynamically
based on Run is nil or not. This changes make it exported as function
that return HTTPRunHandler to show how define and create a custom
HTTPRunHandler.
* all: add default HTTPParamsConverter for [HTTPTarget.ParamsConverter]
The DefaultParamsConverter define default function to convert
[HTTPTarget.Params] to its equivalent parameters in HTTP, either as
query in URL or as bytes in body.
This changes introduce breaking changes in HTTPTarget where field
ConvertParams renamed to ParamsConverter.
* all: set default HTTPTarget Attack if its not set
Previously, the function for Attack need to be coded manually.
This changes introduce new function DefaultHTTPAttack that generate
HTTPAttackHandler based on the HTTPTarget method, request type, and
Params; if AllowAttack is true and Attack is nil.
=== Bug fixes
* all: fix null navigation links
If the navLinks fields is empty, the HTTP API will return "null" and
cause the rendering error. This changes fix this issue by allocating
the slice navLinks with one capabilities to make JSON always return
"[]" if its empty.
|
|
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.
|
|
If the navLinks fields is empty, the HTTP API will return "null" and make
the rendering error.
This changes fix this issue by allocating the slice navLinks with one
capabilities to make JSON always return "[]" if its empty.
|
|
This release rename the project from "trunks" to "gorankusu".
The original idea of "trunks" is because the core library that we use
for load testing is named vegeta (from Dragon Ball), 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".
=== New features
* all: allow submit free form request body in HTTPTarget
* all: implement form input file
* all: add type to customize how to dump HTTP request and response
* all: support parameter binding in HTTP Path
=== Enhancements
* _www: check HTTP response status greater or equal 400
|
|
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
|
|
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
|
|
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
|
|
|
|
Any HTTP status code below 400 are still processable and not an error.
|
|
Most of the fixes related to naming variables with acronyms, for example
HTTP, JSON, URL, and so on.
|
|
This release only have chores, it should not break anything.
* go.mod: update all dependencies
This changes set minimum Go version to version 1.20.
The vegeta module finally has some update to v12.11.1.
* gitmodules: use https instead of git scheme
Using git scheme require private key to clone the remote repository.
* _www: update wui module
* _www: setup eslint for linting TypeScript files
This changes also apply all eslint recommendations.
* Makefile: replace the Go linter and apply all their recommendations
Previously, we use golangci-lint as linter. This linter does not
provides any useful recommendation lately and the development is quite
a mess, sometimes its break when using Go tip.
In this changes we replace it with revive, fieldalignment, and shadow;
and fix all of their recommendations.
|
|
|
|
|
|
While at it reformat all files using default prettier.
|
|
=== Bug fixes
* all: fix panic when attacking HTTP due to nil Attack handler
=== Enhancements
* _www: replace WebSocket handlers with HTTP endpoints
* all: add boolean Kind for FormInput, FormInputKindBoolean
* all: check and call ConvertParams when running HttpTarget
=== Chores
* all: move the _doc directory under _www
* all: convert the README from asciidoc to markdown
* all: remove WebSocket server
* go.mod: set Go version to 1.19 and update all dependencies
|
|
This is to minimize symlinks in the repository.
|
|
Using WebSocket for communication in client require additional
setup, especially if its behind proxy.
For example, if we server the trunks server under domain testing.local
behind proxy, we need to setup route for the WebSocket too.
|
|
The Attack and attack Cancel now call the HTTP endpoints.
|
|
The _doc directory provides an entry point for all documentation.
While at it we reformat the README to use AsciiDoc markup.
|
|
If the address is using "https:" protocol, the WebSocket address will
use the "wss://" schema.
This changes require latest update on wui repository.
|
|
See https://kilabit.info/journal/2022/gpl for more information.
|
|
The NavLink struct now has field OpenInIFrame. If its true, the Href
will be opened inside an iframe in the same window, otherwise it
will opened in new tab.
|
|
Using Trunks.RegisterNavLink, one can register custom link into
left navigation menu.
|
|
The returned value from WebSocketTarget's onClickRun() is already decoded
as object, so we did not need to convert and run JSON.parse with it.
|
|
In the commit edff37e3 and 264cb988, we store the user modified input
into local storage. This including Target options and variables,
HttpTarget headers and parameters, and WebSocket headers and parameters.
When the user interface refreshed, the stored variables is loaded into
input form but not saved into current Target/HttpTarget/WebSocketTarget
variables.
This changes fix this issue by loading the stored variables into
into current instance of Target/HttpTarget/WebSocketTarget variables.
|
|
The BaseURL should be only set once by server and read-only to client.
This is to prevent a malicious client attempt to attack non-predefined
target.
|
|
This changes split the Save function into several functions, in order
to help review and minimize wrong storage key on load and save.
|
|
Once the Attack button is clicked, the Target's attack options will
be stored to local storage. On the next refresh or opening the Trunks
web interface, the stored values will be loaded again.
|
|
When the attack finished, the WebSocket server will broadcast the
result to all clients as message "/_trunks/api/attack/result".
|
|
Setting the websocket listen address on environment require,
re-parsing address port on the web side to connect to the server.
In order to simplify creating connection on client, we set only the
websocket port in the environment.
|
|
Currently we are experimenting changing the layout for grouping input
fields from flat layout into fieldset, so user can see more separation
between each sub-section.
|
|
The WebSocket API replace the HTTP APIs for running and canceling
attack. Later, it will use to notify the result of attack.
|
|
Previously to developer and test trunks on local we need to run "tsc -w"
on directory _www to watch and recompile any changes to TypeScript files,
and run "go run ./cmd/trunks-example" to view the Trunks web interface.
Since we will have internal documentation inside _www/docs, we need
to run another ciigo server that watch any changes to .adoc files
and convert it to HTML.
Three separate commands for development.
This changes refactoring the development process by running two
goroutines when TRUNKS_DEV environment variable is set to non-empty.
One goroutine watch any changes to TypeScript, HTML, and
tsconfig files inside the _www, and when there is an update it will
execute "tsc -p" to recompile and "go run ./internal/generate-memfs" to
embed them into Go source.
Another goroutine watch any changes to .adoc files inside "_www/docs"
directory and convert them into HTML files.
This goroutine will running in the background while the HTTP server is
running too.
|
|
When user click "Run" button on any HttpTarget or WebSocketTarget,
the application will store each dynamic values of input in Target's
Variables, HttpTarget/WebSocketTarget Headers and Parameters into local
storage.
By storing the dynamic values of form input, different users can have
their own dynamic values and automatically loaded when they re-open
the Trunks website again.
|
|
In case the label is longer than 200px, break them by words.
|
|
Using em is hard to calculate between fixed menu on the left,
content, and header. Especially when there is an element that needs
width larger than parent width (the header of target).
|