From aa42f6ea1fed6a1564b1ab673fccace244f84433 Mon Sep 17 00:00:00 2001 From: Polarolouis Date: Wed, 14 Sep 2022 16:11:36 +0200 Subject: [PATCH 1/3] Filling the README Added an how to use and Upcoming features to the readme. --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index 7c4777e..7c0325a 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,30 @@ # miniupnp-script A script to use miniupnpc to setup port forwarding for a homeserver + +## How to use ? +Fill in the configuration file : `config.yaml`. An example config is provided as `config.example.yaml`. + +To declare a port forwarding use the following syntax: +```yaml +service-name: + internal_port: 1234 + external_port: 5678 + protocol: 'TCP' +``` + +Once the config is filled accordingly you can execute the script with +```bash +python3 port-forwarder.py +``` + +## Upcoming features +- Possibility to choose to activate one by one the services. Like: +``` +OPEN 1234 -> 5678 by TCP for service-name ? (y/N) +``` +- Possibilty to choose to close one by one the services. Like: +``` +CLOSE 1234 -> 5678 by TCP for service-name ? (y/N) +``` +- A `-y` to say yes to all +- Have a list of the UPnP forwarding opened by the script From 7b33f5ffaabf29bc2d282f6ab8be6d8706f50777 Mon Sep 17 00:00:00 2001 From: Polarolouis Date: Wed, 14 Sep 2022 16:12:49 +0200 Subject: [PATCH 2/3] Create requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..8c13c2d --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +miniupnpc From 073e183adffc76f75b9391ff9327f8c9041e5ca5 Mon Sep 17 00:00:00 2001 From: Polarolouis Date: Wed, 14 Sep 2022 16:15:51 +0200 Subject: [PATCH 3/3] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 7c0325a..c360e8a 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,12 @@ A script to use miniupnpc to setup port forwarding for a homeserver ## How to use ? + +Install the requirements by running: +```bash +pip install -r requirements.txt +``` + Fill in the configuration file : `config.yaml`. An example config is provided as `config.example.yaml`. To declare a port forwarding use the following syntax: