haugene / vpn-configs-contrib

A collection of configs for various VPN providers
GNU General Public License v3.0
172 stars 739 forks source link

Reduce update-port log spam #280

Closed Forage closed 3 months ago

Forage commented 3 months ago

Is there a pinned issue for this?

Is there an existing or similar issue for this?

Is there any comment in the documentation for this?

Is this related to the container/transmission?

Are you using the latest release?

Have you tried using the dev branch latest?

Config used

n/a

Current Behavior

The different update-log.sh scripts used for the different providers are great to have, but they produce quite a bit of log spam.

Take the following example for the openvpn/protonvpn/update-port.sh script for example. Six or more lines in less time than every minute, just for saying all remains as is. I realize docker containers have no way to log at different levels besides stdout and stderr, but do the stdout messages really add something if nothing has changed?

Expected Behavior

Only add a log message if something has changed or when an error occurred.

How have you tried to solve the problem?

n/a

Log output

...
/usr/bin/natpmpc
╭───────────────────────────╮
│ ProtonVPN Port Forwarding │
╰───────────────────────────╯
Wed Apr  3 10:10:18 UTC 2024
transmission auth not required
waiting for transmission to become responsive
transmission became responsive
setting transmission port to 61139
Waiting for port...
Port is open!
╭──────────────────────────────╮
│ The Forwarded Port is: 61139 │
╰──────────────────────────────╯
Wed Apr  3 10:11:05 UTC 2024
transmission auth not required
waiting for transmission to become responsive
transmission became responsive
No action needed, port hasn't changed
╭──────────────────────────────╮
│ The Forwarded Port is: 61139 │
╰──────────────────────────────╯
Wed Apr  3 10:11:41 UTC 2024
transmission auth not required
waiting for transmission to become responsive
transmission became responsive
No action needed, port hasn't changed
╭──────────────────────────────╮
│ The Forwarded Port is: 61139 │
╰──────────────────────────────╯
...

Environment

- OS: Ubuntu 23.10
- Docker: n/a
- Podman: 3.4.2

Anything else?

No response