|
楼主 |
发表于 2013-5-5 03:10:21
|
显示全部楼层
[code=csharp] private string proxyip = string.Empty;
/// <summary>
/// 代理 服务IP
/// </summary>
public string ProxyIp
{
get { return proxyip; }
set { proxyip = value; }
}
[/code]
[code=csharp] private string proxyport = string.Empty;
/// <summary>
/// 代理 服务端口
/// </summary>
public string ProxyPort
{
get { return proxyport; }
set { proxyport = value; }
}[/code]
[code=csharp] private void SetProxy(HttpItem objhttpItem)
{
if (!string.IsNullOrEmpty(objhttpItem.ProxyIp))
{
//设置代理服务器
WebProxy myProxy = new WebProxy(objhttpItem.ProxyIp, objhttpItem.ProxyPort);
request.Proxy = myProxy;
}
}[/code]
这样可行不?
|
|