0

以下错误是在docker 容器中启动Polipo并尝试连接到另一个容器中的Tor实例时:

polipo_1  | configFile /etc/polipo/config Configuration file.
polipo_1  | CHUNK_SIZE 8192 Unit of chunk memory allocation.
polipo_1  | allowUnalignedRangeRequests boolean false Allow unaligned range requests (unreliable).
polipo_1  | allowedClients list 127.0.0.1, 192.168.1.0/24, 172.17.0.0/24, 192.168.122.0/24 Networks from which clients are allowed to connect.
polipo_1  | allowedPorts intlist 80-100, 1024-65535 Ports to which connections are allowed.
polipo_1  | alwaysAddNoTransform boolean false If true, add a no-transform directive to all requests.
polipo_1  | authCredentials atom (hidden) username:password.
polipo_1  | authRealm atom (none) Authentication realm.
polipo_1  | bigBufferSize integer 32768 Size of big buffers (max size of headers).
polipo_1  | cacheIsShared boolean true If false, ignore s-maxage and private.
polipo_1  | censorReferer tristate false Censor referer headers.
polipo_1  | censoredHeaders list (empty list) Headers to censor.
polipo_1  | chunkCriticalMark integer 24772608 Critical mark for chunk memory (0 = auto).
polipo_1  | chunkHighMark integer 25165824 High mark for chunk memory.
polipo_1  | chunkLowMark integer 18874368 Low mark for chunk memory (0 = auto).
polipo_1  | clientTimeout time 2m Client-side timeout.
polipo_1  | daemonise boolean false Run as a daemon
polipo_1  | disableConfiguration boolean false Disable reconfiguring Polipo at runtime.
polipo_1  | disableIndexing boolean true Disable indexing of the local cache.
polipo_1  | disableLocalInterface boolean false Disable the local configuration pages.
polipo_1  | disableProxy boolean false Whether to be a web server only.
polipo_1  | disableServersList boolean true Disable the list of known servers.
polipo_1  | disableVia boolean true Don't use Via headers.
polipo_1  | diskCacheDirectoryPermissions integer 0700 Access rights for new directories.
polipo_1  | diskCacheFilePermissions integer 0600 Access rights for new cache files.
polipo_1  | diskCacheRoot atom /var/cache/polipo/ Root of the disk cache.
polipo_1  | diskCacheTruncateSize integer 1048576 Size to which on-disk objects are truncated.
polipo_1  | diskCacheTruncateTime time 4d12h Time after which on-disk objects are truncated.
polipo_1  | diskCacheUnlinkTime time 32d Time after which on-disk objects are removed.
polipo_1  | diskCacheWriteoutOnClose integer 65536 Number of bytes to write out eagerly.
polipo_1  | displayName atom Polipo Server name displayed on error pages.
polipo_1  | dnsGethostbynameTtl time 20m TTL for gethostbyname addresses.
polipo_1  | dnsMaxTimeout time 1m Max timeout for DNS queries.
polipo_1  | dnsNameServer atom 127.0.0.11 The name server to use.
polipo_1  | dnsNegativeTtl time 2m TTL for negative DNS replies with no TTL.
polipo_1  | dnsQueryIPv6 4-state happily Query for IPv6 addresses.
polipo_1  | dnsUseGethostbyname 4-state reluctantly Use the system resolver.
polipo_1  | dontCacheCookies boolean false Work around cachable cookies.
polipo_1  | dontCacheRedirects boolean false If true, don't cache redirects.
polipo_1  | dontTrustVaryETag tristate maybe Whether to trust the ETag when there's Vary.
polipo_1  | expectContinue tristate maybe Send Expect-Continue to servers.
polipo_1  | forbiddenFile atom (none) File specifying forbidden URLs.
polipo_1  | forbiddenRedirectCode integer 302 Redirect code, 301 or 302.
polipo_1  | forbiddenTunnelsFile atom (none) File specifying forbidden tunnels.
polipo_1  | forbiddenUrl atom (none) URL to which forbidden requests should be redirected.
polipo_1  | idleTime time 20s Time to remain idle before writing out.
polipo_1  | laxHttpParser boolean true Ignore unknown HTTP headers.
polipo_1  | localDocumentRoot atom /usr/share/polipo/www/ Root of the local tree.
polipo_1  | logFacility atom user Syslog facility to use.
polipo_1  | logFile atom /var/log/polipo/polipo.log Log file (stderr if empty and logSyslog is unset, /var/log/polipo if empty and daemonise is true).
polipo_1  | logFilePermissions integer 0640 Access rights of the logFile.
polipo_1  | logLevel integer 0x7 Logging level (max = 0xFF).
polipo_1  | logSyslog boolean true Log to syslog.
polipo_1  | maxAge time 14d1h Max age for objects without Expires header.
polipo_1  | maxAgeFraction float 0.100000 Fresh fraction of modification time.
polipo_1  | maxConnectionAge time 21m Maximum age of a server-side connection.
polipo_1  | maxConnectionRequests integer 400 Maximum number of requests on a server-side connection.
polipo_1  | maxDiskCacheEntrySize integer -1 Maximum size of objects cached on disk.
polipo_1  | maxDiskEntries integer 32 File descriptors used by the on-disk cache.
polipo_1  | maxExpiresAge time 30d1h Max age for objects with Expires header.
polipo_1  | maxNoModifiedAge time 23m Max age for objects without Last-modified.
polipo_1  | maxObjectsWhenIdle integer 32 Number of objects to write at a time when idle.
polipo_1  | maxPipelineTrain integer 10 Maximum number of requests pipelined at a time.
polipo_1  | maxSideBuffering integer 1500 Maximum buffering for PUT and POST requests.
polipo_1  | maxWriteoutWhenIdle integer 65536 Amount of data to write at a time when idle.
polipo_1  | mindlesslyCacheVary boolean false If true, mindlessly cache negotiated objects.
polipo_1  | objectHashTableSize integer 32768 Size of the object hash table (0 = auto).
polipo_1  | objectHighMark integer 2048 High object count mark.
polipo_1  | parentAuthCredentials atom (hidden) username:password.
polipo_1  | parentProxy atom (none) Parent proxy (host:port).
polipo_1  | pidFile atom (none) File with pid of running daemon.
polipo_1  | pipelineAdditionalRequests tristate maybe Pipeline requests on an active connection.
polipo_1  | pmmFirstSize integer 0 The size of the first PMM chunk.
polipo_1  | pmmSize integer 0 The size of a PMM chunk.
polipo_1  | preciseExpiry boolean false Whether to consider all files for purging.
polipo_1  | proxyAddress atom 0.0.0.0 The IP address on which the proxy listens.
polipo_1  | proxyName atom a06c33d71ea3 The name by which the proxy is known.
polipo_1  | proxyOffline boolean false Avoid contacting remote servers.
polipo_1  | proxyPort integer 8123 The TCP port on which the proxy listens.
polipo_1  | publicObjectLowMark integer 1024 Low object count mark (0 = auto).
polipo_1  | redirector atom (none) Squid-style redirector.
polipo_1  | redirectorRedirectCode integer 302 Redirect code to use with redirector.
polipo_1  | relaxTransparency tristate false Avoid contacting remote servers.
polipo_1  | replyUnpipelineSize integer 1048576 Size for a pipeline break.
polipo_1  | replyUnpipelineTime time 20s Estimated time for a pipeline break.
polipo_1  | scrubLogs boolean false If true, don't include URLs in logs.
polipo_1  | serverExpireTime time 1d Time during which server data is valid.
polipo_1  | serverIdleTimeout time 45s Server-side idle timeout.
polipo_1  | serverMaxSlots integer 8 Maximum number of connections per broken server.
polipo_1  | serverSlots integer 2 Maximum number of connections per server.
polipo_1  | serverSlots1 integer 4 Maximum number of connections per HTTP/1.0 server.
polipo_1  | serverTimeout time 1m30s Server-side timeout.
polipo_1  | smallRequestTime time 10s Estimated time for a small request.
polipo_1  | socksParentProxy atom tor:9050 SOCKS parent proxy (host:port)
polipo_1  | socksProxyType atom socks5 One of socks4a or socks5
polipo_1  | socksUserName atom (empty) SOCKS4a user name
polipo_1  | tunnelAllowedPorts intlist 22, 80, 109-110, 143, 443, 873, 993, 995, 2401, 5222-5223, 9418 Ports to which tunnelled connections are allowed.
polipo_1  | uncachableFile atom (none) File specifying uncachable URLs.

