Cronet option to set Resolver Rules from GreatFire Envoy #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Who and why?
We're working with GreatFire on a project called Envoy (not be confused with this other Envoy). GF Envoy is a library for censorship evasion, and is in part based on Cronet.
We have a few feature patches for Cronet that we think might be generally useful to others. It helps us if we don't have to patch Cronet as much, but we know Google has to balance utility with ongoing maintenance.
Resolver rules param for Cronet
Allows the caller to provide a string of resolver rules to the Cronet Engine Builder, similar to the
--host-resolver-rules
command line flag supported by the browser. If the provided string is not empty, we create an instance ofnet::MappedHostResolver
configured with the supplied valueGF Envoy uses this for two reasons. First, DNS blocking or poisoning is a common censorship technique, so being able to "hard code" DNS entries is helpful for us. We also use it to e.g. run a transparent proxy on localhost and re-map the target host name to
127.0.0.1
, so TLS works. The Resolver Rules config language is quite powerful though, and it could be used in a variety of ways by other Cronet users.To dos/questions: