Feature Request: Stats widget/window


#1

Hi there, I’m just getting back into using Tribler after a year and was curious about something. I would like to set up a bunch of exit nodes, and want to use RaspberriPi 4 running Ubuntu to do so.

How difficult would it be to create a widget-like window detached from the main application that can display network activity and token balance/mining data? What would be even more icing on the cake is if you can make it in a way that would scale well on a 264x176 E-ink display mounted to the case of said RPi ! That way when I or people I’m getting to use Tribler just walk past the device (perhaps mounted to a wall) they can tell “Yep, still working… 3 days uptime… yadda yadda”

Digging the new version so far, keep up the good work!


#2

Tribler communicates between the Core and the GUI using REST requests . You can actually run the GUI on a separate machine from the Core (though it is not documented), or write a simple utility to query JSON responses from the endpoints and visualise the data in whatever Web framework you like.


#3

Can you point to any of the existing dev docs or a list of those JSON queries that can help me play around with creating an applet like this for myself? Maybe if I polish it up enough I can submit it to you for future versions.

Thanks for the quick response!


#4

There is a pull request for Swagger generated docs that should be merged into devel today. As soon as it is merged, you can refer to Swagger for REST documentation. Note though, that this PR is not going to be merged in 7.5 branch, though the generated documentation still should be correct.
Also, you can refer to our REST tests for usage examples.


#5

Also, see https://tribler.readthedocs.io/en/devel/restapi/introduction.html#overview for a list of API endpoints.


#6

currently rest api is hard coded to localhost loopback interface, so to make it work listening interface should be either configurable or, hard coded to 0.0.0.0. Actually this was another PR :slight_smile:


#7

Hint: use SSH port forwarding, like ssh -L 8085:127.0.0.1:8085.