| Age | Commit message (Collapse) | Author |
|
In case we needs to add another parameter, which will do later, the
argument will be too long.
Using parameters is acceptable only for 2 to 3 arguments.
|
|
In the ExecResponse, store the event in the Output instead of message
data, so the server can iterate the Output directly and pass it to
WriteEvent directly.
The event ID now start at 1 with type "begin".
This is to minimize confusion when comparing empty Last-Event-ID from
client, which is equal to 0.
|
|
The "awwan serve" command now can run based on socket activation under
systemd.
|
|
The fieldalignment and shadow is a linter from golang.org/x/tools.
This program actually have an API that can be used.
The pakakeh.go/lib/goanalysis wrap those APIs into a single function
call that can be run inside a main.
This minimize and simplified our tools dependencies.
|
|
|
|
The "share" project has been moved to SourceHut with new name
"pakakeh.go".
|
|
The HTTP API for stopping execution have the following signature,
DELETE /awwan/api/execute?id=<string>
If the ID is exist, the execution will be cancelled and return HTTP
status 200 with the following body,
Content-Type: application/json
{
"code": 200,
}
Otherwise it will return HTTP status 404 with error message.
References: https://todo.sr.ht/~shulhan/awwan/9
|
|
Better to fix and follow the reported warnings rather than adding
configuration file to add an exception.
|
|
Previously, if the command output is "line1\n\nline2\n", the web output
it as
line1
line2
it should be
line1
line2
This fix the empty line not displayed in wui output.
|
|
The new API is "GET /awwan/api/execute/tail" that implement Server-sent
events, not a normal GET request.
Its accept the query parameter "id" with value is the execution ID
from "/awwan/api/execute".
Once called with valid ID, it will streaming the command output
to client.
By using this new API, the WUI can receive the output of command
immediately without waiting for all commands to be completed.
Implements: https://todo.sr.ht/~shulhan/awwan/5
Signed-off-by: Shulhan <ms@kilabit.info>
|
|
Previously, the Execute endpoint wait for command execution to finish.
In case the command takes longer than proxy or server write timeout, it
will return with an timeout error to client.
In this changes, we generate an execution ID for each request and return
it immediately.
The next commit will implement HTTP endpoint to fetch the latest status
and/or output by execution ID.
References: https://todo.sr.ht/~shulhan/awwan/5
|
|
When user run "awwan serve", using web-user interface, any request to
fetch the content of "awwan.key" and "awwan.pass" should not allowed for
security reason, in case user want to serve awwan with others.
|
|
Similar to the CLI, the HTTP API accept the path of vault file
and return the path to decrypted file.
|
|
Similar to the CLI, the HTTP API accept the path of file and return the
path to encrypted file.
|