[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 440
  • Last Modified:

Socks4/5 Example needed

I am currently working on a game that requires a server that is behind a firewall using Delphi 4.

The main problem I am having is that I am behind a firewall.  I am *unable* to change any firewall settings and I am on a LAN.  

I heard that Socks4 or 5 could solve this problem.  

I basically need a simple program that will allow someone to telnet into it respond with 'hello!' and then disconnect them.

I am a complete newby to TCP/IP programming so detail is in order.  I don't simply want links.  I want a working example with source.

Note: I'd be willing to raise the point value even higher if what I get gets the job done with no hassles.

Also: I am looking for partners in the project I am working on.  All I will say for now is that it is like a mix of Warcraft, Simcity, and a MUD in one.  ICQ#33957229
0
arcrotty
Asked:
arcrotty
  • 8
  • 5
  • 3
  • +1
1 Solution
 
simonetCommented:
Does it have to be Telnet?

Why don't you simply use a MIDAS server for that? Then, instead of having your users use Telnet or something, you distribute the Client to them.

Midas works over firewalls, so that will be no problem. BEsides it's much easier to do MIDAS than to do Sockets.

YOurs,

Alex
0
 
arcrottyAuthor Commented:
Alex/simonet:
I was just looking for an example.  I don't even know what MIDAS is.  can you explain this to me?

I figured telnet would be easy to do because a lot of people may have source they could just modify for that.

I'm looking for an efficient way for multible users can connect to the server and easy to incorporate into object oriented programming.

If you could furnish me something that will work, I'd be happy to award you the points if that is what you are looking for.  

If you put in effort and it doesn't work for me, I will put up a 'points for simonet' fake question and give you 100 points for your trouble anyway.  If it turns out to be the perfect solution, I may give you as much as 1000 points.
0
 
arcrottyAuthor Commented:
I just checked out MIDaS a little bit.  I appears it is designed for use on LANs.  Am I correct in this?  I need my program to go beyond the LAN I'm in.  

Basically this is what my limitations are:
I am on a LAN which has a firewall.  There is *NO* way that anyone can see me from the other side of the firewall.

To my understanding, firewalls have some sort of sock5 support which allow it to open a port(?) on the firewall so that people can access the computer even though they don't know it's specific IP address on the LAN.  This is what I've been told and i have not researched it that much yet, but I need some help.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
mailpiggyCommented:
Hi:
  If you want to get some socket source,you can find some demoes at your delphi directory ..\demo\internet\,and I think there is something you can read.

God bless you!
0
 
simonetCommented:
When I meant, MIDAS, I was wrong. what I wanted to mean was actually CORBA. Both are similar technologies with, basically, the same purpose, but CORBA is far more advanced than MIDAS. Delphi is able to handle both and does an excellent job.

CORBA (Common Object Request Broker Architecture) is a specification (by the Object Management Group [ www.omg.org ]). It allows for processment to be distributed across servers and that will be transparent to the client. Any kind of processing can be distributed, althout its far most common usage is for data warehousing.

Firewalls are transparent for CORBA applications. Thus, you can have only one server, on the internet, and several clients connected to the internet by any means (proxies, firewalls, dial-up, etc). "Objects" will be passed back and forth from/to the server and the clients. You can also have multiple servers and have the load balance distributed evenly among them (Delphi 5 even considers the processing power of each server when doing the load balance).

If you're taking about a games server, the game itself can incorporate a CORBA client. And then there's the server. Doing it with sockets may actually be a little easier, but it's not as high-tech and appealing as using distributed objects.

Sockets are nice, by once you get to know about CORBA and MIDAS, you don't wanna do anything else.

MIDAS works on top of COM (DCOM, actually), which is a Microsoft specification and is platform dependant (only NT machines can be DCOM (= MIDAS)servers because DCOM relies heavily on MTS). CORBA is not platform dependant, since you can port your CORBA servers and or clients to Linux (by using Kylix, when available or JBuilder) and all Unixes (JBuilder).

If you're looking for a demo application, the starting point is the example written by Charlie Calvert, which can be accessed from:

Understanding Internet Express
http://community.borland.com/delphi/article/1,1410,10438,00.html

For information on ORB (= CORBA), the best reference I found the OMG Group's site:
www.omg.org

Depending on the specs of your application, then none of the above is actually for you, but I find those such terrific tecnologies that I couldn't miss the chance of showcasing them. Since the firewall thing has been a bottleneck for you, and you must find a workaround for it, then you must definitly consider CORBA.

Yours,

Alex
0
 
simonetCommented:
mailpiggy,

working with simple sockets is easy. It becomes a whole new story when firewalls are to be considered. The TClientSocket and TServerSocket components that comes with Delphi (and are used for the demo you mentioned) cannot be used across firewalls.

Yours,

Alex
0
 
EpsylonCommented:
Forget about MIDAS and CORBA. CORBA is too slow and you will need licences for MIDAS.

What you need is Internet Component Suite from F. Piette. This package contains an example for Socks programming and many other examples.


Quote from the header of the Socks demo source:

Description: Show how to use TWSocket with SOCKS protocol to traverse a firewall.


http://www.rtfm.be/fpiette/icsuk.htm

Epsylon.
0
 
arcrottyAuthor Commented:
The demos do not serve my needs. Sorry.
0
 
arcrottyAuthor Commented:
Epsylon:

I am currently looking at the demos.  I have yet to make it work.  I am trying out different things and If I can get it to work, I'll award you the points with a little extra added on.

Meanwhile I'm still looking for solutions and other possibilities.
0
 
arcrottyAuthor Commented:
Simonet:

I will be considering your idea if I can't get epsilon's to work.  But it looks like epsilon sent me to a place where I may find the solution.
0
 
EpsylonCommented:
Any progress...?
0
 
arcrottyAuthor Commented:
Epsilon:

It turns out that we aren't using a proxy.  I'll award you the points for the effort though.  Socks is a proxy protocol from what I hear.

Maybe you can help me in other ways.  I'm new to TCP/IP and I need an example on how to connect multiple clients to one server.  Maybe a simple telnet connection that if someone types 'hi' it will respond with 'hello.'

I've figured out how to connect 1, but dunno how to do multiple connections.  I'm doing this with OOP.
0
 
EpsylonCommented:
Hi, I can mail you a demo that has a server and a client. You can run multiple clients and chat with each other. Drop your email address here or mail it to epsylon3@hotmail.com.
0
 
arcrottyAuthor Commented:
smorales@twinlab.com
0
 
EpsylonCommented:
The demo has been sent.
0
 
arcrottyAuthor Commented:
Submit an answer so I can give you the points...
0
 
EpsylonCommented:
>LOCK<
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 8
  • 5
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now