PDA

View Full Version : transparent proxy


emihaly
05-19-2003, 12:57 PM
is somewhere nice simple transparent proxy with server balancing? Al connection will be transfered to 2 specific IP where will be my server application.


1. CONNECT - to first server
2. connect to second server
3. conect to first server
.
.
.
.

i need know if somethink like this exist or i must write own.

mlampkin
05-19-2003, 09:14 PM
The transproxy software will do what you want... it (source code and installation instructions) can be found at:

http://www.transproxy.nlc.net.au/

A couple of quick notes... it DOES work... and if fairly easy to set up... but it is fork (multi-process) based... which means it isn't the fastest system in the world... you will probably want to use the code as the basis for a non-blocking or threaded version...

Hope that helps...

Michael

emihaly
05-20-2003, 01:56 PM
thanx, is nice point, but i need unblocking version otr thread. I server more than 30000 connections on GBit server.

Loco
05-20-2003, 03:58 PM
I don't want to sound offensive but, why in earth don't you use the code supplied and make the appropriate adjustments? I have seen too many posts by you asking about threaded applications and a lot of advanced stuff... I think you already have the knowledge and skills for doing this kind of work!!!

Don't you think it is a much better approach to learn anything????

emihaly
05-21-2003, 01:50 PM
ok, start it, but before i want know, if something not exist. Its logical no???

Loco
05-21-2003, 05:58 PM
ok, start it, but before i want know, if something not exist. Its logical no???

OK, now I don't get it... (This last question, I quite don't understand it)

About your previous question:
You have the code to the multi-process transparent proxy server. You say you want to do it multithreaded.

Changing the code is in no way easy. I would suggest you first take a pretty good look at the code, understand how it works, find the important parts and WRITE YOUR OWN CODE using your coding style, in this way you'll feel more confortable writing, debugging and extending the code...

I have seen your answers and questions in this forum, and it seems that you have a good background (or at least some practice) on the multithreding issue, and also have a good understanding about sockets...

Somewhere in the Net you might be able to find a transparent proxy that is multithreaded and that is free. If you need this ASAP then I suggest you keep looking because creating the code from the other one might take longer than to find one that has already been done. If you are just for the fun, or have some spare time and want to learn and practice on it, go on and write your own... after that share it with us, and we'll help you improve it (if possible) and put it on a public server so others can use your code like you used other people's code...

What do you say? We are willing to help you out should the need arise.

emihaly
05-22-2003, 08:42 AM
I now complete proxy under windows in CBulder++, it take 2 days, but disadvantage is nonportable solution. But for current needs its ok. I use thread version with thread caching. Simple tests allow me do 2500 threads with no problem on workstation. I hope on 2.5 GHz pentium it will work fast. Lot of time in thread are select sleep and thanx to this, lot of threads is not performance problem.

The one problem what i see: i can't go higher in windows nt how 2500 threads. Is somewhere thread limit in registry?

emihaly
05-22-2003, 02:11 PM
Also is somewhere sample to send mail with attachments? Or library for this?

I want on my server send mail with logfile every night. Best is found nice solution without lost one week with study and work own implementation.

mlampkin
05-23-2003, 02:40 AM
See section 2.9 at the following url:

http://www.ntlug.org/~cbbrowne/c.html

There really is nothing more to it... you can add "extra" fields (if required) such as who the email is from, mime type (text/plain) and so forth...

Michael