Add Method
      
 

Description

Adds a new tunneling channel.

Return Type

A VPNChannel object.  

Syntax

object.Add (Type, [LocalAddress], LocalPort, [RemoteAddress], [RemotePort])

The Add Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type VPNChannels.
TypeRequired. A ChannelTypesEnum enumeration, as described in settings. Determines type of the channel, whether is it TCP/UDP, whether it listens locally or remotely.
LocalAddressOptional. A String value. Holds address accessible from local wodVPN.
LocalPortRequired. A Long value. Holds port accessible from local wodVPN.
RemoteAddressOptional. A String value. Holds address accessible from remote wodVPN.
RemotePortOptional. A Long value. Holds port accessible from remote wodVPN.

Settings

The settings for Type are:

ConstantValueDescription
 TCPLocalListen0Listens on local TCP port, forwards connection through wodVPN to remote address.
 TCPRemoteListen1Listens on remote TCP port, forwards connection through wodVPN to local address.
 UDPLocalListen2Listens on local UDP port, forwards connection through wodVPN to remote address.
 UDPRemoteListen3Listens on remote UDP port, forwards connection through wodVPN to remote address.
 TCPSocksProxy4Listens on local TCP port, forwards connection through wodVPN to dynamicaly chosen address, using SOCKS4/4a/5 protocol.

Remarks

The Add method will create new channel and add it to the collection of all currently defined channels for wodVPN instance. After channel is created, wodVPN will immediately try to start it. If it is started successfully, ChannelStart event will be fired.

For more information about channel types, please consult the Type property.

If you want to stop the channel, you must use Remove method to remove it from the collection.