diff --git a/CHANGELOG b/CHANGELOG index cef0d6b..bf2b8bb 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,73 +1,73 @@ -1 July: anyproxy 3.6.0: +1 July: AnyProxy 3.6.0: * add a filter on web ui -1 July: anyproxy 3.5.2: +1 July: AnyProxy 3.5.2: * optimize the row height on web ui -18 June: anyproxy 3.5.1: +18 June: AnyProxy 3.5.1: * print a hint when using SNI features in node <0.12 * Ref : https://github.com/alibaba/anyproxy/issues/25 -18 June: anyproxy 3.5.0: +18 June: AnyProxy 3.5.0: * it's a formal release of 3.4.0@beta. -27 Apr: anyproxy 3.4.0@beta: +27 Apr: AnyProxy 3.4.0@beta: * optimize web server and web socket interface -20 Apr 2015: anyproxy 3.3.1: +20 Apr 2015: AnyProxy 3.3.1: * now you can assign your own port for web gui -31 Mar 2015: anyproxy 3.3.0: +31 Mar 2015: AnyProxy 3.3.0: * optimize https features in windows * add switch to mute the console -20 Mar 2015: anyproxy 3.2.5: +20 Mar 2015: AnyProxy 3.2.5: * bugfix for internal https server -19 Mar 2015: anyproxy 3.2.4: +19 Mar 2015: AnyProxy 3.2.4: * bugfix for absolute rule path -23 Feb 2015: anyproxy 3.2.2: +23 Feb 2015: AnyProxy 3.2.2: * [bugfix for relative rule path](https://github.com/alibaba/anyproxy/pull/18) -10 Feb 2015: anyproxy 3.2.1: +10 Feb 2015: AnyProxy 3.2.1: * bugfix for 3.2.0 -10 Feb 2015: anyproxy 3.2.0: +10 Feb 2015: AnyProxy 3.2.0: * using SNI when intercepting https requests -28 Jan 2015: anyproxy 3.1.2: +28 Jan 2015: AnyProxy 3.1.2: * thanks to iconv-lite, almost webpage with any charset can be correctly decoded in web interface. -28 Jan 2015: anyproxy 3.1.1: +28 Jan 2015: AnyProxy 3.1.1: * convert GBK to UTF8 in web interface -22 Jan 2015: anyproxy 3.1.0: +22 Jan 2015: AnyProxy 3.1.0: * will NOT intercept https request by default. Use ``anyproxy --intercept`` to turn on this feature. -12 Jan 2015: anyproxy 3.0.4: +12 Jan 2015: AnyProxy 3.0.4: * show anyproxy version by --version -12 Jan 2015: anyproxy 3.0.3: +12 Jan 2015: AnyProxy 3.0.3: * Bugfix: https throttle -9 Jan 2015: anyproxy 3.0.2: +9 Jan 2015: AnyProxy 3.0.2: * UI improvement: add link and qr code to root CA file. \ No newline at end of file diff --git a/lib/rule_default.js b/lib/rule_default.js index 10e71da..81515b4 100644 --- a/lib/rule_default.js +++ b/lib/rule_default.js @@ -10,7 +10,7 @@ var mapConfig = []; module.exports = { summary:function(){ - var tip = "the default rule for anyproxy which supports CORS. "; + var tip = "the default rule for AnyProxy which supports CORS. "; if(!isRootCAFileExists){ tip += "\nRoot CA does not exist, will not intercept any https requests."; } @@ -40,13 +40,13 @@ module.exports = { if(req.method == "OPTIONS"){ callback(200,mergeCORSHeader(req.headers),""); }else if(req.anyproxy_map_local){ - try{ - var fileContent = fs.readFile(req.anyproxy_map_local,function(err,buffer){ + fs.readFile(req.anyproxy_map_local,function(err,buffer){ + if(err){ + callback(200, {}, "[AnyProxy failed to load local file] " + err); + }else{ callback(200, {}, buffer); - }); - }catch(e){ - callback(200, {}, "failed to load local file :" + req.anyproxy_map_local); - } + } + }); } }, diff --git a/package.json b/package.json index 3d731c2..c5c8b2b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "anyproxy", - "version": "3.7.0Beta3", + "version": "3.7.0Beta4", "description": "A fully configurable proxy in NodeJS, which can handle HTTPS requests perfectly.", "main": "proxy.js", "bin": { diff --git a/rule_sample/rule__blank.js b/rule_sample/rule__blank.js index 192ae2c..30d3c54 100644 --- a/rule_sample/rule__blank.js +++ b/rule_sample/rule__blank.js @@ -9,7 +9,7 @@ module.exports = { 致中文用户:中文注释都是只摘要,必要时请参阅英文文档。欢迎提出修改建议。 */ summary:function(){ - return "this is a blank rule for anyproxy"; + return "this is a blank rule for AnyProxy"; }, diff --git a/web/css/page.css b/web/css/page.css index 9ca6908..49ecb60 100644 --- a/web/css/page.css +++ b/web/css/page.css @@ -300,12 +300,12 @@ body, html { margin-top: 20px; } -.mapWrapper ul{ +.mapWrapper .mapRuleList ul{ list-style: none; padding-left: 10px; } -.mapWrapper li{ +.mapWrapper .mapRuleList li{ margin: 10px 0; } diff --git a/web/index.html b/web/index.html index f8848bd..001d880 100644 --- a/web/index.html +++ b/web/index.html @@ -29,8 +29,8 @@ </div> <div class="ctrlWrapper"> + <a href="#"><span class="topBtn J_showFilter"><i class="uk-icon-filter"></i>Filter</span></a> <span class="J_filterSection" style="display:none"> - <a href="#"><span class="topBtn J_showFilter"><i class="uk-icon-filter"></i>Filter</span></a> <a href="#"><span class="topBtn J_showMapPanel"><i class="uk-icon-shield"></i>Map Local</span></a> <span class="sep">|</span> diff --git a/web/src/mapForm.js b/web/src/mapForm.js index d6f10df..4bfb10c 100644 --- a/web/src/mapForm.js +++ b/web/src/mapForm.js @@ -39,14 +39,19 @@ function init(React){ var self = this, result = {}; - var filePath = React.findDOMNode(self.refs.localFilePath).value, - keyword = React.findDOMNode(self.refs.keywordInput).value; + var filePathInput = React.findDOMNode(self.refs.localFilePath), + filePath = filePathInput.value, + keywordInput = React.findDOMNode(self.refs.keywordInput), + keyword = keywordInput.value; if(filePath && keyword){ self.props.onSubmit.call(null,{ keyword : keyword, local : filePath }); + + filePathInput.value = ""; + keywordInput.value = ""; } },