Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this?
This PR is a preposed solution to the issues outlined here #228. It aims to add more customisation to the ports exposed when using the
-f
option.How does it work?
A new set of options (
--allow-config
and--allow-config-json
) have been added. These options load a JSON config object that gets converted into a series of ip table rules that get loaded before the firewall to exclude certain ports.Current state
This code had been tested in a docker env (which I can add to a separate PR if there is interest in that) that does not fully cover all of the code In this PR. More testing will be needed on this front if we do want to go forwards with this idea. Additionally we will likely want to add testing around this before merging
Let me know if this is set up ok as it is my first real Open Source PR 😄!
Any commentary on it would be of great help