[dns-stats] added support for adguard installations inside GL.iNet routers #825
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR add support for retrieving DNS stats if
adguard home
is installed inside aGL.iNet
router since they don't use the common authentication system but instead set a route and put a cookie in front.GL.iNet used to have public APIs but recently they removed the documentation so some of I had to retrieve data by inspecting the traffic.
A new optional parameter is introduced in the configuration file:
glient-endpoint
if specified the widget will first login against that endpoint and then send the request to retrieve theadguard
stats as always.In this PR I also had to write a native md5crypt implementation since the core doesn't have it, if you want to use an external library instead let me know.
I tested this PR in my local environment and it works properly (tested against a Flint 3)