[spambayes-bugs] [ spambayes-Bugs-970859 ] Transparent proxying support?

SourceForge.net noreply at sourceforge.net
Thu Jun 10 23:13:46 EDT 2004


Bugs item #970859, was opened at 2004-06-11 03:13
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=970859&group_id=61702

Category: pop3proxy
Group: Source code - CVS
Status: Open
Resolution: None
Priority: 5
Submitted By: lyeoh (lyeoh)
Assigned to: Nobody/Anonymous (nobody)
Summary: Transparent proxying support?

Initial Comment:
Hi, how about adding support for transparent proxying?

e.g. perl equiv from a perl pop3proxy I wrote
#$daddr:$dport = where the proxy will actually make 
connections to
#$FORCEDEFSVR is whether to force usage of the 
configured default server
#$USE_SO_ORIGINAL_DST is whether to do Linux-style 
transparent proxying or FreeBSD style
# $SO_ORIGINAL_DST = 80 if linux headers not available
#$client holds the inbound socket object
# $BOUNDPORT and $BOUNDADDRESS = actual addr and 
port proxy is listening on
#should probably do more checks to stop loops
#e.g. enforce bound addr:port != default addr:port

 if ($FORCEDEFSVR) {
                                $daddr=$DEFADDRESS;
                                $dport=$DEFPORT;
                        } else {
                                if ($USE_SO_ORIGINAL_DST) {
                                        my $p= getsockopt 
$client, $SOL_IP, $SO_ORIGINAL_DST;
                                        $daddr=inet_ntoa(substr
($p,4,4));
                                        $dport=unpack('n',substr
($p,2,2));
                                } else {
#FreeBSD style
                                 $daddr=$client->sockhost;
                                 $dport=$client->sockport;
                                }
                                #dolog('DEBUG', "dest: 
$daddr:$dport");
                                if (($dport==$BOUNDPORT) and 
($daddr eq $BOUNDADDRESS)) {
                                # If seem to be connecting to 
self connect to default server instead
                                        $daddr=$DEFADDRESS;
                                        $dport=$DEFPORT;
                                }
                        }

--
I don't know python, but I might see if I can figure out 
spambayes+ python. Feature may be harder to add than 
I think ;).

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498103&aid=970859&group_id=61702



More information about the Spambayes-bugs mailing list