How does a server know a client is trying to conne - WeOnlyDo Discussion board

How does a server know a client is trying to conne (wodVPN)

by Chip, Thursday, November 13, 2008, 06:38 (5644 days ago)

I understand how the firewall hole punching works via the Search method. For it to work they must Search for each at the same time via a mediator, they then get each others IP address and port, then connect to each other at roughly the same time.

However, this begs the question: if you are acting as a server (behind a firewall), and anyone can connect (with the correct password), how do you know a client is trying to connect to you so that you can Search for them via the mediator at the same time? The server not only needs to know if a client is trying to connect, but it also needs to know the ID of the client.

The only way I can think of for the server to know if someone is trying to connect to them (and who they are) is to use a web service (e.g. a PHP script on a web site) and ask it every few seconds Is anyone trying to contact me, and if so, who are they? . This doesn't seem like an ideal situation, especially if you have tens of thousands of servers.

Is there a better way? Or am I going about this the wrong way?

Thanks

Re: How does a server know a client is trying to c

by woddrazen, Thursday, November 13, 2008, 09:50 (5644 days ago) @ Chip

Chip,


Did you check MediatorConnected Event. You can find there FromID and ToID. Maybe that will help.

More help for MediatorConnected Event you can find here:
http://www.weonlydo.com/VPN/Help/WODVPNLib~wodVPN~MediatorConnected_EV.html


Drazen

Re: How does a server know a client is trying to c

by Chip, Thursday, November 13, 2008, 10:24 (5644 days ago) @ woddrazen

Thanks, but that still doesn't solve the core problem of how the server knows someone is trying to connect to it without continually asking the mediator? It must still poll the mediator to know a client is trying to contact it because the client cannot directly connect to the server, e.g. firewall. If you've got thousands of servers, that's going to be a strain on the mediator server. Is there an alternative to all the servers constantly polling the mediator?

Re: How does a server know a client is trying to c

by woddrazen, Thursday, November 13, 2008, 12:25 (5644 days ago) @ Chip

Chip,


You don't need to use mediator if you know where you want to connect.

When mediator is used it provide Hostname and Port information to Connect Method.

You can insert that information directly. You can specify which port you want to use in Start Method.

More help for Connect Method you can find here:
http://www.weonlydo.com/VPN/Help/WODVPNLib~wodVPN~Connect.html

More help for Start Method you can find here:
http://www.weonlydo.com/VPN/Help/WODVPNLib~wodVPN~Start.html


Drazen

Re: How does a server know a client is trying to c

by Chip, Thursday, November 13, 2008, 12:45 (5644 days ago) @ woddrazen

I understand that, but how does that help with hole punching through the firewall? Connect will fail if there is a firewall in the way. You need the mediator for hole punching . So client and server must call Search at roughly the same time, and then Connect. Without searching you aren't going to get through any firewalls.

I feel like I'm going around in circles here and getting nowhere fast [:sad:]

Let me try and spell it out so that it is as clear as can be:

- For hole punching through firewalls, you need to use a mediator. That means calling the Search method.

- For a server behind a firewall, the only way it can know a client is trying to contact it is to CONTINUALLY call the mediator (via Search).

Continually calling the mediator is going to be a huge strain on the mediator server if there are thousands of servers calling it all the time (add to that the calls from the clients).

I'm simply asking if there is a better way than servers continually calling Search?

Re: How does a server know a client is trying to c

by woddrazen, Thursday, November 13, 2008, 15:16 (5644 days ago) @ Chip

Chip,


You can't connect peers through firewall without using Mediator and Search Method. I have talked about that with our leading programmer.

One mediator is used in Wippien.com. Wippien is using wodVPN and it works without any problem with many users using only one mediator.

You can of course start as many mediator you want. So you can use more then one mediator and lower mediator requests.


Drazen