I have done some work on opening a socket and waiting for a connection. This can be read line by line and I have started a request struct that it will accept. Also started on some docs. Not much is yet working. I am going to start learning µnit for unit tests: https://nemequ.github.io/munit/
28 lines
1.1 KiB
Markdown
28 lines
1.1 KiB
Markdown
# Plugins
|
|
|
|
**Note:** This is not implemented yet - it is mearly my plan.
|
|
|
|
The tool should be able to load plugins. These should be stand alone scripts /
|
|
executables that YAIP can call using `system()` or similar.
|
|
|
|
I will use a hook / filter type system. There will be different things that
|
|
plugins can do. The order in which plugins run will be dictated in the config
|
|
file or via an API if already running. The API still needs to be thought out.
|
|
|
|
## Intercept Plugins
|
|
|
|
Plugins will be able to intercept requests / responses. This will be blocking.
|
|
I haven't decided yet if these plugins will run on stdin or a temporary file.
|
|
|
|
I would prefer stdin / stdout although I think that would make it difficult for
|
|
a plugin to launch vim and have it be interactive. I'll have to do some trial
|
|
and error.
|
|
|
|
## Analysis Plugins
|
|
|
|
These plugins will hopefully be able to run asynchronously without intercepting
|
|
requests / responses. The idea for this is that the plugins could check for
|
|
misconfigured headers or sql statements or whatever. These won't be able to
|
|
change what the server / browser receives.
|
|
|
|
|