How wodVPN Works? - WeOnlyDo Discussion board

How wodVPN Works? (wodVPN)

by Diab, Monday, June 25, 2012, 11:39 (4322 days ago)

How wodVPN Works? and is there is a server that you store user Ids in it ?

Re: How wodVPN Works?

by wodDamir, Monday, June 25, 2012, 13:03 (4322 days ago) @ Diab

Hi Diab,

There is no server in wodVPN. wodVPN is a peer-to-peer component which means that connection is established directly. The only server used is mediator which is used for matching Peer IDs and exchanging IP/Port. Mediator only keeps info IPs for 15s and removes them afterwards. Mediator *doesn't* have to be used if you already know IP/Port info.

You can check following URL in order to see a sample of Mediator script: http://www.weonlydo.com/VPN/Help/Mediator.html

As for communication itself, UDP packets are used, and connection is encrypted so noone beside peers can read the data (not even mediator). Also, wodVPN uses UDP hole-punching technique in order to pass through firewalls (*I would suggest you try searching on internet for more info on this term*).

Hope this helps.

Regards,
Damba

Re: How wodVPN Works?

by Diab, Monday, June 25, 2012, 13:10 (4322 days ago) @ wodDamir

Hi Diab,

There is no server in wodVPN. wodVPN is a peer-to-peer component which means that connection is established directly. The only server used is mediator which is used for matching Peer IDs and exchanging IP/Port. Mediator only keeps info IPs for 15s and removes them afterwards. Mediator *doesn't* have to be used if you already know IP/Port info.

You can check following URL in order to see a sample of Mediator script: http://www.weonlydo.com/VPN/Help/Mediator.html

As for communication itself, UDP packets are used, and connection is encrypted so noone beside peers can read the data (not even mediator). Also, wodVPN uses UDP hole-punching technique in order to pass through firewalls (*I would suggest you try searching on internet for more info on this term*).

Hope this helps.

Regards,
Damba

Thanks a lot
Can i use my Mediator Server??and how could i exchange the ip/port?

Best Regards,
Diab

Re: How wodVPN Works?

by wodDamir, Monday, June 25, 2012, 14:10 (4322 days ago) @ Diab

Diab,

Yes you can. That's why I provided Mediator script URL. You can simply place it on your own server.

You don't need to do that. You simply call Search method and mediator does the exchange.

Regards,
Damba

Re: How wodVPN Works?

by Diab, Monday, June 25, 2012, 15:25 (4322 days ago) @ wodDamir

Diab,

Yes you can. That's why I provided Mediator script URL. You can simply place it on your own server.

You don't need to do that. You simply call Search method and mediator does the exchange.

Regards,
Damba

Hi,
I want to make my own client app and server in order to know the capabilities of your program ,
so my question is how can i do this prototype using my own clients and server using C#


Best Regards
Diab

Re: How wodVPN Works?

by wodDamir, Monday, June 25, 2012, 16:00 (4322 days ago) @ Diab

Diab,

Did you try installing component? When you install wodVPN, you should have Samples installed along. There are .Net samples included.

Can you please try them out?

Regards,
Damba

Re: How wodVPN Works?

by Diab, Monday, June 25, 2012, 17:05 (4322 days ago) @ wodDamir

I installed the component and the wodVPN Sample works in your server ,
if i took a a VPNmediator to my static server, will it work on my server and what kind of app that i run on the server (a console or Asp or what?)


Best Regards,
Diab

Re: How wodVPN Works?

by woddrazen, Monday, June 25, 2012, 17:49 (4322 days ago) @ Diab

Diab,


You can use any application type you like. It's only important that you can import wodVPN inside and run mediator there using wodVPN VPNMediator Object.


Drazen

Re: How wodVPN Works?

by Diab, Monday, June 25, 2012, 18:08 (4322 days ago) @ woddrazen

Thanks a lot for Your support

Re: How wodVPN Works?

by Diab, Tuesday, June 26, 2012, 13:10 (4321 days ago) @ Diab

