update web ui

This commit is contained in:
OttoMao 2015-07-09 18:51:41 +08:00
parent c80acde287
commit 8b138ffe64
7 changed files with 37 additions and 32 deletions

View File

@ -1,73 +1,73 @@
1 July: anyproxy 3.6.0: 1 July: AnyProxy 3.6.0:
* add a filter on web ui * 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 * 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 * print a hint when using SNI features in node <0.12
* Ref : https://github.com/alibaba/anyproxy/issues/25 * 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. * 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 * 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 * 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 * optimize https features in windows
* add switch to mute the console * 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 * bugfix for internal https server
19 Mar 2015: anyproxy 3.2.4: 19 Mar 2015: AnyProxy 3.2.4:
* bugfix for absolute rule path * 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) * [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 * 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 * 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. * 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 * 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. * 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 * show anyproxy version by --version
12 Jan 2015: anyproxy 3.0.3: 12 Jan 2015: AnyProxy 3.0.3:
* Bugfix: https throttle * 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. * UI improvement: add link and qr code to root CA file.

View File

@ -10,7 +10,7 @@ var mapConfig = [];
module.exports = { module.exports = {
summary:function(){ summary:function(){
var tip = "the default rule for anyproxy which supports CORS. "; var tip = "the default rule for AnyProxy which supports CORS. ";
if(!isRootCAFileExists){ if(!isRootCAFileExists){
tip += "\nRoot CA does not exist, will not intercept any https requests."; tip += "\nRoot CA does not exist, will not intercept any https requests.";
} }
@ -40,13 +40,13 @@ module.exports = {
if(req.method == "OPTIONS"){ if(req.method == "OPTIONS"){
callback(200,mergeCORSHeader(req.headers),""); callback(200,mergeCORSHeader(req.headers),"");
}else if(req.anyproxy_map_local){ }else if(req.anyproxy_map_local){
try{ fs.readFile(req.anyproxy_map_local,function(err,buffer){
var fileContent = fs.readFile(req.anyproxy_map_local,function(err,buffer){ if(err){
callback(200, {}, "[AnyProxy failed to load local file] " + err);
}else{
callback(200, {}, buffer); callback(200, {}, buffer);
});
}catch(e){
callback(200, {}, "failed to load local file :" + req.anyproxy_map_local);
} }
});
} }
}, },

View File

@ -1,6 +1,6 @@
{ {
"name": "anyproxy", "name": "anyproxy",
"version": "3.7.0Beta3", "version": "3.7.0Beta4",
"description": "A fully configurable proxy in NodeJS, which can handle HTTPS requests perfectly.", "description": "A fully configurable proxy in NodeJS, which can handle HTTPS requests perfectly.",
"main": "proxy.js", "main": "proxy.js",
"bin": { "bin": {

View File

@ -9,7 +9,7 @@ module.exports = {
致中文用户中文注释都是只摘要必要时请参阅英文文档欢迎提出修改建议 致中文用户中文注释都是只摘要必要时请参阅英文文档欢迎提出修改建议
*/ */
summary:function(){ summary:function(){
return "this is a blank rule for anyproxy"; return "this is a blank rule for AnyProxy";
}, },

View File

@ -300,12 +300,12 @@ body, html {
margin-top: 20px; margin-top: 20px;
} }
.mapWrapper ul{ .mapWrapper .mapRuleList ul{
list-style: none; list-style: none;
padding-left: 10px; padding-left: 10px;
} }
.mapWrapper li{ .mapWrapper .mapRuleList li{
margin: 10px 0; margin: 10px 0;
} }

View File

@ -29,8 +29,8 @@
</div> </div>
<div class="ctrlWrapper"> <div class="ctrlWrapper">
<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_showFilter"><i class="uk-icon-filter"></i>Filter</span></a>
<span class="J_filterSection" style="display:none">
<a href="#"><span class="topBtn J_showMapPanel"><i class="uk-icon-shield"></i>Map Local</span></a> <a href="#"><span class="topBtn J_showMapPanel"><i class="uk-icon-shield"></i>Map Local</span></a>
<span class="sep">|</span> <span class="sep">|</span>

View File

@ -39,14 +39,19 @@ function init(React){
var self = this, var self = this,
result = {}; result = {};
var filePath = React.findDOMNode(self.refs.localFilePath).value, var filePathInput = React.findDOMNode(self.refs.localFilePath),
keyword = React.findDOMNode(self.refs.keywordInput).value; filePath = filePathInput.value,
keywordInput = React.findDOMNode(self.refs.keywordInput),
keyword = keywordInput.value;
if(filePath && keyword){ if(filePath && keyword){
self.props.onSubmit.call(null,{ self.props.onSubmit.call(null,{
keyword : keyword, keyword : keyword,
local : filePath local : filePath
}); });
filePathInput.value = "";
keywordInput.value = "";
} }
}, },