---
title: "Sharing my Python proxy experiment"
date: 2003-01-01T01:53:22-05:00
url: https://blog.lmorchard.com/2003/01/01/ooocgo/
author: Les Orchard
---

# Sharing my Python proxy experiment

<cite>Anthony Eden</cite> <a href="http://roller.anthonyeden.com/page/aeden/20021230#re_upp_take_2" target="_top">writes</a>:<blockquote><i>I was so intrigued by having a proxy agent which would work for me that I wrote a little generic pluggable proxy this morning.</i></blockquote>Show us the code! :)  I want to play.
<br /><br />
As for my code so far: This is extremely premature, and I'm not even sure if it will work anywhere besides my peculiar iBook, but here's a quick &amp; dirty tarball of my experiments with a <a href="http://www.decafbad.com/twiki/bin/view/Main/PersonalWebProxy">PersonalWebProxy</a> (just web, not universal) with a simple plugin API, in Python using Twisted:
<br /><br />
<a href="http://www.decafbad.com/downloads/dbproxy-20021231.tar.gz" target="_top">dbproxy-20021231.tar.gz</a>
<br /><br />
It's poorly commented, doesn't do much useful, but it's a few nights' work by someone just getting acquainted with Twisted - if you're even worse off than me and want to poke at this proxy thing, maybe this will help you.  It does do a few things I thought were nifty, like use <a href="http://diveintomark.org/archives/2002/08/15.html" target="_top">Mark Pilgrim's rssfinder script</a> in a thread to dig up <a href="http://www.decafbad.com/twiki/bin/view/Main/RSS">RSS</a> feeds for every URL with text/html content you visit.  There's no persistence yet, so they just appear in the log, but figuring out the integration and thread use so far was nifty to me.
<br /><br />
Anyway, enjoy.  I'm still tinkering, thinking, and working up a plan.
<br /><br />
Oh yeah, and I'm watching Dick Clark and the ball drop with my girlfriend, so this post brings an end to hacking for the night.
<!--more-->
shortname=ooocgo

<div id="comments" class="comments archived-comments">
            <h3>Archived Comments</h3>
            
        <ul class="comments">
            
        <li class="comment" id="comment-221085247">
            <div class="meta">
                <div class="author">
                    <a class="avatar image" rel="nofollow" 
                       href="http://www.10500bc.org"><img src="http://www.gravatar.com/avatar.php?gravatar_id=6492f173a7059ece309f7d670ff44e95&amp;size=32&amp;default=http://mediacdn.disqus.com/1320279820/images/noavatar32.png"/></a>
                    <a class="avatar name" rel="nofollow" 
                       href="http://www.10500bc.org">nf0</a>
                </div>
                <a href="#comment-221085247" class="permalink"><time datetime="2003-01-01T06:13:58">2003-01-01T06:13:58</time></a>
            </div>
            <div class="content">I've got it going under Mandrake 9.0. If i run it directly out of eclipse with the python plugin it runs, if i run it from the command line, I had to change the LOG_PATH to the full path.

When it starts i get:
[003382 INFO Unknown module] Proxy coming up on port 8813.
Enabling Multithreading.
dbproxy.proxy.ProxyFactory starting on 8813</div>
            
        </li>
    
        <li class="comment" id="comment-221085248">
            <div class="meta">
                <div class="author">
                    <a class="avatar image" rel="nofollow" 
                       href="http://www.ulaluma.com/pyx"><img src="http://www.gravatar.com/avatar.php?gravatar_id=288adc0fe423befdbb65f707ba714d31&amp;size=32&amp;default=http://mediacdn.disqus.com/1320279820/images/noavatar32.png"/></a>
                    <a class="avatar name" rel="nofollow" 
                       href="http://www.ulaluma.com/pyx">Donovan Preston</a>
                </div>
                <a href="#comment-221085248" class="permalink"><time datetime="2003-01-01T08:36:12">2003-01-01T08:36:12</time></a>
            </div>
            <div class="content">Thank you! I was hoping you would release cold, hard code soon so I could hack on it. And hack on it I did. I am very excited about this project. I think it's going to be of real value very quickly.

I added a Service instance which stores the links harvested by RSSFinder in a dictionary, and I wrote a web interface that starts a server on 8080 and serves a woven page that displays the dictionary along with all the links. Piece of cake. EXCITING

I'll email you my code.</div>
            
        </li>
    
        </ul>
    
        </div>
