diff -Naur squid-2.6.STABLE13/src/acl.c squid-2.6.STABLE13-pa/src/acl.c
--- squid-2.6.STABLE13/src/acl.c	2007-01-06 18:22:45.000000000 +0100
+++ squid-2.6.STABLE13-pa/src/acl.c	2009-04-02 12:05:40.000000000 +0200
@@ -1791,6 +1791,9 @@
 	return aclMatchIp(&ae->data, checklist->my_addr);
 	/* NOTREACHED */
     case ACL_DST_IP:
+    if (r->flags.transparent) {
+    	return aclMatchIp(&ae->data, r->my_addr);
+    }
 	ia = ipcache_gethostbyname(r->host, IP_LOOKUP_IF_MISS);
 	if (ia) {
 	    for (k = 0; k < (int) ia->count; k++) {
diff -Naur squid-2.6.STABLE13/src/client_side.c squid-2.6.STABLE13-pa/src/client_side.c
--- squid-2.6.STABLE13/src/client_side.c	2007-03-20 22:26:34.000000000 +0100
+++ squid-2.6.STABLE13-pa/src/client_side.c	2009-04-02 12:05:40.000000000 +0200
@@ -3641,6 +3641,7 @@
 	debug(33, 5) ("INTERNAL REWRITE: '%s'\n", http->uri);
     } else if (*url == '/' && conn->port->transparent) {
 	int port = 0;
+	int natted = 0;
 	const char *host = mime_get_header(req_hdr, "Host");
 	char *portstr;
 	if (host && (portstr = strchr(host, ':')) != NULL) {
@@ -3660,7 +3661,8 @@
 	    }
 #endif
 	}
-	if (!host && !conn->transparent && clientNatLookup(conn) == 0)
+	natted = clientNatLookup(conn);
+	if (!host && !conn->transparent && natted == 0)
 	    conn->transparent = 1;
 	if (!host && conn->transparent) {
 	    port = ntohs(conn->me.sin_port);
diff -Naur squid-2.6.STABLE13/src/forward.c squid-2.6.STABLE13-pa/src/forward.c
--- squid-2.6.STABLE13/src/forward.c	2007-04-17 11:35:17.000000000 +0200
+++ squid-2.6.STABLE13-pa/src/forward.c	2009-04-02 12:05:40.000000000 +0200
@@ -478,8 +478,13 @@
 	ctimeout = fs->peer->connect_timeout > 0 ? fs->peer->connect_timeout
 	    : Config.Timeout.peer_connect;
     } else {
-	host = name = fwdState->request->host;
-	port = fwdState->request->port;
+    	if (fwdState->request->flags.transparent) {
+			host = name = inet_ntoa(fwdState->request->my_addr);
+			port = fwdState->request->my_port;
+    	} else {
+			host = name = fwdState->request->host;
+			port = fwdState->request->port;
+		}
 	ctimeout = Config.Timeout.connect;
     }
     if (ftimeout < 0)
diff -Naur squid-2.6.STABLE13/src/http.c squid-2.6.STABLE13-pa/src/http.c
--- squid-2.6.STABLE13/src/http.c	2007-03-27 01:08:00.000000000 +0200
+++ squid-2.6.STABLE13-pa/src/http.c	2009-04-02 12:05:40.000000000 +0200
@@ -1318,7 +1318,7 @@
 	if (!EBIT_TEST(cc->mask, CC_MAX_AGE)) {
 	    const char *url = entry ? storeUrl(entry) : urlCanonical(orig_request);
 	    httpHdrCcSetMaxAge(cc, getMaxAge(url));
-	    if (strLen(request->urlpath))
+	    if (!request->flags.transparent && strLen(request->urlpath))
 		assert(strstr(url, strBuf(request->urlpath)));
 	}
 	/* Set no-cache if determined needed but not found */
@@ -1457,11 +1457,19 @@
     if (fwd->servers)
 	httpState->peer = fwd->servers->peer;	/* might be NULL */
     if (httpState->peer) {
-	const char *url;
+	const char *url, urlbuf[16384];
 	if (httpState->peer->options.originserver)
 	    url = strBuf(orig_req->urlpath);
-	else
-	    url = storeUrl(httpState->entry);
+	else {
+		if (orig_req->flags.transparent) {
+			snprintf(urlbuf, sizeof(urlbuf), "%s://%s:%d%s",
+			  "http", inet_ntoa(orig_req->my_addr), orig_req->my_port,
+			  strBuf(orig_req->urlpath));
+			url = urlbuf;
+		} else {
+		    url = storeUrl(httpState->entry);
+		}
+	}
 	proxy_req = requestCreate(orig_req->method,
 	    orig_req->protocol, url);
 	xstrncpy(proxy_req->host, httpState->peer->host, SQUIDHOSTNAMELEN);

