[vox-tech] HOWTO: use your domain search path with omsoft's proxy.
Ken Bloom
vox-tech@lists.lugod.org
Wed, 17 Mar 2004 13:20:40 -0800
--+HP7ph2BbKc20aGI
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
I wanted to be able to set my domain search path to ucdavis.edu and
type http://my/ for my.ucdavis.edu or http://sisweb/ for
sisweb.ucdavis.edu, and Omsoft's proxy wouldn't let me. (I actually
wanted to just type "my", and my web browsers will add on the http://
stuff for me)
I installed Squid on my computer last night, becuase another piece of
software I wanted required it, and I was able to take advantage of it
to solve that problem.
I added to /etc/squid.conf
redirect_program /usr/local/bin/squidrewrite
redirect_rewrites_host_header on
and in /usr/local/bin/squidrewrite, I put:
#!/usr/bin/perl
#inspired by the Squid 1.1 release notes
$|=3D1;
while (<>) {
s@http://([^./]*)/@http://\1.ucdavis.edu/@ unless /http...localhost/;
print;
}
The result works decently well (This still won't handle things like
http://wwwcsif.cs/). Now I just have to set all my web
browsers to use that proxy.
I run all my own servers because I trust nobody.
On that note, does anybody know of a free replacement for nntpcache
that they've gotten to work? I tried newscache but couldn't make it
work.
--=20
I usually have a GPG digital signature included as an attachment.
See http://www.gnupg.org/ for info about these digital signatures.
My key was last signed 10/14/2003. If you use GPG *please* see me about=20
signing the key. ***** My computer can't give you viruses by email. ***
--+HP7ph2BbKc20aGI
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAWMEolHapveKyytERAoRbAJ96OQPBCoKtSa7uU+pISMXslSak2wCfcUez
KjUFL2WW5HzFMIhVTWx5bxw=
=Mr5Q
-----END PGP SIGNATURE-----
--+HP7ph2BbKc20aGI--