/normalize-http-proxy

A http proxy server chaining a upstream which needs authentication headers.

Primary LanguageGoGNU General Public License v3.0GPL-3.0

Normalize HTTP Proxy

A http proxy server chaining a upstream which needs authentication headers.

local -> [np] -> upstream -> destination

Usage

  • Normal use
➜  ./np baidu
Normalize Proxy: listens at 127.0.0.1:8888.
Http upstream is http://cloudnproxy.baidu.com:443, extra header(s) is(are):
X-T5-Auth: ZjQxNDIh
Https upstream is http://cloudnproxy.baidu.com:443, extra header(s) is(are):
X-T5-Auth: ZjQxNDIh
Verbose output is off.
➜  curl -x localhost:8888 https://baidu.com
<html>
<head><title>302 Found</title></head>
<body bgcolor="white">
<center><h1>302 Found</h1></center>
<hr><center>bfe/1.0.8.18</center>
</body>
</html>

Credit