安装privoxy之后,我启动了它,并在指示浏览器作为代理运行它之后,出现了一个错误,说明如下
"There is no Internet connection
There is something wrong with the proxy server, or the address is incorrect."公平地说,我决定检查日志文件并查看发生了什么,但是日志文件中绝对没有任何内容。
在检查配置文件时,我发现我有以下设置
...
logdir /var/log/privoxy
logfile logfile
debug 1 # Log the destination for each request Privoxy let through. See also debug 1024.
debug 1024 # Actions that are applied to all sites and maybe overruled later on.
debug 4096 # Startup banner and warnings
debug 8192 # Non-fatal errors
...好的,它说这应该是登录到/var/log/privoxy目录中的文件日志文件。我检查权限并找到
drwxr-xr-x 2 privoxy privoxy 4096 Jan 31 16:18 privoxy所以这不是权限问题。我已卸载和重新安装,但没有任何效果。我不知道为什么不起作用。这是登录到系统日志,但我不喜欢挖掘的东西。
就上下文而言,我运行的是Arch。
我发现如果我手动启动它
sudo privoxy --user privoxy --no-daemon /etc/privoxy/config它运行得很好。所以我认为这是一个系统问题。下面是默认的systemd文件
[Unit]
Description=Privoxy Web Proxy With Advanced Filtering Capabilities
After=network.target
[Service]
User=privoxy
Type=simple
ExecStart=/usr/bin/privoxy --no-daemon /etc/privoxy/config
PrivateDevices=yes
[Install]
WantedBy=multi-user.target发布于 2018-05-10 06:55:04
似乎是包装问题:https://bugs.archlinux.org/task/54570
看看:https://github.com/systemd/systemd/pull/7198
尝试这个systemd单元文件:
[Unit]
Description=Privoxy Web Proxy With Advanced Filtering Capabilities
After=network.target
[Service]
#User=privoxy
#Type=simple
#ExecStart=/usr/bin/privoxy --no-daemon /etc/privoxy/config
#PrivateDevices=yes
Type=forking
PIDFile=/var/run/privoxy.pid
ExecStart=/usr/bin/privoxy --pidfile /var/run/privoxy.pid --user privoxy.privoxy /etc/privoxy/config
ExecStop=/usr/bin/rm /var/run/privoxy.pid
SuccessExitStatus=15
StandardOutput=file:/var/log/privoxy/logfile
StandardError=file:/var/log/privoxy/logfile
[Install]
WantedBy=multi-user.targethttps://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/privoxy
https://unix.stackexchange.com/questions/421104
复制相似问题