如何查看哪些 URL 被 Privoxy 阻止

for*_*rin 6 networking logs privoxy

我想查看 Privoxy 阻止了哪些 URL 的日志,但我在任何地方都找不到。

我的配置文件(/usr/local/var/log/privoxy/logfile)中的相关行如下:

confdir /usr/local/etc/privoxy
logdir /usr/local/var/log/privoxy
logfile logfile
Run Code Online (Sandbox Code Playgroud)

日志文件/usr/local/var/log/privoxy/logfile为空。

被阻止的 URL 是否记录在另一个文件中?或者如何打开被阻止 URL 的日志记录?

小智 10

根据http://www.privoxy.org/user-manual/config.html#LOGDIR,日志文件应该在/var/log/privoxy. 但是,您有/usr/local/var/log/privoxy/.

然后,日志文件捕获的详细信息取决于调试选项:

  debug     1 # Log the destination for each request Privoxy let through. See also debug 1024.
  debug     2 # show each connection status
  debug     4 # show I/O status
  debug     8 # show header parsing
  debug    16 # log all data written to the network
  debug    32 # debug force feature
  debug    64 # debug regular expression filters
  debug   128 # debug redirects
  debug   256 # debug GIF de-animation
  debug   512 # Common Log Format
  debug  1024 # Log the destination for requests Privoxy didn't let through, and the reason why.
  debug  2048 # CGI user interface
  debug  4096 # Startup banner and warnings.
  debug  8192 # Non-fatal errors
  debug 32768 # log all data read from the network
  debug 65536 # Log the applying actions
Run Code Online (Sandbox Code Playgroud)

启用debug1024 应该会给你你想要的。