ZennoLab Assemblies Documentation
GetProxy Method (Instance)
Example 
ZennoLab.CommandCenter Namespace > Instance Class : GetProxy Method
Returns a proxy of the Instance object.
Syntax
public string GetProxy()

Return Value

Type: System.String

Contains a string of the form "ip:port:isSocks"

Remarks
If a proxy is not used, then the result is "noproxy"
Example
The following example uses the GetProxy method. Parses proxy and gets ip, port, socks.
// get proxy
string proxy = instance.GetProxy();
 
// if instance has proxy
if (proxy != "noproxy")
{
    // split string
    string[] args = proxy.Split(':');
    // first is id
    string ip = args[0];
    // second is port
    int port = Convert.ToInt32(args[1]);
    // third is socks or not
    bool s = Convert.ToBoolean(args[2]); 
}
// get proxy
$proxy = $instance->GetProxy();
 
// if instance has proxy
if ($proxy != "noproxy")
{
    // split string
    $args = $proxy->Split(':');
    // first is id
    $ip = $args[0];
    // second is port
    $port = System\Convert::ToInt32($args[1]);
    // third is socks or not
    $s = System\Convert::ToBoolean($args[2]); 
}
Requirements

Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.

See Also

Reference

Instance Class
Instance Members
ClearProxy Method