Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The WinGate Module Wizard (WMW) is a Visual Studio 2010 plugin that makes it easy to create boilerplate code for WinGate plugins.

Quick Start

  • Install WinGate on your development machine and stop the WinGate service.
  • Install the WinGate SDK onto the same machine
  • Run Visual Studio 2010
  • Create New Project and select WinGate Plugin Module from the Visual C++ section of the Installed Templates
  • Set options in the Wizard and click Finish.
  • Build solution
  • Run WinGate 

Assuming you have set options to add your module to the manifest and register the package with WinGate, then WinGate and the WMC should load your module The QuickStart guide will show you how to install the wizard and get your environment setup for developing WinGate plugins.

Wizard Options

Friendly name and Description

Enter the text you wish users of your module to see when they view the Module panel in the WinGate Management Console. The friendly name will also be used ti to name the DLL's and projects for your plugin.

...

Select this option to generate sample code for filtering HTTP traffic from sources such as the HTTP Proxy Service in WinGate. The generated code provides a simplistic example of buffering and then scanning HTTP traffic as well as reporting an error page back to the user if the content is deemed "unsafe".

To have your filter process HTTP traffic you will need to setup an HTTP Proxy Service in WinGate, then point your browser to use the proxy, or use some other service like SOCKS and then intercept the port. The former is the typical way to do this.

To receive the error page, browse through the HTTP filter to the URL www.eicar.org.

Generate POP3 filter sample code

Select this option to generate sample code for filtering POP3 traffic from sources such as the POP3 Proxy Service in WinGate. The example code monitors the POP3 commands and message data and will convert "unsafe" emails into a plaintext message indicating that it has been blocked.

To generate an "unsafe" message, just put the text "BAD POP3 MESSAGE" somewhere in the message (without quotes).

Generate SMTP filter sample code

Select this option to generate sample code for filtering SMTP traffic from sources such as the SMTP Server in WinGate. The example code will monitor emails being sent via the source and send back an error message to the client if the message is deemed "unsafe".

it It also demonstrates setting an internal tag to indicate the email has been scanned, which is then read by the SMTP queue filter so it can avoid rescanning the message.

To have your filter process SMTP messages set up an SMTP Server in WinGate then configure your email client to use it.

To generate an "unsafe" message, just put the text "BAD SMTP MESSAGE" somewhere in the message (without quotes).

Generate SMTP queue filter sample code

Select this option to generate sample code for monitoring the SMTP queue used by services such as the SMTP Server. The example code monitors new mails put into the queue and checks to see if they are "unsafe". If they are, the message is deleted.

To have your filter process queued SMTP messages set up an SMTP Server and configure your email client to use it. Then set up an SMTP delivery service in WinGate. Send an email through your email client and any message with the trigger phrase will not be delivered but other messages will. 

To generate an "unsafe" message, just put the text "BAD SMTP QUEUE MESSAGE" somewhere in the message (without quotes).

NOTE: If you generate both SMTP Filter example code and SMTP Queue Filter example code in the same module, the SMTP Filter code will set the "already scanned" tag and therefore the message will be passed through the SMTP queue filter even if it has the trigger phrase in it. So to test that the SMTP queue example code is working correctly, disable the WinGate Example SMTP Filter in the Filters section of the SMTP Server properties.

Create UI Module

Select this option if your plugin requires a user interface that runs in the WinGate Management Console. It generates a separate project to create the UI dll required. Most plugins will generally have both an Engine and UI side module. 

Create panel in UI Module under tree node

...

Selecting this option automatically adds entries into your plugin manifest file for the module(s) you are generating. Without these entries WinGate will not load the module(s) ; and you will have to add them manually later.

This feature is typically left checked.

Select this option to have the entire plugin package registered with WinGatea registry entry created for your package. If this is not checked then WinGate will not see your package at all and will not attempt to load the modules within the package manifest. You would have to add the package registry entry in manually at a later time.

This feature is typically left checked.