[PR #20] [MERGED] Cleanup & Updown Script #80

Closed
opened 2025-11-19 07:13:27 -06:00 by GiteaMirror · 0 comments
Owner

📋 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: mainHead: dev


📝 Commits (5)

📊 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: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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fosrl/newt/pull/20 **Author:** [@oschwartz10612](https://github.com/oschwartz10612) **Created:** 3/10/2025 **Status:** ✅ Merged **Merged:** 3/10/2025 **Merged by:** [@oschwartz10612](https://github.com/oschwartz10612) **Base:** `main` ← **Head:** `dev` --- ### 📝 Commits (5) - [`6f1d475`](https://github.com/fosrl/newt/commit/6f1d4752f0770a82d43e66fbf1a2bb0ddca59d1f) Add updown script capabilities - [`437d8b6`](https://github.com/fosrl/newt/commit/437d8b67a4e88c5072a6a7ad0d10890e7b1abc72) Add documentation for updown - [`dbc2a92`](https://github.com/fosrl/newt/commit/dbc2a9245669a9817bf15cfc3826eb73fc7c0ba4) Merge pull request #19 from fosrl/updown - [`a19fc8c`](https://github.com/fosrl/newt/commit/a19fc8c58883087c81a39b5ba868e34eecbeedab) Go mod tidy - [`72d264d`](https://github.com/fosrl/newt/commit/72d264d427fb5673c6af462e943fc95fe6d08124) Add note about reference script ### 📊 Changes **5 files changed** (+187 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+16 -1) 📝 `go.mod` (+8 -6) 📝 `go.sum` (+2 -2) 📝 `main.go` (+84 -13) ➕ `updown.py` (+77 -0) </details> ### 📄 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: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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-19 07:13:27 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/newt#80