Hi,
i use your mediator (C#) in my server , and use your VPN CSSample and change the server name to my server but doesn't work.
could you please explain to me how to get this application work in my server using C# language?

Regards,
Abdelmonem Diab

Re: How wodVPN Works?

by woddrazen, Tuesday, June 26, 2012, 13:50 (4321 days ago) @ Diab

Diab,


Here is code snippet how to start your own mediator.
[code]WODVPNCOMLib.wodVPNCom med;
private void Form1_Load(object sender, EventArgs e)
{
med = new WODVPNCOMLib.wodVPNCom();
med.MediatorConnected += new WODVPNCOMLib._IwodVPNComEvents_MediatorConnectedEventHandler(med_MediatorConnected);
med.Mediator.Start(WODVPNCOMLib.SearchEnum.SrchUDPSingle,8000);
}

void med_MediatorConnected(string IP, int Port, string FromID, string ToID, string Data, ref bool Allow)
{
Allow = true;
}[/code]
You need to point peers to connect to your mediator inside Search Method.

Let us know how it goes.


Drazen

Re: How wodVPN Works?

by Diab, Tuesday, June 26, 2012, 17:59 (4321 days ago) @ woddrazen

Diab,


Here is code snippet how to start your own mediator.
[code]WODVPNCOMLib.wodVPNCom med;
private void Form1_Load(object sender, EventArgs e)
{
med = new WODVPNCOMLib.wodVPNCom();
med.MediatorConnected += new WODVPNCOMLib._IwodVPNComEvents_MediatorConnectedEventHandler(med_MediatorConnected);
med.Mediator.Start(WODVPNCOMLib.SearchEnum.SrchUDPSingle,8000);
}

void med_MediatorConnected(string IP, int Port, string FromID, string ToID, string Data, ref bool Allow)
{
Allow = true;
}[/code]
You need to point peers to connect to your mediator inside Search Method.

Let us know how it goes.


Drazen

this code didn't work with me.
We have a firewall in my server and working on Port 90 only(Port 90 opened )
is this a problem to the application ????
and any suggestion would help me in this problem

Regards,
Diab

Re: How wodVPN Works?

by wodDamir, Tuesday, June 26, 2012, 18:20 (4321 days ago) @ Diab

Diab,

Saying didn't work doesn't really help. What happened? Did you receive an error? Which error did you receive?

What sample did you use? Did you use Drazen's code for Mediator, or the Mediator code in Samples directory? Did you adapt the code to use Port 90?

Regards,
Damba

Re: How wodVPN Works?

by Diab, Tuesday, June 26, 2012, 18:42 (4321 days ago) @ wodDamir

Diab,

Saying didn't work doesn't really help. What happened? Did you receive an error? Which error did you receive?

What sample did you use? Did you use Drazen's code for Mediator, or the Mediator code in Samples directory? Did you adapt the code to use Port 90?

Regards,
Damba

1-i use your C#Sample to connect with two peers, it works when the application using your Mediator search but when i make my server with your code (put it in console app )with your code , there is no error happen but the connection doesn't establish with the two peers.

2- i tried to use your Application (WODVPN Sample)to connect without searching (writing the public ip address and the port that the other peer is listen to ) but the connection is timeout.

Regards,
Diab

Re: How wodVPN Works?

by wodDamir, Tuesday, June 26, 2012, 19:51 (4321 days ago) @ Diab

Diab,

When you say sample , please be specific. Which sample exactly?

Did you change the Port and mediator hostname/IP in Search method call?

Regards,
Damba

Re: How wodVPN Works?

by Diab, Tuesday, June 26, 2012, 20:19 (4321 days ago) @ wodDamir

Diab,

When you say sample , please be specific. Which sample exactly?

Did you change the Port and mediator hostname/IP in Search method call?

Regards,
Damba

I'm so sorry that you didn't understand me.
In C# Folder there is a 1simple Application that i took about.
i chaneged
wodVPN1.Search(WODVPNCOMLib.SearchEnum.SrchUDPSingle, textBox2.Text, myserver.com , 90, null);
that Search Method to my server
First : i want to Connect two peers without calling your server by writing each public ip in the hostname Textbox and the port textbox
When i did it, the problem is Connection timeout

Second: using my server in searching peers and establishing the connection between the peers, used your Sample code to make mine but the server didn't get the peers list >

i'm sorry For that again
and Thanks a lot for your Support

Regards,
Diab

it is simple Application that(like Chat Application)

Re: How wodVPN Works?

by wodDamir, Tuesday, June 26, 2012, 21:11 (4321 days ago) @ Diab

Diab,

Ok.

#1: In that case you can simply enter Hostname and Port fields (and enter public IP and Port) and click Connect. Please keep in mind that Port needs to be open if computers are behind a firewall.

#2: If I understood right, it works with our mediator specified? If so, then are you sure that your mediator is even running? Is it publicly accessible?

Regards,
Damba

Re: How wodVPN Works?

by Diab, Wednesday, June 27, 2012, 11:21 (4320 days ago) @ wodDamir

Diab,

Ok.

#1: In that case you can simply enter Hostname and Port fields (and enter public IP and Port) and click Connect. Please keep in mind that Port needs to be open if computers are behind a firewall.

#2: If I understood right, it works with our mediator specified? If so, then are you sure that your mediator is even running? Is it publicly accessible?

Regards,
Damba

i tried to host a website on my open port in the server (Port 90) and it works. i think that the logic behind the code in the server is very simple, it just use the Mediator and start it in my port , is there is any logic in the server side code ?


Regards,
Diab

Re: How wodVPN Works?

by wodDamir, Wednesday, June 27, 2012, 11:44 (4320 days ago) @ Diab

Diab,

There *IS NO* server. There's only Mediator, and 2x Peers. Peers contact mediator only to exchange IP/Port of the other peer. Once matched, they connect. Connection is made directly between peers, without any 3rd party in between.

Regards,
Damba

Re: How wodVPN Works?

by Diab, Wednesday, June 27, 2012, 17:33 (4320 days ago) @ wodDamir

Diab,

There *IS NO* server. There's only Mediator, and 2x Peers. Peers contact mediator only to exchange IP/Port of the other peer. Once matched, they connect. Connection is made directly between peers, without any 3rd party in between.

Regards,
Damba

What's the network and hardware requirements to build my mediator ?

Re: How wodVPN Works?

by woddrazen, Wednesday, June 27, 2012, 17:40 (4320 days ago) @ Diab

Diab,


There is no special requirements for running mediator. Mediator doesn't use much memory so it should work on normal machine without any problem.

You need to have access on Internet on machine where you run mediator. There is no other network requirements.


Drazen

Re: How wodVPN Works?

by Diab, Thursday, June 28, 2012, 15:37 (4319 days ago) @ woddrazen

I have a static ip server and i'm trying to test Your Sample (simple C# Application in my server , i run two instances in the same server and make Search Button ,it returns Timeout... the same application works in the clients)my server access the internet but the ports that opened are 90 ,8000.
Are there any Security issues that would be a problem in my server?
my server can't connect to your Medaitor.weonlydo.com .
Note: i Closed my firewall.

Thanks a lot

Re: How wodVPN Works?

by woddrazen, Thursday, June 28, 2012, 15:52 (4319 days ago) @ Diab

Diab,


Mediator.weonlydo.com is online. Probably you have some firewall or something similar that blocks connection to our mediator.

Can you maybe check this out and try it again? Mediator.weonlydo.com is on port 8000.


Drazen

Re: How wodVPN Works?

by Diab, Thursday, June 28, 2012, 17:04 (4319 days ago) @ woddrazen

My server is working now , it was a security issue,Thanks
Now I Want to remove your mediator.weonlydo.com and put my Mediator.server in the example (Simple Application by C# ).
the code that i used in a console Application in the server

WODVPNCOMLib.wodVPNCom med = new WODVPNCOMLib.wodVPNCom();
med.MediatorConnected +=new WODVPNCOMLib._IwodVPNComEvents_MediatorConnectedEventHandler(med_MediatorConnected);
med.Mediator.Start(WODVPNCOMLib.SearchEnum.SrchUDPSingle, 8000);
Console.WriteLine( Start );
Console.ReadLine();

this is in the server
and the client
wodVPN1.Search(WODVPNCOMLib.SearchEnum.SrchUDPSingle, textBox2.Text, MyPublicIPServer , 8000, null);

is that wrong and how can i do this ?
Thanks a lot

Regards,
Diab

Re: How wodVPN Works?

by Diab, Thursday, June 28, 2012, 17:43 (4319 days ago) @ Diab

My server is working now , it was a security issue,Thanks
Now I Want to remove your mediator.weonlydo.com and put my Mediator.server in the example (Simple Application by C# ).
the code that i used in a console Application in the server

WODVPNCOMLib.wodVPNCom med = new WODVPNCOMLib.wodVPNCom();
med.MediatorConnected +=new WODVPNCOMLib._IwodVPNComEvents_MediatorConnectedEventHandler(med_MediatorConnected);
med.Mediator.Start(WODVPNCOMLib.SearchEnum.SrchUDPSingle, 8000);
Console.WriteLine( Start );
Console.ReadLine();

this is in the server

if i can do this , i will buy Your WODVPN.
and the client
wodVPN1.Search(WODVPNCOMLib.SearchEnum.SrchUDPSingle, textBox2.Text, MyPublicIPServer , 8000, null);

is that wrong and how can i do this ?
Thanks a lot

Regards,
Diab