a generic proxy (or port forwarder)

steph on 2005-12-08T14:46:15

On my local net, only a couple machines are "visible" from another coupled intranet, which means that a client PC is subject to arbitrary connection severing after a relatively short time...sic

it is clear that I need a port forwarder, and I need it fast (as usual)...this means perl and first CPAN to make sure I don't reinvent the obvious.

So I came across the Net::Server framework which has a multiplexer incarnation that seems promising; on the client side it is normally VERY protocol-oriented so as a basis I will use some code from Lincoln Stein's network book.

ok network code is only half the story, as I soon discover, the true question is when do I close a client connection? there are some obvious cases, server closes its read end (or both) client says it's done; but what about mis-behaving or real slow clients etc....Humm need more thinking


Don't built it

samtregar on 2005-12-08T21:30:21

If you need it fast, don't build it. Hop on over to http://freshmeat.net/ and download one. I like aproxy but lots are available.

-sam

Re:Don't built it

steph on 2005-12-12T19:24:23

thanks Sam. I tried aproxy and it's quite OK...

actually I missed the issue completely with FTP which **does use two ports**

apart from that I'll try to make an option to go non-blocking (especially the "forward" sub, maybe using something like Lincoln Stein's IO::SessionData).