FredJul / Flym

Flym News Reader is a light Android feed reader (RSS/Atom)
Other
955 stars 405 forks source link

Option to monitor network traffic #665

Closed elsnosrap closed 3 years ago

elsnosrap commented 3 years ago

Add a preference to monitor all network traffic. If the preference is enabled, all network traffic will be logged via third-party library named "Chucker".

Chucker captures all network traffic and provides notifications when traffic occurs. Clicking on the notification allows all network calls to be viewed. This can be helpful when trying to debug connection issues.

@FredJul I'm not sure if you think this would be useful for all users, or perhaps it's a bit too "geeky" for people who don't fully understand HTTP response codes and whatnot. I'll understand if you don't think this is a good option to have for all users.

ildar commented 3 years ago

For "geeky" ways there are plenty of external tools from filtering pseudo VPNs to iptables. Why adding in-app ones?

FredJul commented 3 years ago

Hi, I believe such an option could be useful for some people and I would be OK to merge it, but as you say I believe most of user won't need it, so I only ask to create a new "Debug" category at the end of the settings screen for that option.

Also, I'm afraid of one thing that we should check before accepting this MR : does recreating the http client for each connection has a performance impact?

elsnosrap commented 3 years ago

Also, I'm afraid of one thing that we should check before accepting this MR : does recreating the http client for each connection has a performance impact?

The main issue I've seen is that network traffic may still get logged after turning the preference off.

@ildar I added this on my own fork as an easy way to see what errors were occurring. Occasionally some of my feeds wouldn't refresh and I'd just get the red text. With this in place, I can easily see the network errors in Chucker so I would know why I feed failed to refresh.

Given the potential performance issue combined with the fact that most people won't use this, perhaps I should instead look at a better way of reporting errors when they occur.

@FredJul I'll close this for now.