mirror of
https://github.com/fosrl/newt.git
synced 2026-03-09 07:12:28 -05:00
[PR #20] [MERGED] Cleanup & Updown Script #80
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/fosrl/newt/pull/20
Author: @oschwartz10612
Created: 3/10/2025
Status: ✅ Merged
Merged: 3/10/2025
Merged by: @oschwartz10612
Base:
main← Head:dev📝 Commits (5)
6f1d475Add updown script capabilities437d8b6Add documentation for updowndbc2a92Merge pull request #19 from fosrl/updowna19fc8cGo mod tidy72d264dAdd note about reference script📊 Changes
5 files changed (+187 additions, -22 deletions)
View changed files
📝
README.md(+16 -1)📝
go.mod(+8 -6)📝
go.sum(+2 -2)📝
main.go(+84 -13)➕
updown.py(+77 -0)📄 Description
Community Contribution License Agreement
By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.
Description
Add updown script to be called when adding or removing targets that can be used to manipulate targets.
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:8556python3 test.py remove tcp localhost:8556Returning a string from the script in the format of a target (
ip:dstso10.0.0.1:8080) it will override the target and use this value instead to proxy.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.