Skip to content

Conversation

stevenmcdonald
Copy link
Owner

@stevenmcdonald stevenmcdonald commented Jun 4, 2025

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 of net::MappedHostResolver configured with the supplied value

GF 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:

  • Is Google/Cronet/Chromium interested in this feature?
  • David Schinazi said suggested we probably would need to convert to using "experimental options," but suggested we hold off until we get more input on what's preferred, so that's another question.
  • There are no unit tests yet. We've held off on tests that test the parameters until we find out the answers to the above.
  • Are there other areas besides the parameter passing (or the test that covers parsing the experimental options) that need testing? We're just hooking up existing functionality, so the params may be all that's needed, though we're happy to add more if we missed something

Matthew Bogner's patch to enable a resolver rules param for Cronet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant