-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathproxyparser.h
35 lines (27 loc) · 952 Bytes
/
proxyparser.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef PROXYPARSER_H
#define PROXYPARSER_H
#include <string>
#include <vector>
using namespace std;
class ProxySetting
{
public:
string protocol;
string domain;
unsigned int port;
};
class ProxyParser
{
public:
static bool getProxySettingForUrl(string url, ProxySetting & proxy);
static bool getStaticProxySettingForUrl(string url, wstring proxylist, wstring proxybypass, ProxySetting & proxy);
static void getProxySettingForProtocolFromProxyList(string protocol, string proxyList, ProxySetting & proxy);
static void getProxySettingForProxyListItem(string proxyItem, ProxySetting & proxy);
static bool testHostForBypassList(string host, wstring wproxybypass);
static bool testHostForBypass(string host, string bypass);
static bool testDomainForBypass(string domain, string bypass);
static bool testIpForBypass(string ip, string bypass);
static vector<string> getIPForHost(string host);
static bool isDomain(string host);
};
#endif