Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Napsty
Copy link

@Napsty Napsty commented Dec 15, 2022

This PR adds a very simple yet useful stats template with JSON output.
HTML formatting is not required for a pure JSON output.
The first curly brace is set "twice" on purpose, otherwise Tinyproxy itself thinks a variable needs to be parsed.

Works fine in my environment with version 1.10.0 on Debian Bullseye:

ck@linux:~# grep StatFile /etc/tinyproxy/tinyproxy.conf 
# StatFile: The HTML file that gets sent when a request is made
StatFile "/usr/share/tinyproxy/stats-json.html"

ck@linux:~# curl -H "Host: tinyproxy.stats" http://127.0.0.1:8888
{ "version":"1.10.0", "open":1, "requests":267, "bad":2, "denied":2, "refused":0 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant