From: William Crawford Date: 2006-08-18T00:09:01+09:00 Subject: Re: Simple Proxy Francis Cianfrocca wrote: > On 8/17/06, William Crawford wrote: >> -- >> Posted via http://www.ruby-forum.com/. >> >> > > What's funny about this is that I was just thinking the other other > day about how EventMachine needs to support TCP proxying > out-of-the-box. Depending on your requirements, this might be a good > excuse to do it. > > Are you thinking about a simple passthrough proxy from one > address/port to another (possibly adding and/or subtracting SSL/TLS)? > O are you looking to do some protocol-specific transformations like > HTTP or SMTP proxying? I hadn't planned to burden this group with all the details, but here we go: The input stream is from a MUD server (text-based multiplayer game) that has 2 different proprietary formats and uses a seperate login server. My 'proxy' will accept a connection from the user's mud client (or telnet client, basically the same thing) and ask for their username and password. It will then connect to the login server, hash the password, submit it and pull a list of characters, which the user chooses, etc. A login key is generated. And a game server is specified. The proxy then drops the connection to the login server and connects to the game server. Then sends the login key and then a line specifying the front end being used. (this is the point that picks between the 2 protocols.) The mud server then sends either a stream with unprintable characters and various codes, mixed with the real output, or an XML-like stream. I would then like to have the option of parsing either of these streams and having the cleaned/transformed output be sent to the user. This is a project that will be released under the BSD license and placed on RubyForge, once I'm happy it's minimally working. I appreciate the immediately interest, Francis. Especially if you can make this stupidly easy for me! I've already got the code working that handles the login server stuff. (Well, minor details left.) It generates the proper info and I can log into the mud server with a standard telnet client, with the info provided. BTW, the MUD in question (in case anyone has wondered) is DragonRealms, and it's not free. :( It makes up for that by being the best MUD I've ever played. (I've quite and come back several times over about 8-10 years.) There is an Open Source Gnome client called Warlock, but every other client is for Windows. (And I run KDE. Warlock displays its main screen and then just crashes.) I -far- prefer a console-only client and I plan to use Muby. (And probaby integrate the proxy solution I develop as an add-on, but I also want a generic proxy for any client to use, regardless of OS and client used.) Feel free to contact me by email if you'd rather discuss it more privately. And thanks! -- Posted via http://www.ruby-forum.com/.