<div><br>>> I want to know what's the<br>>> pinning.serverConnection mean? and what it is used for?<br><br>>Before we dive into low-level details, please allow me to ask an<br>>important high-level question. Your answer may render those low-level<br>>detail irrelevant:<br><br>>> I want to rewrite the on_unsupported_protocol to support tcp connection</div><div>>>(non-http protocol, called httpdns not readable, no http header) and</div><div>>> relay it the server. [...] I need assign the server's address and port</div><div><br>>Where will your code get the server address and port from? If the answer<br>>is "from the received httpdns message header", then please do not abuse<br>>on_unsupported_protocol to support "httpdns". Instead, add proper<br>>support for httpdns (which may be limited to forwarding httpdns queries<br>>to the right server if such blind forwarding makes sense).<br><br>No, I got it from `clientConnection->local`, the httpdns is just a tcp connection to server with</div><div>specified protocol, not known to me, it is designed by its user, use 80 port to transfer dns request.</div><div><br>>BTW, can you post a link to the "httpdns" protocol specification (not<br>>API)? And what do you mean by "not readable"?<br></div><div><br></div><div>It is not a standard protocol in RFC or some standard specification, just some company use </div><div>80 (default for http protocol) port to transfer dns request, they do this because in China many </div><div>ISP would use they own dns server in different places which makes it slow </div><div>or unreachable to the some company's service.</div><div><sign signid="-1"></sign></div><div><qzone></qzone></div><div> </div><div><includetail><div> </div><div> </div><div style="font:Verdana normal 14px;color:#000;"><div style="FONT-SIZE: 12px;FONT-FAMILY: Arial Narrow;padding:2px 0 2px 0;">------------------ Original ------------------</div><div style="FONT-SIZE: 12px;background:#efefef;padding:8px;"><div id="menu_sender"><b>From: </b> "squid-dev-request"<squid-dev-request@lists.squid-cache.org>;</div><div><b>Date: </b> Sat, Mar 25, 2017 08:00 PM</div><div><b>To: </b> "squid-dev"<squid-dev@lists.squid-cache.org>; <wbr></div><div></div><div><b>Subject: </b> squid-dev Digest, Vol 31, Issue 47</div></div><div> </div>Send squid-dev mailing list submissions to<br>       squid-dev@lists.squid-cache.org<br><br>To subscribe or unsubscribe via the World Wide Web, visit<br>  http://lists.squid-cache.org/listinfo/squid-dev<br>or, via email, send a message with subject or body 'help' to<br> squid-dev-request@lists.squid-cache.org<br><br>You can reach the person managing the list at<br>      squid-dev-owner@lists.squid-cache.org<br><br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of squid-dev digest..."<br><br><br>Today's Topics:<br><br>   1. Re: on_unsupported_protocol rewrite to support tcp connection<br>      relay (Alex Rousskov)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Fri, 24 Mar 2017 08:01:13 -0600<br>From: Alex Rousskov <rousskov@measurement-factory.com><br>To: 钱国正 <richard.qian@magicwifi.com.cn>, squid-dev<br> <squid-dev@lists.squid-cache.org><br>Subject: Re: [squid-dev] on_unsupported_protocol rewrite to support<br>  tcp connection relay<br>Message-ID:<br>     <d0c3afc9-6189-a659-37a4-69fb40586543@measurement-factory.com><br>Content-Type: text/plain; charset=utf-8<br><br>On 03/24/2017 04:54 AM, 钱国正 wrote:<br><br>> I want to know what's the<br>> pinning.serverConnection mean? and what it is used for?<br><br>Before we dive into low-level details, please allow me to ask an<br>important high-level question. Your answer may render those low-level<br>detail irrelevant:<br><br>> I want to rewrite the on_unsupported_protocol to support tcp connection<br>> (non-http protocol, called httpdns not readable, no http header) and<br>> relay it the server. [...] I need assign the server's address and port<br><br>Where will your code get the server address and port from? If the answer<br>is "from the received httpdns message header", then please do not abuse<br>on_unsupported_protocol to support "httpdns". Instead, add proper<br>support for httpdns (which may be limited to forwarding httpdns queries<br>to the right server if such blind forwarding makes sense).<br><br>BTW, can you post a link to the "httpdns" protocol specification (not<br>API)? And what do you mean by "not readable"?<br><br><br>Thank you,<br><br>Alex.<br><br><br><br>------------------------------<br><br>Subject: Digest Footer<br><br>_______________________________________________<br>squid-dev mailing list<br>squid-dev@lists.squid-cache.org<br>http://lists.squid-cache.org/listinfo/squid-dev<br><br><br>------------------------------<br><br>End of squid-dev Digest, Vol 31, Issue 47<br>*****************************************<br></div><!--<![endif]--></includetail></div>