在Mac上用polipo将socks5转换到http的代理

安装

brew install polipo

配置

基本配置

  • polipo配置文件
    vim ~/.polipo
socksParentProxy="127.0.0.1:1080"
socksProxyType="socks5"
proxyAddress="127.0.0.1"
proxyPort=8123

开机启动

  • polipo.plist 文件, 可以与下面的对比下.
    cat /usr/local/opt/polipo/homebrew.mxcl.polipo.plist



  
    Label
    homebrew.mxcl.polipo
    RunAtLoad
    
    KeepAlive
    
    ProgramArguments
    
      /usr/local/opt/polipo/bin/polipo
    
      socksParentProxy=localhost:1080
    
    
    SoftResourceLimits
    
      NumberOfFiles
      65536
    
  

  • 创建链接
    ln -sfv /usr/local/opt/polipo/*.plist ~/Library/LaunchAgents/
  • 加载
    launchctl load ~/Library/LaunchAgents/homebrew.mxcl.polipo.plist
  • 检查
    • ps -ef| grep polipo
    • telnet localhost 8123
[~]$ telnet localhost 8123                          *[master]
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host
[~/workspace/me/hue]$ cd ~/Library/LaunchAgents/                                                                                                                *[master]
[~/Library/LaunchAgents]$ ln -sfv /usr/local/opt/polipo/*.plist ~/Library/LaunchAgents/
/Users/user/Library/LaunchAgents//homebrew.mxcl.polipo.plist -> /usr/local/opt/polipo/homebrew.mxcl.polipo.plist
[~/Library/LaunchAgents]$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.polipo.plist
[~/Library/LaunchAgents]$ ps -ef| grep polipo
  501  7329     1   0  4:28下午 ??         0:00.01 /usr/local/opt/polipo/bin/polipo socksParentProxy=localhost:1080
  501  7337  3946   0  4:28下午 ttys001    0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn polipo

你可能感兴趣的:(在Mac上用polipo将socks5转换到http的代理)