[squid-users] Is jesred still compatible with squid 4.x?

Yuri Voinov yvoinov at gmail.com
Fri Feb 26 15:29:53 UTC 2016


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
 
#  TAG: url_rewrite_program
#    Specify the location of the executable URL rewriter to use.
#    Since they can perform almost any function there isn't one included.
#
#    For each requested URL, the rewriter will receive on line with the
format
#
#      [channel-ID <SP>] URL [<SP> extras]<NL>
#
#    See url_rewrite_extras on how to send "extras" with optional values to
#    the helper.
#    After processing the request the helper must reply using the
following format:
#
#      [channel-ID <SP>] result [<SP> kv-pairs]
#
#    The result code can be:
#
#      OK status=30N url="..."
#        Redirect the URL to the one supplied in 'url='.
#        'status=' is optional and contains the status code to send
#        the client in Squids HTTP response. It must be one of the
#        HTTP redirect status codes: 301, 302, 303, 307, 308.
#        When no status is given Squid will use 302.
#
#      OK rewrite-url="..."
#        Rewrite the URL to the one supplied in 'rewrite-url='.
#        The new URL is fetched directly by Squid and returned to
#        the client as the response to its request.
#
#      OK
#        When neither of url= and rewrite-url= are sent Squid does
#        not change the URL.
#
#      ERR
#        Do not change the URL.
#
#      BH
#        An internal error occurred in the helper, preventing
#        a result being identified. The 'message=' key name is
#        reserved for delivering a log message.
#
#
#    In addition to the above kv-pairs Squid also understands the following
#    optional kv-pairs received from URL rewriters:
#      clt_conn_tag=TAG
#        Associates a TAG with the client TCP connection.
#        The TAG is treated as a regular annotation but persists across
#        future requests on the client connection rather than just the
#        current request. A helper may update the TAG during subsequent
#        requests be returning a new kv-pair.
#
#    When using the concurrency= option the protocol is changed by
#    introducing a query channel tag in front of the request/response.
#    The query channel tag is a number between 0 and concurrency-1.
#    This value must be echoed back unchanged to Squid as the first part
#    of the response relating to its request.
#
#    WARNING: URL re-writing ability should be avoided whenever possible.
#         Use the URL redirect form of response instead.
#
#    Re-write creates a difference in the state held by the client
#    and server. Possibly causing confusion when the server response
#    contains snippets of its view state. Embeded URLs, response
#    and content Location headers, etc. are not re-written by this
#    interface.
#
#    By default, a URL rewriter is not used.
#Default:
# none


26.02.16 21:20, Karl-Philipp Richter пишет:
> Hi,
> I noticed that `jesred` when used as `url_rewrite_program` program of
> `squid` 4.0.4 with `jesred.rules`
>
>     regex ^http://(de.archive.ubuntu.com/ubuntu/(dists|pool)/.*)$
> http://192.168.178.20:3142/\1
>     regex ^http://(security.ubuntu.com/ubuntu/(dists|pool)/.*)$
> http://192.168.178.20:3142/\1
>     regex ^http://(extras.ubuntu.com/ubuntu/(dists|pool)/.*)$
> http://192.168.178.20:3142/\1
>     regex ^http://(archive.canonical.com/ubuntu/(dists|pool)/.*)$
> http://192.168.178.20:3142/\1
>
>     regex ^http://(packages.medibuntu.org/(dists|pool)/.*)$
> http://192.168.178.20:3142/\1
>     regex
>
^http://(ppa.launchpad.net/chromium-daily/stable/ubuntu/(dists|pool)/.*)$ http://192.168.178.20:3142/\1
>     regex ^http://(http://deb.opera.com/opera/(dists|pool)/.*)$
> http://192.168.178.20:3142/\1
>
> and an instance of `apt-cacher-ng` running on `192.168.178.20:3142`
> (according to `netstat`) causes a lot of entries like
>
>     1456494043|E|481|192.168.178.20|403 Forbidden file type or location:
>
/security.ubuntu.com/ubuntu/dists/wily-proposed/main/binary-i386/Packages.gz192.168.179.2/192.168.179.2-GET
>
> I'd like to get some feedback whether this might be due to a change in
> 4.x communication with `url_rewrite_program` and which is the
> recommended program to use for `url_rewrite_program`.
>
> -Kalle
>
>
>
> _______________________________________________
> squid-users mailing list
> squid-users at lists.squid-cache.org
> http://lists.squid-cache.org/listinfo/squid-users

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
 
iQEcBAEBCAAGBQJW0G9xAAoJENNXIZxhPexGQ18H/j/UiZskgyo7/BGbgaME5Wt2
vlk1zxqeETUEeeQOJBysGL5Ocjrr58v+uE98pYWjc9RMFIScRwS7ApGrl83ane83
oSy1V2nG6KdVcn73oK2jUO69Vi0KiunhWTBnWBDfRHH/HmYCPMIaWdqImPkQB8Mx
vKKmWDMAEl/ZmUaSQ+Wdu9Z+9tgrD/yKCOzeZ9RyPCeOujpWC07ODxo826IXx+6z
/DIYXYsbQU0lK8GolcxQUmJMh0vkmTsb9Ym/04dhrNDyQ/egfgmNwBxPM7RnDW+r
AHPMtWloR/LXie3bc38BNFGYXWBiBc0a55Uz0ndV6zTZ6jBvE3kFpUdWJGt5yO8=
=9T6M
-----END PGP SIGNATURE-----

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20160226/a18e36c4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0x613DEC46.asc
Type: application/pgp-keys
Size: 2437 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20160226/a18e36c4/attachment.key>


More information about the squid-users mailing list