mirror of
https://github.com/fosrl/newt.git
synced 2025-05-12 21:20:39 +01:00
Add documentation for updown
This commit is contained in:
parent
6f1d4752f0
commit
437d8b67a4
1 changed files with 14 additions and 1 deletions
15
README.md
15
README.md
|
@ -36,7 +36,8 @@ When Newt receives WireGuard control messages, it will use the information encod
|
|||
- `secret`: A unique secret (not shared and kept private) used to authenticate the client ID with the websocket in order to receive commands.
|
||||
- `dns`: DNS server to use to resolve the endpoint
|
||||
- `log-level` (optional): The log level to use. Default: INFO
|
||||
|
||||
- `updown` (optional): A script to be called when targets are added or removed.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
|
@ -92,6 +93,18 @@ WantedBy=multi-user.target
|
|||
|
||||
Make sure to `mv ./newt /usr/local/bin/newt`!
|
||||
|
||||
### Updown
|
||||
|
||||
You can pass in a updown script for Newt to call when it is adding or removing a target:
|
||||
|
||||
`--updown "python3 test.py"`
|
||||
|
||||
It will get called with args when a target is added:
|
||||
`python3 test.py add tcp localhost:8556`
|
||||
`python3 test.py remove tcp localhost:8556`
|
||||
|
||||
Returning a string from the script in the format of a target (`ip:dst` so `10.0.0.1:8080`) it will override the target and use this value instead to proxy.
|
||||
|
||||
## Build
|
||||
|
||||
### Container
|
||||
|
|
Loading…
Reference in a new issue