{"id":91581,"date":"2015-09-16T07:00:00","date_gmt":"2015-09-16T21:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/20150916-00\/?p=91581\/"},"modified":"2019-03-13T12:19:36","modified_gmt":"2019-03-13T19:19:36","slug":"20150916-00","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20150916-00\/?p=91581","title":{"rendered":"Why doesn&#8217;t GetAddrInfo work from behind a proxy?"},"content":{"rendered":"<p>A customer was having a problem with the <code>Get&shy;Addr&shy;Info<\/code> function when running inside a corporate proxy environment. <\/p>\n<blockquote CLASS=\"q\"><p>We are trying to get the IP address of, say, www.microsoft.com by using the <code>Get&shy;Addr&shy;Info<\/code> function. This works fine if the computer is not behind a proxy, but if it is run in a corporate proxy environment, the call fails with <code>WSAHOST_NOT_FOUND<\/code>. <\/p><\/blockquote>\n<p>The <code>Get&shy;Addr&shy;Info<\/code> function operates at a level below proxies. When you have a Web proxy, the computer never actually talks to www.microsoft.com directly. Instead, you connect to the proxy and tell the proxy, &#8220;Please contact www.microsoft.com for me, thanks.&#8221; That&#8217;s why it&#8217;s called a &#8220;proxy&#8221;. <\/p>\n<p>You never see the IP address of www.microsoft.com; the only IP address you see is that of the proxy. Besides, since you are inside a corporate proxy environment, even if you had the IP address for www.microsoft.com, it is if no use to you since you cannot connect to it. <\/p>\n<p>There are <a HREF=\"http:\/\/www.isaserver.org\/\">products<\/a> that try to smooth over this boundary, so that programs think that they are connected directly to the Internet when in fact they are talking through the proxy. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can&#8217;t get there from here.<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25],"class_list":["post-91581","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>You can&#8217;t get there from here.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/91581","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=91581"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/91581\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=91581"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=91581"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=91581"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}