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 Wingate Management Console (WMC) should load your module.

 

NOTE: The buffering in the example programs is naive; it does not stream to disk and holds the entire message content in memory. Therefore it is not recommended to test this with messages containing extremely large amounts of data

 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

...

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

...

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).

...

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. 

...

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.