Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i try to setup squid as a single top-level proxy, that give me access to i2p, tor(through privoxy) and some localhost resources. I`m using Gentoo and squid 3.2.13, if it is important. In this regard, I have a few questions:

  1. Why sites which go through privoxy are handled by localhost ACL? I mean when a say cache_peer_access cache_peer_privoxy deny localhost all sites are denied.
  2. How to configure squid, to handle i2p requests by i2p-router, requests to localhost( and localhost) run directly and all other requests handle by privoxy? (Now it almost works, i2p works fine, but I could not get the all localhost sites handeled by direct connection)

my squid config :

# Recommended minimum configuration:

# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
#acl localnet src    # RFC1918 possible internal network
#acl localnet src # RFC1918 possible internal network
acl localnet src # RFC1918 possible internal network
acl localnet src fc00::/7       # RFC 4193 local private network range
acl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) machines
acl i2phost dstdomain .i2p

acl SSL_ports port 443
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443         # https
acl Safe_ports port 70          # gopher
acl Safe_ports port 210         # wais
acl Safe_ports port 1025-65535  # unregistered ports
acl Safe_ports port 280         # http-mgmt
acl Safe_ports port 488         # gss-http
acl Safe_ports port 591         # filemaker
acl Safe_ports port 777         # multiling http
acl Safe_ports port 901         # SWAT
acl i2pconsole port 7657        # I2P

# Recommended minimum Access Permission configuration:
# Only allow cachemgr access from localhost
http_access allow localhost manager
http_access deny manager

# Deny requests to certain unsafe ports
http_access deny !Safe_ports

# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports

# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
#http_access deny to_localhost


# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
#http_access allow localnet
http_access allow localhost

# And finally deny all other access to this proxy
http_access deny all

# Squid normally listens to port 3128
http_port 3128

# Uncomment and adjust the following to add a disk cache directory.
cache_dir ufs /var/cache/squid 2048 16 256

# Leave coredumps in the first cache dir
coredump_dir /var/cache/squid

# Add any of your own refresh_pattern entries above these.
refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern -i (/cgi-bin/|\?) 0     0%      0
refresh_pattern .               0       20%     4320

# TAG: cache_peer
# I2P
cache_peer locali2p parent 4444 0 no-query
cache_peer localtor parent 8118 0 no-query

cache_peer_access locali2p allow i2phost
cache_peer_access locali2p deny all
cache_peer_access localtor deny i2pconsole
cache_peer_access localtor allow localhost
cache_peer_access localtor deny all
always_direct allow i2pconsole
always_direct deny all
never_direct allow all

# TAG: shutdown_lifetime time-units
# When SIGTERM or SIGHUP is received, the cache is put into
# "shutdown pending" mode until all active sockets are closed.
# This value is the lifetime to set for all open descriptors
# during shutdown mode. Any active clients after this many
# seconds will receive a 'timeout' message.
shutdown_lifetime 1 seconds

P.S. When i try to access to localhost:7657 i have "The requested URL could not be retrieved" from squid, but when i try to access it`s OK.

share|improve this question

You must log in to answer this question.

Browse other questions tagged .