| C# | |
|---|---|
public string GetProxy() | |
Return Value
Type: System.String
Contains a string of the form "ip:port:isSocks"
If a proxy is not used, then the result is "noproxy"
The following example uses the GetProxy method. Parses proxy and gets ip, port, socks.
| C# | Copy Code |
|---|---|
// 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]); } | |
| PHP | Copy Code |
|---|---|
// 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]); } | |
Target Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family