我不明白,我试图转发每一个http请求到一个特定的域,除了几个网站。
它工作正常,但有一个例外:
"/path/to/chrome.exe" --host-rules="MAP * www.domain.de,
EXCLUDE *.youtube.*"
但我没有得到它的工作与多个域,例如:
"/path/to/chrome.exe" --host-rules="MAP * www.domain.de,
EXCLUDE *.youtube.*" *.last.fm"
或
"/path/to/chrome.exe" --host-rules="MAP * www.domain.de,
EXCLUDE *.youtube.*", *.last.fm"
格式错误在哪里?:-/
正如描述(http://peter.sh/experiments/chromium-command-line-switches/#host-rules)所说:
Comma-separated list of rules that control how hostnames are mapped.
For example: "MAP * 127.0.0.1" --> Forces all hostnames to be mapped to 127.0.0.1
"MAP *.google.com proxy" --> Forces all google.com subdomains to be resolved to "proxy".
"MAP test.com [::1]:77 --> Forces "test.com" to resolve to IPv6 loopback.
Will also force the port of the resulting socket address to be 77. "MAP * baz, EXCLUDE www.google.com"
--> Remaps everything to "baz", except for "www.google.com".
These mappings apply to the endpoint host in a net::URLRequest
(the TCP connect and host resolver in a direct connection, and the CONNECT in an http proxy connection,
and the endpoint host in a SOCKS proxy connection).
5条答案
按热度按时间46qrfjad1#
我好像在回答一个老问题,但无论如何...
您发布了:
我认为你的例子中的引用是混乱的。它应该是:
b4wnujal2#
除了修复引用拼写错误外,您还应该在每个排除域之前写入
EXCLUDE
:dwbf0jvd3#
在Windows中,您必须这样编写:
注意MAP规则之间没有逗号!
u4dcyp6a4#
(On窗口)
在我的例子中,我只有
"MAP *.co.za 172.11.12.13"
,启动chrome时它忽略了Map。当我添加Exclude google.co.za
的一部分时,它工作了:总结:
不起作用:
有效:
v9tzhpje5#
语法如下所示:
“C:\程序文件\Google\Chrome\应用程序\Chrome. exe”--主机解析器规则=“Map主机110.10.10.10,Map主机2 10.10.10.10,Map主机3 10.10.10.10”
另外请注意,我使用--host-resolver-rules而不是--host-rules,因为--host-rules会给我带来证书方面的问题