mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2025-02-26 03:43:19 +03:00
Remove logic replacing naked IP address to domain
Makes testing easier.
This commit is contained in:
parent
cece06a2cd
commit
eddd7c37e6
@ -63,7 +63,6 @@ constexpr int kListenBackLog = 512;
|
|||||||
constexpr int kDefaultMaxSocketsPerPool = 256;
|
constexpr int kDefaultMaxSocketsPerPool = 256;
|
||||||
constexpr int kDefaultMaxSocketsPerGroup = 255;
|
constexpr int kDefaultMaxSocketsPerGroup = 255;
|
||||||
constexpr int kExpectedMaxUsers = 8;
|
constexpr int kExpectedMaxUsers = 8;
|
||||||
constexpr char kDefaultHostName[] = "example";
|
|
||||||
constexpr net::NetworkTrafficAnnotationTag kTrafficAnnotation =
|
constexpr net::NetworkTrafficAnnotationTag kTrafficAnnotation =
|
||||||
net::DefineNetworkTrafficAnnotation("naive", "");
|
net::DefineNetworkTrafficAnnotation("naive", "");
|
||||||
|
|
||||||
@ -227,18 +226,6 @@ bool ParseCommandLineFlags(Params* params) {
|
|||||||
if (line.HasSwitch("host-resolver-rules")) {
|
if (line.HasSwitch("host-resolver-rules")) {
|
||||||
params->host_resolver_rules =
|
params->host_resolver_rules =
|
||||||
line.GetSwitchValueASCII("host-resolver-rules");
|
line.GetSwitchValueASCII("host-resolver-rules");
|
||||||
} else {
|
|
||||||
// SNI should only contain DNS hostnames not IP addresses per RFC 6066.
|
|
||||||
if (url.HostIsIPAddress()) {
|
|
||||||
GURL::Replacements replacements;
|
|
||||||
replacements.SetHostStr(kDefaultHostName);
|
|
||||||
params->proxy_url =
|
|
||||||
url::SchemeHostPort(url.ReplaceComponents(replacements)).Serialize();
|
|
||||||
LOG(INFO) << "Using '" << kDefaultHostName << "' as the hostname for "
|
|
||||||
<< url.host();
|
|
||||||
params->host_resolver_rules =
|
|
||||||
std::string("MAP ") + kDefaultHostName + " " + url.host();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (line.HasSwitch("log")) {
|
if (line.HasSwitch("log")) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user