Your message dated Thu, 06 Nov 2008 21:02:09 +0000 with message-id <[EMAIL PROTECTED]> and subject line Bug#352140: fixed in apt-cacher 1.6.7 has caused the Debian Bug report #352140, regarding apt-cacher: transparent proxy support [patch] to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [EMAIL PROTECTED] immediately.) -- 352140: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=352140 Debian Bug Tracking System Contact [EMAIL PROTECTED] with problems
--- Begin Message ---Package: apt-cacher Version: 1.5 I've never really used apt-cacher since I don't want to have to edit my sources.list depending on whether I'm at home or not. Well I got bored last night and thought I'd have a go at adding transparent proxy support. I've only tested it under apache2 (not running as a daemon), but since it doesn't get the Host: header under apache2 I think that should be covered by this patch too (but is not tested). Caveat empor, but it works for me (tm). diffs (and new file) attached. Cheers, Adrian Bridgett--- apt-cacher.orig 2006-02-08 22:17:10.000000000 +0000 +++ apt-cacher 2006-02-09 23:44:28.000000000 +0000 @@ -528,6 +528,7 @@ my $send_head_only=0; # to be undef by new GET lines my $tolerated_empty_lines=20; my $rangereq; + my $hostheader=$ENV{SERVER_NAME}; # Host: request # reading input line by line, trough the secure input method CLIENTLINE: while(1) { @@ -542,6 +543,11 @@ if(/^$/) { if(defined($testpath)) { # done reading request + if ($$cfg{transparent_proxy} eq 1) + { + $testpath = "$hostheader/$testpath"; + writeerrorlog("APB: $testpath"); + } $path=$testpath; last CLIENTLINE; } @@ -577,6 +583,9 @@ elsif(/^If-Modified-Since:\s+(.*)/i) { $ifmosince=$1; } + elsif(/^Host:\s+(.*)/) { + $hostheader=$1; + } elsif(/^\S+: [^:]*/) { # whatever, but valid }--- apt-cacher-lib.pl.orig 2006-02-08 22:19:44.000000000 +0000 +++ apt-cacher-lib.pl 2006-02-09 23:12:39.000000000 +0000 @@ -26,7 +26,8 @@ allowed_hosts_6 => '*', allowed_hosts => '*', limit => 0, - daemon_port => 3142 + daemon_port => 3142, + transparent_proxy => 0, ); ($config_file) = @_;--- apt-cacher.conf.orig 2006-02-09 23:12:14.000000000 +0000 +++ apt-cacher.conf.new 2006-02-09 23:09:28.000000000 +0000 @@ -17,6 +17,10 @@ # daemon as root to use privileged ports (<1024). daemon_port=3142 +# Transparent proxy support - for use when redirecting using NAT rules +# see apt-cacher-generate-nat utility +transparent_proxy=1 + # optional settings, user and group to run the daemon as. Make sure they have # sufficient permissions on the cache and log directories. Comment the settings # to run apt-cacher as the native user.How to setup transparent proxying for apt-cacher ------------------------------------------------ This setup will allow you to use apt-cacher without altering your existing clients in any way. Very helpful for LUG meets or to just remove any barrier to using apt-cacher. Firstly you need to setup your webserver with a port based virtual host which will be dedicated to apt-cacher. For example I use this setup for Apache: Listen 81 <VirtualHost *:81> # trailing slash is _required_ (otherwise we have apt-cacher.pldebian) Alias / /usr/share/apt-cacher/apt-cacher.pl/ <DirectoryMatch /usr/share/apt-cacher/> Options ExecCGI AddHandler cgi-script .pl AllowOverride None order allow,deny allow from all </DirectoryMatch> </VirtualHost> Ensure "transparent_proxy" is set to 1 in /etc/apt-cacher/apt-cacher.conf Finally you need to alter your firewall to redirect to this webserver for every server you wish to transparently proxy: for host in ftp.de.debian.org security.debian.org; do iptables -t nat -A PREROUTING -i wlan0 -p tcp -d $host \ -j REDIRECT --to-ports 81 done The following snippet of code will print the hosts currently used in /etc/apt/sources.list: sed -n 's/^deb http:\/\/\([^/]*\).*/\1/ p' /etc/apt/sources.list
--- End Message ---
--- Begin Message ---Source: apt-cacher Source-Version: 1.6.7 We believe that the bug you reported is fixed in the latest version of apt-cacher, which is due to be installed in the Debian FTP archive: apt-cacher_1.6.7.dsc to pool/main/a/apt-cacher/apt-cacher_1.6.7.dsc apt-cacher_1.6.7.tar.gz to pool/main/a/apt-cacher/apt-cacher_1.6.7.tar.gz apt-cacher_1.6.7_all.deb to pool/main/a/apt-cacher/apt-cacher_1.6.7_all.deb A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to [EMAIL PROTECTED], and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Mark Hindley <[EMAIL PROTECTED]> (supplier of updated apt-cacher package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing [EMAIL PROTECTED]) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Format: 1.8 Date: Tue, 28 Oct 2008 23:51:13 +0000 Source: apt-cacher Binary: apt-cacher Architecture: source all Version: 1.6.7 Distribution: unstable Urgency: low Maintainer: Mark Hindley <[EMAIL PROTECTED]> Changed-By: Mark Hindley <[EMAIL PROTECTED]> Description: apt-cacher - Caching proxy for Debian package and source files Closes: 352140 472822 478068 482949 500855 501747 502480 Changes: apt-cacher (1.6.7) unstable; urgency=low . * libcurl: reduce select->can_read timeout to 0 to restore throughput (closes: #501747) * Document apt.conf config for apt-listbugs (closes: #500855) * Add transparent proxy support (closes: #352140) * Check return of sysread in getRequestLine. Prevents "400: No Request Received" errors (closes: #502480) * Keep and return index files if upstream temporarily unavailabe (closes: #478068) . apt-cacher (1.6.6) unstable; urgency=low . * Configurable file regexps (closes: #482949) * Handle missing libberkeleydb-perl gracefully (closes: #472822) * Ensure Content-Length headers are always returned. Checksums-Sha1: f95575a9937720d12e6fa23dbc017cd07e07229e 819 apt-cacher_1.6.7.dsc 31399d3dea9fc9bbb3f4c8a1f4d8326940c1d843 97954 apt-cacher_1.6.7.tar.gz b978146d097feef9e2ab814d8eb9d87908312625 78672 apt-cacher_1.6.7_all.deb Checksums-Sha256: e073ee1b290ad1ea9755d0a21563ff71b7a4a70eff7ca7321bb169fffaa10d72 819 apt-cacher_1.6.7.dsc b055dd47ece2532096623cfd1d458dd6b9595759b671027c71a565353af1a30c 97954 apt-cacher_1.6.7.tar.gz f38bc96edae57f0f7c4d761ef15f3390015549ced00547f6011f442e87564281 78672 apt-cacher_1.6.7_all.deb Files: 95b5448112b8ce9fd8941b17a6c66c29 819 net optional apt-cacher_1.6.7.dsc 8f821def6998cb4a630064baf504fde3 97954 net optional apt-cacher_1.6.7.tar.gz fe24dda454a6872fa5650874bf28f969 78672 net optional apt-cacher_1.6.7_all.deb -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iD8DBQFJE1fD4QZIHu3wCMURAvxrAJ9KWQZX1zE38IgJtfyj+tI6HqgTJwCeIuZv rFRfy483f/qUn6VWfjmedhk= =STGi -----END PGP SIGNATURE-----
--- End Message ---

