3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

YosemiteにPolipoを導入する。

Last updated at Posted at 2015-07-15

##インストール。

brew install polipo

##cacheディレクトリを作成する。

mkdir ~/.polipo-cache

##config作成
vi ~/Dropbox/config/polipo/config

config
logFile = "~/polipo.log"
proxyAddress = "0.0.0.0"
allowedClients = "127.0.0.1
diskCacheRoot = "~/.polipo-cache/"
disableIndexing = false
disableServersList = false
dnsQueryIPv6 = no
#dnsNameServer = "[DNSサーバ]"
dnsUseGethostbyname = true
dontCacheRedirects = true
diskCacheUnlinkTime = 1d
logLevel = 0x1
scrubLogs = true
logSyslog = true
dnsMaxTimeout = 1s
dontCacheCookies = true
maxDiskEntries = 12
clientTimeout = 60s
serverTimeout = 60s
maxPipelineTrain = 16
serverSlots = 8
serverSlots1 = 16
serverMaxSlots = 512
pipelineAdditionalRequests = false

※dnsNameServerはDNSサーバが変わらないようなルータを通している場合などに指定すると良い。
私はテザリングに有線にとコロコロ変わるのでdnsUseGethostbynameを設定している。
serverSlots,serverSlots1,maxPipelineTrain
この三つはRFC違反になるのであまり数値を多くしないように
多すぎるとルータが死んでしまうかも

##自動起動設定ファイル作成
vi ~/LaunchAgent/org.dohq.polipo.plist

org.dohq.polipo.plist
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>KeepAlive</key>
        <dict>
            <key>SuccessfulExit</key>
            <false/>
        </dict>
        <key>Label</key>
        <string>org.dohq.polipo</string>
        <key>ProgramArguments</key>
        <array>
            <string>/usr/local/bin/polipo</string>
            <string>-c</string>
            <string>~/Dropbox/config/polipo/config</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
        <key>EnableGlobbing</key>
        <true/>
    </dict>
</plist>

##自動起動設定

launchctl load Library/LaunchAgents/org.dohq.polipo.plist

##動作確認
お疲れ様でした。
あとは普段ご使用のブラウザにlocalhost:8123を設定してHPを見られるか確認します。
また、なにか問題が出てPolipoを止めたい場合は

launchctl unload Library/LaunchAgents/org.dohq.polipo.plist

を実行して下さい。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?