Page 1 of 1

關於 HTTP 持久連線的問題

Posted: Nov 08 2010, 16:44
by AlanLive
Proxomitron 的設置裡面的 HTTP 標籤,有一項 Local connections persist for ___ seconds
在 default.cfg 裡面這個項目被叫做 ClientTimeout ( 不知為何名稱不同 )
這是否就是指 "持久/永久連接時間" ? ( persistent-connections )

預設保持 20 秒,但 Proxomitron 只有我在用,所以將秒數調高 ( 例如 2592000 秒,也就是一個月 )
我的想法是,讓瀏覽器跟 Proxomitron 之間儘量保持著連線,將資料傳輸發揮到最佳

問題是不勾選這個項目的效果,是否等於"無限制秒數"? 或者是等於取消這個永久連線的功能?
因為如果是前者,那就不需要輸入任何數字也能達到我要的效果

另外能不能看出 Active connections 是由哪個網站發出來的?
有時看到佔用了連線,但不清楚是否是由自己的機器/瀏覽器發出去的

Re: 關於 HTTP 持久連線的問題

Posted: Nov 08 2010, 17:54
by red
这个参数作用见changelog
Added persistent connection support to local connections as well as remote. For best results make sure your browser is set to use HTTP/1.1 through the proxy and has pipelining enabled (if it's an
option). Also I recommend about 6-8 simultaneous connections. With this, Proxomitron now supports nearly all of HTTP/1.1's optional features.
关闭了就只使用http/1.0。设太高也没有用,服务器端也会有个timeout值
查看Active connections ,用Recent URLs,state reloading

Re: 關於 HTTP 持久連線的問題

Posted: Nov 08 2010, 19:19
by AlanLive
所以取消勾選的話,下方的 Send only HTTP/1.0 requests 無論有無勾選,都強制變成 http 1.0 ?
另外這個跟服務器端的 timeout 有關係?

因為我的想法是讓 Browser ←→ Proxomitron 這一段儘量保持連線
而我的網路環境是 Browser → Proxomitron → Squid → Internet
所以 Proxomitron 後端就算全部 timeout,只要跟前端 (瀏覽器) 保持著連線就行
我的想法是這樣,難道有理解錯誤的地方嗎?

莫非是 Internet 上的伺服器 timeout,前面也會跟著斷?

Re: 關於 HTTP 持久連線的問題

Posted: Nov 08 2010, 20:05
by red
更正下,取消勾选,使用HTTP/1.1 with pipelining disabled
这个参数不只影响本地
Added persistent connection support to local connections as well as remote
服务器都不响应了,Browser ←→ Proxomitron 保持连接又有什么用,只会重新发出请求
你既然使用了Squid,可以做cache

Re: 關於 HTTP 持久連線的問題

Posted: Nov 08 2010, 22:13
by AlanLive
用這個網站檢測 Proxy Server 的質量
http://taruo.net/e/

勾選 Local connections persist for → 將 Proxomitron 當作 Proxy 判斷 (評價 A)
取消勾選 Local connections persist for → 將 Proxomitron 不當作 Proxy 判斷

以上是不經過 Squid 的結果,請問是什麼原因造成如此差異呢?

Re: 關於 HTTP 持久連線的問題

Posted: Nov 08 2010, 22:35
by AlanLive
取消 Local connections persist for 貌似違背 RFC2616 http 1.1 協議標準
所以開啟這個選項還是比較合理的

Re: 關於 HTTP 持久連線的問題

Posted: Nov 08 2010, 22:46
by red
这类网址并不一定准,不知道其判断标准
http://www.proxyblind.org/proxy-anonymous-checker.shtml检测,就会发现2种结果都是no proxy。关注下Result headers。会发现在勾选的情况下有如下说明,猜测你给出的网站也许有基于这点判断的
Apart from that, The "HTTP_CONNECTION" header is missing, which may happen with some browsers like Lynx, but it could be an indicator for a proxy, too.
另这个选项建议勾选上