zaneschepke/wgtunnel

[FEATURE] - Display graph of VPN usage

Opened this issue · 0 comments

Is your feature request related to a problem? Please describe.

Currently, there is no easy way to visualize the VPN usage data, which could be useful for both users and developers. Users may find it hard to track their internet usage through the VPN, and developers lack a quick way to identify potential issues or bottlenecks in the connection.

Describe the solution you'd like

Statistics are a powerful tool for both users and developer, specially if they can be shown in a easy to understand, compact graph view. Here's how they can help:

  • For developers: A visual representation of VPN data makes it easier to detect patterns, anomalies, or issues with the connection. It provides an immediate overview of how the VPN is performing, which can aid in troubleshooting.

  • For users: VPN statistics empower users by giving them control over their internet usage. They can track how much data is being used, see which apps consume the most bandwidth, and monitor connection speed and latency over time.

To achieve this, I propose adding a dedicated menu that displays VPN usage statistics in a graphical format. This could include, but is not limited to:

  • General median usage over a period of time.
  • Usage breakdown by application.
  • Median connection speed.
  • Latency trends.

Describe alternatives you've considered

  • Providing raw data logs, which are harder to interpret and less user-friendly

Possible Implementation

Some of the required statistics are already implemented, so the next step would be to persist this data over time. We can achieve this by setting up a background worker to periodically save the relevant VPN data into a user-space database. This will allow us to retain historical usage information and generate meaningful trends.

For visualizing the data, we can utilize the MPAndroidChart library to create the graphical representation of VPN statistics. This library is well known, therefore my suggest, but maybe someone can recommend something better for this propose.

To prevent the application from becoming bloated with too much data, we should implement a cleanup mechanism that periodically deletes older records. A reasonable approach would be to clean up the data every week, ensuring that the app remains lightweight while maintaining enough historical data for analysis.

Additional context

This feature would not only enrich the user experience but also enhance the overall value of the project by making VPN usage data more accessible and engaging. IMG-20240909-WA0003.jpg

IMG-20240909-WA0004.jpg