Skip to Content

nutshell 重生——不断否定、修改才能让知识真正成为技能

  • In /etc/passwd, the 3rd field indicates the number of days (since 1970-01-01) since last password change, empty indicates never and 0 forces user to change.

0.1 privoxy 用不上了(感谢V2Ray)

privoxy can turn socks proxy into http proxy.

0.1.1 example

privoxy is pretty useful when some program can’t use socks proxy, but still need to bypass GFW.

sudo vim /etc/privoxy/shadowsocks.config

user-manual /usr/share/doc/privoxy/user-manual
logfile logfile
listen-address  127.0.0.1:1081
listen-address  [::1]:1081
keep-alive-timeout 5
tolerate-pipelining 1
socket-timeout 300
forward-socks5 / 127.0.0.1:1080 .

sudo vim /etc/systemd/system/privoxy-ss.service

[Unit]
Description=Tranfrom socks5 proxy to http proxy using privoxy
Documentation=man:privoxy(8) 
Documentation=https://www.privoxy.org/user-manual/
After=network.target
Wants=haproxy-ss.service

[Service]
ExecStart=/usr/sbin/privoxy --no-daemon --pidfile /var/run/privoxy-ss.pid --user privoxy /etc/privoxy/shadowsocks.config 
ExecStopPost=/bin/rm -f /var/run/privoxy-ss.pid

[Install]
WantedBy=multi-user.target

0.1.2 other usage

  • listen-address can be retricted to the computer’s real IP 1.
  • forward-socks5 .github.com 127.0.0.1:1080 . can use shadowsocks only for certain domain and direct connect for others.

  1. I have used this feature to temporarily let other people inside NKU LAN break GFW.↩︎