Skip to content

iOS: Add includeUnroutableDNSResults to engine builder#2128

Closed
jpsim wants to merge 8 commits intoenvoyproxy:mainfrom
jpsim:jp-apple-dns-include-unroutable-families
Closed

iOS: Add includeUnroutableDNSResults to engine builder#2128
jpsim wants to merge 8 commits intoenvoyproxy:mainfrom
jpsim:jp-apple-dns-include-unroutable-families

Conversation

@jpsim
Copy link
Copy Markdown
Contributor

@jpsim jpsim commented Mar 25, 2022

If set, the resolver will avoid the system's heuristics to only return IPv4 or IPv6 addresses that it considers to be "routable", instead returning all possible IPv4 or IPv6 addresses.

This setting is ignored if the DNS lookup family is set to v4-only or v6-only.

This may be a useful setting to specify if the addresses considered unroutable by the system's heuristics may in practice be routable.

We may want to enable this in combination with happy eyeballs.


Description: iOS: Add includeUnroutableFamilies to engine builder
Risk Level: Low, Apple-only, off by default
Testing: I've confirmed both branches of the code paths are hit when the flag is on and off on a physical iPhone. I will validate the behavioral changes next before merging. Unit tests in progress...
Docs Changes: In progress...
Release Notes: In progress...


To Do:

  • Validate Behavior
  • Unit / Integration Tests
  • Docs
  • Release Notes

jpsim added 5 commits March 25, 2022 08:12
If set, the resolver will avoid the system's heuristics to only return
IPv4 or IPv6 addresses that it considers to be "routable", instead
returning all possible IPv4 or IPv6 addresses.

This setting is ignored if the DNS lookup family is set to v4-only or
v6-only.

This may be a useful setting to specify if the addresses considered
unroutable by the system's heuristics may in practice be routable.

Signed-off-by: JP Simard <jp@jpsim.com>
Signed-off-by: JP Simard <jp@jpsim.com>
Signed-off-by: JP Simard <jp@jpsim.com>
Signed-off-by: JP Simard <jp@jpsim.com>
Signed-off-by: JP Simard <jp@jpsim.com>
.gitmodules Outdated
[submodule "envoy"]
path = envoy
url = https://github.com/envoyproxy/envoy.git
url = https://github.com/jpsim/envoy.git
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for testing purposes, will revert before merging.

To match Android

Signed-off-by: JP Simard <jp@jpsim.com>
@jpsim jpsim changed the title iOS: Add includeUnroutableFamilies to engine builder iOS: Add enableDNSFilterUnroutableFamilies to engine builder Mar 25, 2022
enableHappyEyeballs:(BOOL)enableHappyEyeballs
enableInterfaceBinding:(BOOL)enableInterfaceBinding
enforceTrustChainVerification:(BOOL)enforceTrustChainVerification
enableDNSFilterUnroutableFamilies:(BOOL)enableDNSFilterUnroutableFamilies
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: how about filterUnroutableDNSResults (or perhaps, filterUnroutableDNSResultIPs)?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enableAppleDNSFiltering

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filter is ambiguous if we're keeping or rejecting unroutable results.

Perhaps excludeUnroutableDNSResults since we can share that setting across platforms since we also have the option to do that on the c-ares side.

@"envoy.extensions.network.dns_resolver.apple.v3.AppleDnsResolverConfig\"}\n"];
@"envoy.extensions.network.dns_resolver.apple.v3.AppleDnsResolverConfig\", "
@"\"include_unroutable_families\": %@}\n",
self.enableDNSFilterUnroutableFamilies ? @"false" : @"true"];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jpsim
Copy link
Copy Markdown
Contributor Author

jpsim commented Mar 30, 2022

Thanks for the review, @goaway although the most important part of this to review is the Envoy side: envoyproxy/envoy#20527

jpsim added 2 commits April 20, 2022 14:20
…unroutable-families

* origin/main: (25 commits)
  Update Envoy to c96f711 (envoyproxy#2168)
  Bump Lyft Support Rotation (envoyproxy#2162)
  Update Envoy to 0e8899c (envoyproxy#2166)
  Update rules_apple & rules_swift (envoyproxy#2167)
  bazel: set inmemory remote exec flags globally
  http client: add cancel log and limit callback to open streams (envoyproxy#2165)
  bump envoy to 5181d2355f208061688922572727fe06ba8b3a07 (envoyproxy#2157)
  pin maven dependencies (envoyproxy#2161)
  Fix iOS termination crash in `ProvisionalDispatcher` (envoyproxy#2059)
  bazel: Allow multiple definitions for armeabi android links
  internal: pass engine handles throughout API (envoyproxy#2149)
  Bump Lyft Support Rotation (envoyproxy#2156)
  add specifying more maven deps (envoyproxy#2151)
  update envoy@e4eaf1b97 (envoyproxy#2146)
  bazel: create symbol mapping file (envoyproxy#2126)
  Bump Lyft Support Rotation (envoyproxy#2148)
  bazel: remove sandbox disable
  build: export flatbuffer jvm dep (envoyproxy#2147)
  Bump Lyft Support Rotation (envoyproxy#2143)
  bazel: Add flatbuffers Swift hack
  ...

Signed-off-by: JP Simard <jp@jpsim.com>
* Rename `enableDNSFilterUnroutableFamilies` to `includeUnroutableDNSResults`
* Flip default behavior on Android
* Update docs

Signed-off-by: JP Simard <jp@jpsim.com>
@jpsim jpsim changed the title iOS: Add enableDNSFilterUnroutableFamilies to engine builder iOS: Add includeUnroutableDNSResults to engine builder Apr 20, 2022
@jpsim
Copy link
Copy Markdown
Contributor Author

jpsim commented Dec 1, 2022

Closing as stale now that we've migrated to the Envoy repo: https://github.com/envoyproxy/envoy/blob/main/mobile/README.md

@jpsim jpsim closed this Dec 1, 2022
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.

2 participants