View Full Version : a very basic proxy...
inkedmn
11-27-2002, 12:30 PM
how hard would it be (in whatever language) to write a proxy server that has two sockets it listens on (two different ports, obviously), and all it does is this:
say the sockets are listening on 81 and 5190.
data arrives on port 81, i want to make it so EVERYTHING is just dumped to the other socket and sent (to a previously specified address).
basically, i want to be able to use AIM at work :)
so, am i pipe dreaming?
jemfinch
11-27-2002, 01:43 PM
It's rather easy. There's an example in the asyncore tutorial at http://www.nightmare.com/medusa/
Jeremy
inkedmn
11-27-2002, 02:25 PM
heh, kinda funny, i read that tutorial about 6 months ago and was LOST. now it makes total sense :)
GnuVince
11-27-2002, 05:50 PM
inkedmn: played with asyn stuff yet? And my the way, when are you starting your new job?
inkedmn
04-17-2003, 07:50 PM
i finished that code like 6 months ago, i have it at home (i'll post it somewhere when i get home).
Seph: the program i wrote works for both
file13
04-21-2003, 11:39 AM
Originally posted by Seph
Could I use it? How would I actually access my computer as a proxy from another location?
you don't really need to program something to do that. i run squid on a remote server and ssh tunnel the proxy back to my work machine when i need encrypted surfing--i.e. when someone sends something not work friendly. though you don't need to do this to run a proxy server. just setup squid or your favorite proxy server and connect to it.
check out:
http://www.squid-cache.org/
then you can just shell to it something like so if you want it to be encrypted:
ssh -L 12345:site.com:3128 site.com
where the 12345 is the local port you're tunneling the proxy too and 3128 is the remote site where the proxy is running on. poor man's VPN.... :beatup:
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.