Mediator example (wodVPN)
Hi,
I'm using wodVPN COM in Delphi 7.
I want to use my own mediator, on a PC with public IP running windows.
Can you post an example to start and monitoring a mediator?
Thanks in advance ...
Hi,
I'm using wodVPN COM in Delphi 7.
I want to use my own mediator, on a PC with public IP running windows.
Can you post an example to start and monitoring a mediator?
Thanks in advance ...
by wodDamir
, (6556 days ago) @ Valter Sini
Hi Valter,
There is really not much to post. Here is what you should do. Put the following code under a button or in the FormCreate function:
----------------------------------
wodVPNCom1.Mediator.Start(0,8000);
----------------------------------
That code will start the Mediator on port 8000. That's all you need. As for monitoring, you can add the following:
-----------------------------------------------------------------
procedure TForm1.wodVPNCom1MediatorConnected(Sender: TObject;
var IP: OleVariant; Port: Integer; var FromID, ToID, Data,
Allow: OleVariant);
begin
//Add your own code here...
end;
procedure TForm1.wodVPNCom1MediatorDisconnected(Sender: TObject;
var FromID, ToID: OleVariant);
begin
//Add your own code here...
end;
procedure TForm1.wodVPNCom1MediatorExchangeData(Sender: TObject;
var FromID, ToID: OleVariant);
begin
//Add your own code here...
end;
-----------------------------------------------------------------
The last 3 procedures are Events which will enable you monitoring . They will provide you with specific information like the IP the user is connecting, the IP of the user that disconnected etc. Also, the MediatorConnected Event allows you to allow or reject the incoming connection, based on your Allow parameter. If you set it as Allow := False; , the Mediator will deny access to the user.
Hope I helped.
Regards,
Damba
by Valter Sini
, (6550 days ago) @ wodDamir
Thanks a lot ... it was too easy!

It was no small factor, however, that your support in getting me up and running made me buy from you.

The wodCrypt product is great and we appreciate your effort to add support for UNIX Crypt.

...not only that you provide these components at very reasonable cost, your responsiveness to emailed technical questions is simply outstanding...

Fantastic product by the way, it has helped us tremendously on a daily basis. Keep up the good work.

...wodFtpDlx was exactly what I needed, it worked, and it was priced right...

Count us as a satisfied WeOnlyDo customer. We appreciate your terrific support to get the secure Telnet working properly.

Thank you very much for the rapid responses. I was a little nervous about dealing with a company that is on a different continent from me. You have proven my concerns to be unfounded.

The wodCrypt product is great and we appreciate your effort to add support for UNIX Crypt.

...with the SFTP interface you produced, everything was so simple to understand, we were able to start coding almost immediately!

The SFTP ocx is one of the finest pieces of programming I have seen. It worked out of the box...

