From 387885954b3f1337e2b6af3d0ab7dc7ce6a53718 Mon Sep 17 00:00:00 2001
From: "Mark D. Roth" <roth@google.com>
Date: Thu, 9 Feb 2017 09:28:53 -0800
Subject: [PATCH] Don't use proxy when target is a Unix domain socket.

---
 src/core/ext/client_channel/http_proxy.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/core/ext/client_channel/http_proxy.c b/src/core/ext/client_channel/http_proxy.c
index 7daa071495..bbe4ff550c 100644
--- a/src/core/ext/client_channel/http_proxy.c
+++ b/src/core/ext/client_channel/http_proxy.c
@@ -87,6 +87,12 @@ static bool proxy_mapper_map_name(grpc_exec_ctx* exec_ctx,
     if (uri != NULL) grpc_uri_destroy(uri);
     return false;
   }
+  if (strcmp(uri->scheme, "unix") == 0) {
+    gpr_log(GPR_INFO, "not using proxy for Unix domain socket '%s'",
+            server_uri);
+    grpc_uri_destroy(uri);
+    return false;
+  }
   grpc_arg new_arg;
   new_arg.key = GRPC_ARG_HTTP_CONNECT_SERVER;
   new_arg.type = GRPC_ARG_STRING;
-- 
GitLab