Jump to content

[DOCKER] Polipo


Recommended Posts

Looks good, nice work.

 

I think you win the prize for being the first person to start with a license file :)

 

Suggestions:

 

You can copy the default polipo distro specific congif using a first run such as https://github.com/needo37/nzbget/blob/master/firstrun.sh

That also allows you to use sed etc to tweak the default config if required (e.g. # diskCacheRoot = "~/.polipo-cache/")

 

Great suggestions, I will update and probably incorporate into my other dockers.

Link to comment

Looks good, nice work.

 

I think you win the prize for being the first person to start with a license file :)

 

Suggestions:

 

You can copy the default polipo distro specific congif using a first run such as https://github.com/needo37/nzbget/blob/master/firstrun.sh

That also allows you to use sed etc to tweak the default config if required (e.g. # diskCacheRoot = "~/.polipo-cache/")

 

Moved everything over and have some sed commands working. Only have one to allow remote connections.  Should I have any others in the default config?

 

EDIT: Set cache directory outside of docker.

Link to comment

Had a chance to look some more.

 

More ideas (Not worth doing PRs since they are all so trivial and up for debate anyway):

 

In https://github.com/smdion/docker-polipo/blob/master/firstrun.sh

 

mv /usr/share/doc/polipo/examples/config.sample /config/polipo.conf

 

This would be better as a copy action to maintain the sample file integrity (just in case).

 

In https://github.com/smdion/docker-polipo/blob/master/polipo.sh

 

If you set a "umask 000" you should end up with permissions like unRAID defaults (example: https://github.com/gfjardim/docker-nzbget/blob/master/nzbget.sh)

 

Not sure why you chose to set "daemonise=false". Unless you have a specific reason this should be set to true.

 

In https://github.com/smdion/docker-polipo/blob/master/README.md

 

Might be worth telling people polipo has a web interface at http://ip:port which shows the manual, stats, disk cache and config.

 

In /config/polipo.conf

 

allowedClients =

we can probably do something clever here by adding the unRAID host network in so at least no one can make a mistake and put it on the internet. Failing that we could add the IANA private IP ranges.

 

proxyName =

I think this is seen in one of the headers so we should make it a bit less default maybe?

 

# Uncomment this if you've got plenty of memory:

chunkHighMark = 50331648
objectHighMark = 16384

I usually uncomment this.

 

disableIndexing = false
disableServersList = false

I usually uncomment this.

 

censoredHeaders = from, accept-language
censorReferer = maybe

Definitely uncomment these.

 

serverExpireTime = 5d

I also add this since I use Polipo only for XBMC this means as long as each XBMC instance is turned on once every 5 days I never  grab art from the internet more than once.

 

Last point is you should really test more and commit less. I tried to follow your git commit log but essentially you have 60 identical commit comments of "Update firstrun.sh". If you test more and commit less you will find people help more as it becomes easy to follow diffs and their purpose.

 

Nice work I reckon this is almost production ready.

Link to comment
  • 3 weeks later...
  • 2 months later...

Had a chance to look some more.

 

More ideas (Not worth doing PRs since they are all so trivial and up for debate anyway):

 

In https://github.com/smdion/docker-polipo/blob/master/firstrun.sh

 

mv /usr/share/doc/polipo/examples/config.sample /config/polipo.conf

 

This would be better as a copy action to maintain the sample file integrity (just in case).

 

Changed

 

In https://github.com/smdion/docker-polipo/blob/master/polipo.sh

 

If you set a "umask 000" you should end up with permissions like unRAID defaults (example: https://github.com/gfjardim/docker-nzbget/blob/master/nzbget.sh)

 

Not sure why you chose to set "daemonise=false". Unless you have a specific reason this should be set to true.

 

I was borrowing from other dockers.  Removed daemonise-false and set umask

 

 

In https://github.com/smdion/docker-polipo/blob/master/README.md

 

Might be worth telling people polipo has a web interface at http://ip:port which shows the manual, stats, disk cache and config.

Added blurb on web interface

 

In /config/polipo.conf

 

allowedClients =

we can probably do something clever here by adding the unRAID host network in so at least no one can make a mistake and put it on the internet. Failing that we could add the IANA private IP ranges.

 

proxyName =

I think this is seen in one of the headers so we should make it a bit less default maybe?

 

# Uncomment this if you've got plenty of memory:

chunkHighMark = 50331648
objectHighMark = 16384

I usually uncomment this.

 

disableIndexing = false
disableServersList = false

I usually uncomment this.

 

censoredHeaders = from, accept-language
censorReferer = maybe

Definitely uncomment these.

 

serverExpireTime = 5d

I also add this since I use Polipo only for XBMC this means as long as each XBMC instance is turned on once every 5 days I never  grab art from the internet more than once.

added all.  Just did private IP ranged.  Not sure how to pull local subnet into it.

 

 

Last point is you should really test more and commit less. I tried to follow your git commit log but essentially you have 60 identical commit comments of "Update firstrun.sh". If you test more and commit less you will find people help more as it becomes easy to follow diffs and their purpose.

 

I don't like building on my production unRAID box. I guess I could install docker on my Mac.  Maybe just laziness using them to build ;)

Link to comment

I've just installed it and all looks good except for 502 errors if I try and use it to resolve local addresses. When I disable the ability to use th proxy for local, all works fine.

 

The default conf does not specify a local DNS server. I found this in the manual

 

If the internal DNS support is used, Polipo must be given a recursive name server to speak to. By default, this information is taken from the ‘/etc/resolv.conf’ file at startup; however, if you wish to use a different name server, you may set the variable dnsNameServer to an IP address9.

 

maybe add a where 0.0.0.0 is your Router/DNS

 

dnsNameServer = 0.0.0.0

Link to comment

I've just installed it and all looks good except for 502 errors if I try and use it to resolve local addresses. When I disable the ability to use th proxy for local, all works fine.

 

The default conf does not specify a local DNS server. I found this in the manual

 

If the internal DNS support is used, Polipo must be given a recursive name server to speak to. By default, this information is taken from the ‘/etc/resolv.conf’ file at startup; however, if you wish to use a different name server, you may set the variable dnsNameServer to an IP address9.

 

maybe add a where 0.0.0.0 is your Router/DNS

 

dnsNameServer = 0.0.0.0

 

Thanks. Giving it more thought I hve no good reason to use polipo to connect to local machines.

Link to comment

 

I keep on getting the following error

FATAL: Error loading the Perl module Digest::SHA1 needed for freedns update.
FATAL: On Debian, the package libdigest-sha1-perl must be installed.

 

Did you turn on any SSL or enable any other features?

 

Yes as it is required by my registrar.

 

Can you put the item that you changed, so I can test that and make sure that works?

 

Thanks!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...