抱歉,您的浏览器无法访问本站

本页面需要浏览器支持(启用)JavaScript


了解详情 >

blaire

👩🏻‍💻ブレア🥣

  1. first, you need to have vps
  2. second, you need to have shadowsocks app

<img src="/images/ops/ops-vpn-shadowsocks.png" width=“520” height=“300” align=“middle” /img>

install

1
brew install polipo

config

设置每次登陆启动polipo

1
ln -sfv /usr/local/opt/polipo/*.plist ~/Library/LaunchAgents

修改文件 /usr/local/opt/polipo/homebrew.mxcl.polipo.plist 设置parentProxy

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>homebrew.mxcl.polipo</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>/usr/local/opt/polipo/bin/polipo</string>
<string>socksParentProxy=localhost:1080</string>
</array>
<!-- Set `ulimit -n 20480`. The default OS X limit is 256, that's
not enough for Polipo (displays 'too many files open' errors).
It seems like you have no reason to lower this limit
(and unlikely will want to raise it). -->
<key>SoftResourceLimits</key>
<dict>
<key>NumberOfFiles</key>
<integer>20480</integer>
</dict>
</dict>
</plist>

修改的地方是增加了 <string>socksParentProxy=localhost:1080</string>

start / stop

1
2
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.polipo.plist
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.polipo.plist

setting profile

vim ~/.zshrc

1
2
#export http_proxy=http://localhost:8123
alias hp="http_proxy=http://localhost:8123"

source ~/.zshrc

test

1
2
➜ hp curl ip.cn
当前 IP:97.64.**.** 来自:美国

reference article

Comments