commhelper.cs
来自「破解的飞信源代码」· CS 代码 · 共 47 行
CS
47 行
namespace Imps.Client.CommLayer
{
using Imps.Utils;
using System;
using System.Net;
internal static class CommHelper
{
public static string GetProxyHost(IWebProxy webProxy)
{
if (webProxy != null)
{
string proxyServer;
int? proxyPort;
if (webProxy is WebProxy)
{
return (webProxy as WebProxy).Address.Host;
}
if (IeConfig.ReadIeHttpProxySetting(out proxyServer, out proxyPort))
{
return proxyServer;
}
}
return string.Empty;
}
public static int GetProxyPort(IWebProxy webProxy)
{
if (webProxy != null)
{
string proxyServer;
int? proxyPort;
if (webProxy is WebProxy)
{
return (webProxy as WebProxy).Address.Port;
}
if (IeConfig.ReadIeHttpProxySetting(out proxyServer, out proxyPort))
{
return proxyPort.get_Value();
}
}
return 80;
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?