Page tree
Skip to end of metadata
Go to start of metadata

The WinGate Module Wizard (WMW) is a Visual Studio 2010 plugin that makes it easy to create boilerplate code for WinGate plugins. 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 to name the DLL's and projects for your plugin.

Create Engine Module

Select this option if you want to create a plugin that runs in the WinGate engine. There are a number of options to chose from for the generated project:

Use persistence

Generates code to bind to the persistence API and demonstrate reading and writing configuration information through it.

Use logging

Generates code to bind to the logging API, register your module as a log source and log some text at various places in the generated code.

Generate HTTP filter sample code

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

This generates a node in the WMC tree along with a simple panel that appears in the configuration area when you select the node. You can place the node under any of the three default nodes in the WMC. Item Name refers to the name the node will display in the tree.

Create task

Generates sample code for a task item that is typically displayed in the task box underneath the navigation tree. The generated code will hide the task box when the node is navigated away from and display a message box when it is clicked.

Add module(s) to manifest

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 a registry entry created for your package. If this is not checked then WinGate will not see your package and will not attempt to load the modules within the package manifest. You would have to add the package registry entry manually at a later time.

This feature is typically left checked.

 

 

  • No labels