Subject: http proxy (and STL help)
To: None <netbsd-help@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: netbsd-help
Date: 05/23/2002 11:18:51
I am looking for a simple HTTP proxy. I have looked at freshmeat and have
looked at a lot.

Basically, I want to be able to block URLs and content or only allow
certain URLs with a regex. I plan to use it for my son's web surfing.

I am looking at www_proxy from http://www.sashanet.com/.

It seems useful. It can log, spoof the user agent, and run a STDIN/STDOUT
filter, like:
/bin/sed -e 's/<SCRIPT.*SRC.*geocities.*>/<script language=javascript1.3>/g'
-e 's/<SCRIPT.*SRC.*adforce.*>/<script language=javascript1.3>/g'
-e 's/var urlOf/\\/\\//g'

Does anyone have any suggestions for a simple http proxy?

Now my STL question ...

First to use www_proxy, I installed and modified libtcp++ to include
<sys/types.h>.

But when I make www_proxy, I receive messages like:

/usr/include/g++/stl_relops.h: In function `bool operator !=(const T &,
const T
&)':
In file included from /usr/include/g++/stl_algobase.h:39,
                 from /usr/include/g++/vector:30,
                 from /usr/include/tcp++/tcp_ip_ruleset.h:9,
                 from /usr/include/tcp++/tcp_server.h:23,
                 from proxy.h:8,
                 from proxy.c:4:
/usr/include/g++/stl_relops.h:37: template with C linkage
/usr/include/g++/stl_relops.h: In function `bool operator >(const T &,
const T &
)':

...

/usr/include/g++/stl_bvector.h:497: template with C linkage
/usr/include/tcp++/tcp_ip_ruleset.h: At top level:
In file included from /usr/include/tcp++/tcp_server.h:23,
                 from proxy.h:8,
                 from proxy.c:4:
/usr/include/tcp++/tcp_ip_ruleset.h:90: declaration of C function `class
ostream
 & operator <<(class ostream &, class TcpIpRuleSet &)' conflicts with
/usr/include/tcp++/tcp_ip_ruleset.h:57: previous declaration `class
ostream & op
erator <<(class ostream &, struct TcpIpRule &)' here


I found this on the web, but I didn't find any answers. Do I need to
include some header?

I am using egcs-1.1.2 under NetBSD/i386 1.5.3_RC2.

Thanks,

   Jeremy C. Reed
   http://bsd.reedmedia.net/