flying-circus / datacompressionproxy

Automatically exported from code.google.com/p/datacompressionproxy
0 stars 0 forks source link

Generate Chrome-Proxy header #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The DCP relies on a correct Proxy-Authorization header based on a timestamp, 
which is hard-coded for now. We should find out the SPDY_PROXY_AUTH_VALUE and 
dynamically generate the header value, using functions:

ps = function(timestamp) { return timestamp + '-' + rand() + '-' + rand() + '-' 
+ rand() }
sid = function(timestamp) { return md5(timestamp + SPDY_PROXY_AUTH_VALUE + 
timestamp) }
proxyauthvalue = 'SpdyProxy ps="' + ps + '", sid="' + sid + '"'

Source: 
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/net/spdyproxy/dat
a_reduction_proxy_settings.cc#l610

Original issue reported on code.google.com by jerzyglowacki on 17 Feb 2014 at 12:45

GoogleCodeExporter commented 9 years ago
The Chromium source code has been recently updated, the request header value 
will be:

requestHeader = 'Chrome-Proxy: ps=' + session + ', sid=' + credentials + ', v=' 
+ version + ', c=' + client

where:

session = function(timestamp) { return timestamp + '-' + rand() + '-' + rand() 
+ '-' + rand() }
credentials = function(timestamp) { return md5(timestamp + 
SPDY_PROXY_AUTH_VALUE + timestamp) }
varsion = 0
client = 'webview' || 'ios' || 'android'

Source: 
http://src.chromium.org/viewvc/chrome/trunk/src/components/data_reduction_proxy/
browser/data_reduction_proxy_auth_request_handler.cc#l94

Original comment by jerzyglowacki on 25 Jul 2014 at 9:23

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 6dee2fe9f13f.

Original comment by jerzyglowacki on 10 Sep 2014 at 2:11