Open coreshift opened 3 years ago
I can add it. For now you could shell in the container and check iptables -nvL
which would show how many bytes went through the firewall. But anyway, that's a good idea, I'll add it as an http endpoint on the http control server. One day I'll make a UI too which should help out monitor that. There is also #131 such that you could receive mobile notifications, I'll keep this in mind such that you can set warning limits.
Thank you. Will the data persist across server reboots or container restarts? I'm sure it would make things more complicated if bw data has to be periodically stored to a data file or something. I tend to reboot or restart every few days.
Yes I can make it persistent to a file in /gluetun
relatively easily, good idea too.
For my future self, ~/proc/net/dev
seems to contain the data required. /proc/net/ip_vs_stats
also contains current network rates.~ It might be interesting also to export these as prometheus metrics.
EDIT: Everything can be found using for example
link := netlink.LinkByIndex(9)
fmt.Printf("%#v\n", link.Attrs().Statistics)
What's the feature? Ability to find out how much data has been sent/received through the vpn tunnel and keeping track of daily/monthly totals.
Why do you need this feature? Limited data plans from ISP
Extra information? Maybe there's already a way to find this out without adding a new feature?