在那之后 Polipo 容器停止了!此外,docer-compose.yml文件是:

version: "3.8"

services:
  tor:
    build:
      context: ./tor
      dockerfile: Dockerfile
    volumes:
      - ./tor/tor.conf:/etc/tor/torrc
    ports:
      - 9050:9050

  polipo:
    build:
      context: ./polipo
      dockerfile: Dockerfile
    volumes:
      - ./polipo/polipo.conf:/etc/polipo/conf
    ports:
      - 8123:8123
    depends_on:
      - tor

Tor成功启动但Polipo没有启动的地方:

# docker-compose ps
     Name            Command       State                     Ports                  
------------------------------------------------------------------------------------
proxy_polipo_1   ./entrypoint.sh   Exit 0                                           
proxy_tor_1      tor               Up       0.0.0.0:9050->9050/tcp,:::9050->9050/tcp

Tor日志在哪里:

# docker-compose logs tor
tor_1     | Jan 20 12:17:08.000 [notice] Bootstrapped 89% (ap_handshake): Finishing handshake with a relay to build circuits
tor_1     | Jan 20 12:17:08.000 [notice] Bootstrapped 90% (ap_handshake_done): Handshake finished with a relay to build circuits
tor_1     | Jan 20 12:17:08.000 [notice] Bootstrapped 95% (circuit_create): Establishing a Tor circuit
tor_1     | Jan 20 12:17:08.000 [notice] Bootstrapped 100% (done): Done

配置文件polipo.conf如下:

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

allowedClients = 127.0.0.1, 192.168.1.0/24, 172.17.0.0/24, 192.168.122.0/24 # Expose your network (modify accordingly)
socksParentProxy = "tor:9050"
socksProxyType = socks5
proxyAddress = "0.0.0.0"    # IPv4 only

上面Polipo 的错误是什么以及如何解决?

4

0 回答 0