socksForPython.html 4.12 KB
<!DOCTYPE HTML PUBLIC "-//W3O//DTD WWW HTML 2.0//EN">
<HTML>
<HEAD>
  <TITLE>README for SOCKS module for python interpreter</TITLE>
</HEAD>
<BODY>
<H1>
  README for SOCKS module for python interpreter
</H1>
<P>
originally released:
<P>
Daniel W. Connolly, HaL Software Systems &lt;connolly@hal.com&gt;<BR>
Id: socksForPython.html,v 1.1 1994/09/19 16:54:46 connolly Exp
<H2>
  What Is socksForPython?
</H2>
<P>
This is a python module that works just like the socket module, but uses
the SOCKS protocol to make connections through a firewall machine. See
README.socks for more info on SOCKS.
<P>
This has been tested with
<UL>
  <LI>
    python 1.0.1, python 1.0.2
  <LI>
    Beta release of version 4.2 of SOCKS.CSTC, dated March 21, 1994
  <LI>
    gcc 2.5.8
  <LI>
    SunOS 4.1.3
</UL>
<H2>
  How Do I Build/Install/Use it?
</H2>
<OL>
  <LI>
    Download
    <A HREF="ftp://ftp.w3.org/pub/contrib/socksForPython.tar.gz">socksForPython.tar.gz</A>
  <LI>
    Get and build <A HREF="http://www.cwi.nl/ftp/python/index.html">python</A>
  <LI>
    Get and build SOCKS ( I can't seem to find version 4.2 source through archie.
    Perhaps the author &lt;ylee@syl.dl.nec.com&gt; could help. Perhaps version
    4.1 would be enough for your purposes. Archie lists
    <A HREF="ftp://arthur.cs.purdue.edu/pub/pcert/tools/unix/socks.cstc.4.1.tar.gz">ftp://arthur.cs.purdue.edu/pub/pcert/tools/unix/socks.cstc.4.1.tar.gz</A>
    size: 227733 date: Dec 16 00:00 among others)
  <LI>
    Put this directory in the python source tree under python/Extensions
  <LI>
    Edit the Makefile to point to your python and SOCKS installations
  <LI>
    If you're using SunOS 4.1.3 and you have gcc installed, you can build a
    dynamically linked module. Just invoke 'make' and you'll end up with
    SOCKSmodule.so . Put that in your $PYTHONPATH, and you're all set. (This
    might work for other platforms too, but I have no way to find out!)
  <LI>
    Otherwise, you can build socksmodule.o and link it into the interpreter using
    the normal python Extensions mechanism. See Makefile.pre.in for details.
  <LI>
    Set up the SOCKS server, and set your <EM>$SOCKS_SERVER</EM> appropriately
    (I assume you or somebody at your site knows how to set up the socks server,
    or you wouldn't be interested in this package in the first place.)
  <LI>
    To use the SOCKS module in python code, I just replace:
    <PRE>	import socket
</PRE>
    <P>
    with
    <PRE>	try:
		import SOCKS; socket = SOCKS
	except ImportError:
		import socket
</PRE>
  <LI>
    included is a patch to ftplib.py that will make it (1) import SOCKS as above,
    and (2) set up the data connection in a way that SOCKS can handle.
</OL>
<H2>
  Bugs/Limitations
</H2>
<P>
Note that SOCKS makes some assumptions about the way the socket library is
used. See <EM>What_SOCKS_expects</EM>.
<P>
XXX socksmodule.c should be tweaked to raise exceptions for things that SOCKS
doesn't support.
<H2>
  Copyright Info
</H2>
<P>
Technically speaking, this is copyright (c) 1994 by HaL Computer Systems,
since I developed it using their resources. There's so little novel work
here that I don't see the point in reserving any copyrights. Anyway...
<P>
Copyright 1994 by HaL Computer Systems.
<P>
All Rights Reserved
<P>
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted, provided
that the above copyright notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting documentation, and
that the names of HaL Computer Systems not be used in advertising or publicity
pertaining to distribution of the software without specific, written prior
permission.
<P>
HAL COMPUTER SYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
SHALL HAL COMPUTER SYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
</BODY></HTML>