Skip to content

Instantly share code, notes, and snippets.

@hnuzhoulin
Forked from yangwe1/polipo_set_up.md
Created November 8, 2018 03:08
Show Gist options
  • Save hnuzhoulin/707500b4aa71a34e2b395d7ad64eea83 to your computer and use it in GitHub Desktop.
Save hnuzhoulin/707500b4aa71a34e2b395d7ad64eea83 to your computer and use it in GitHub Desktop.
my polipo conf file

openwrt,用于缓存服务器 其web控制界面位于http://192.168.1.1:8123/polipo/

# polipo daemon configuration
config 'polipo' 'daemon'
	# daemonise polipo (fork in background)
	option 'daemonise' '1'
	# where polipo will store its process pid
	option 'pidFile' '/var/run/polipo.pid'

config 'polipo' 'general'
	option 'enabled' '1'
	# adress on which polipo will listen, 0.0.0.0 means all addresses
	option 'proxyAddress' '0.0.0.0'
	# port on which polipo will listen, default is 8123
	#option 'proxyPort' '8123'
	# list of allowed clients to connect
	list 'allowedClients' '192.168.1.0/24'
	#list 'allowedClients' '127.0.0.1'
	#list 'allowedClients' '192.168.2.1'
	# how much RAM memory should Polipo use (in bytes).
	option 'chunkHighMark' '1048576'
	# enable disk cache index and serverlist of integrated polipo web interface
	#option 'disableIndexing' '0'
	#option 'disableServersList' '0'
	# disable loging to syslog 
	option 'logSyslog' '0'
	# set log file location (disabled when not set)
	option 'logFile' '/mnt/share/polipo/log'

config 'polipo' 'cache'
	# disk cache location, you should always use external storage device
	# (disabled when not set)
	option 'diskCacheRoot' '/mnt/share/polipo/cache'
	# disk cache cleanup settings
	option 'diskCacheUnlinkTime' '20d'
	option 'diskCacheTruncateTime' '5d'
	option 'diskCacheTruncateSize' '3145728'
	# set to 1 if proxy is used by multiple users
	option 'cacheIsShared' '1'

config 'polipo' 'pmm'
	# poor man's multiplexing semgnet size to fetch
	#option 'pmmSize' '8192'

ubuntu,用于将sslocal的socks5代理转换成http代理

# This file only needs to list configuration variables that deviate
# from the default values.  See /usr/share/doc/polipo/examples/config.sample
# and "polipo -v" for variables you can tweak and further information.

logSyslog = true
logFile = /var/log/polipo/polipo.log

proxyAddress = "0.0.0.0"
proxyPort = 3128
allowedClients = 127.0.0.1
allowedPorts = 1-65535
tunnelAllowedPorts = 1-65535
proxyName = "localhost"
cacheIsShared = false
socksParentProxy = "127.0.0.1:8400"
socksProxyType = socks5

然后将之用于下载Android SDK有奇效

阿里云上的ss client为避免被随便扫到,也可以用polipo将socks5代理转为http basic验证的http代理

proxyAddress = "0.0.0.0"
proxyPort = 8400
allowedPorts = 1-65535
tunnelAllowedPorts = 1-65535
proxyName = "localhost"
cacheIsShared = false
authCredentials = "user:1314"
socksParentProxy = "127.0.0.1:1080"
socksProxyType = socks5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment