<p>Hi friends sorry for questions I do as I'm trying to do a program of parent proxy that create a local port and redirects the traffic to another striking bone a remote proxy, well as you achieve it work but the problem is that it does not receive the response sent by the only program you can send but does not read the answer with a sniffer to scan http responses was able to see that you can the returns reply from the remote server but the Goland program does not read it enclose it part of the code and thank you for your help</p>
<p><a href="http://pastebin.com/qYfQV3pz" rel="nofollow">http://pastebin.com/qYfQV3pz</a></p>
<hr/>**评论:**<br/><br/>avrtno: <pre><p>The application does not contain any code that copies the server's response to the client. If you are trying to build a proxy, then I suggest that you use <a href="http://godoc.org/net/http/httputil#ReverseProxy" rel="nofollow">ReverseProxy</a>.</p></pre>cenuij: <pre><p>Yep this, and if you need to handle a more than average load on the reverse proxy, consider tweaking the <code>http.Transport</code> member variable <code>MaxIdleConnsPerHost</code>. I think the default is <code>2</code> but you can do something like:</p>
<pre><code>http.DefaultTransport.(*http.Transport).MaxIdleConnsPerHost = 50
</code></pre></pre>obito02: <pre><blockquote>
<p>Yep this, and if you need to handle a more than average load on the reverse proxy, consider tweaking the http.Transport member variable MaxIdleConnsPerHost. I think the default is 2 but you can do something like:</p>
<p>http.DefaultTransport.(*http.Transport).MaxIdleConnsPerHost = 50</p>
</blockquote>
<p>If it is a proxy, but how I can do so that you receive or read the server response sorry I am new to go you would appreciate your help</p></pre>obito02: <pre><p>please helmpe necesito su ayuda </p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传