Skip to content

Add option for setting --host-resolver-rules=RULES #2281

Closed
@mdmintz

Description

@mdmintz

Add option for setting --host-resolver-rules=RULES

This is quite powerful. Here's some documentation on what it can be used for:

A 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"](http://www.google.com"/).

In simple terms, this option lets you do powerful things such as:

  • Blocking analytics software.
  • Blocking advertisements.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions