Skip to content

Commit f44b686

Browse files
committed
Squashed 'vendor/whistle/' changes from 5ae0a8249..e9bd8f6d5
e9bd8f6d5 Release v2.9.72 1a861f604 Release v2.9.72 cccbd5d3b fix: the client ip of socks proxy 74b377f7a Release v2.9.71 0bb5c2bf9 refactor: refine ui 508ed0506 feat: emit change 9673e30d8 feat: support deflate compress 91b3cc726 docs: update 48da45bc4 chore: fix doc git-subtree-dir: vendor/whistle git-subtree-split: e9bd8f6d571598726392a4f46a5745ff3015d2ac
1 parent 1647e6a commit f44b686

File tree

122 files changed

+755
-281
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+755
-281
lines changed

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# v2.9.72
2+
1. fix: socks 代理无法获取 clientIp 及 IPv6 转发问题
3+
4+
# v2.9.71
5+
1. feat: 自动更新 Rules & Values
6+
2. feat: Mock 对话框新增 Create 按钮
7+
8+
19
# v2.9.70
210
1. feat: 插件列表添加自定义右键菜单
311
2. feat: 支持通过 `pattern jsAppend://[value|file|url] linePropslineProps://nomodule lineProps://module lineProps://defer lineProps://async lineProps://crossorigin` 设置标签属性
@@ -966,7 +974,7 @@
966974
}]}}
967975
```
968976
> 如果不希望进行自动转义,可以使用双引号 `"[xxx.yyy[n]]"`
969-
2. feat: 添加在域名中 `.` 匹配模式
977+
2. feat: 添加在域名中 `.` 匹配方式
970978
``` txt
971979
.test.com 表示匹配 x.test.com 与 test.com
972980
*.test.com 表示匹配 x.test.com,不匹配 test.com

biz/webui/cgi-bin/rules/add.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports = function(req, res) {
2121
rules.moveToTop(body.name, body.clientId);
2222
} else if (!exists) {
2323
var group = rules.getFirstGroup();
24-
group && rules.moveTo(body.name, group.name, body.clientId);
24+
group && rules.moveTo(body.name, group.name, body.clientId, null, true);
2525
}
2626
}
2727
body.selected && rules.select(body.name);

biz/webui/cgi-bin/rules/allow-multiple-choice.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
var properties = require('../../../../lib/rules/util').properties;
2+
var proxy = require('../../lib/proxy');
23

34
module.exports = function(req, res) {
4-
properties.set('allowMultipleChoice', req.body.allowMultipleChoice == 1);
5+
var enable = req.body.allowMultipleChoice == 1;
6+
properties.set('allowMultipleChoice', enable);
7+
proxy.emit('rulesDataChange', 'allowMultipleChoice', enable);
58
res.json({ec: 0, em: 'success'});
69
};
710

biz/webui/cgi-bin/rules/select.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@ var rules = require('../../../../lib/rules/util').rules;
22

33
module.exports = function(req, res) {
44
var body = req.body;
5-
rules.add(body.name, body.value, body.clientId);
5+
var exists = rules.exists(body.name);
6+
var changed;
7+
if (rules.add(body.name, body.value, body.clientId) && !exists) {
8+
var group = rules.getFirstGroup();
9+
if (group) {
10+
rules.moveTo(body.name, group.name, body.clientId, null, true);
11+
changed = true;
12+
}
13+
}
614
rules.select(req.body.name);
7-
res.json({ec: 0, em: 'success', defaultRulesIsDisabled: rules.defaultRulesIsDisabled(), list: rules.getSelectedList()});
15+
res.json({ec: 0, em: 'success', defaultRulesIsDisabled: rules.defaultRulesIsDisabled(), list: rules.getSelectedList(), changed: changed});
816
};

biz/webui/cgi-bin/values/add.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module.exports = function(req, res) {
1515
values.moveToGroup(body.name, body.groupName);
1616
} else if (!exists) {
1717
var group = values.getFirstGroup();
18-
group && values.moveTo(body.name, group.name, body.clientId);
18+
group && values.moveTo(body.name, group.name, body.clientId, null, true);
1919
}
2020
}
2121
if (req.body.recycleFilename) {

biz/webui/htdocs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
</head>
99
<body style="overscroll-behavior-x: none;">
1010
<div id="container" class="main"></div>
11-
<script src="js/index.js?v=2.9.70"></script>
11+
<script src="js/index.js?v=2.9.72"></script>
1212
</body>
1313
</html>

biz/webui/htdocs/js/index.js

Lines changed: 38 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

biz/webui/htdocs/src/css/composer.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,8 @@ textarea.w-composer-rules {
290290
.w-detail-composer input:read-only,
291291
.w-detail-composer input[readonly],
292292
.w-composer-rules textarea:disabled,
293-
.w-composer-rules textarea[readonly] {
293+
.w-composer-rules textarea[readonly],
294+
.w-mock-key-name[readonly] {
294295
background: #eee !important;
295296
color: #999 !important;
296297
cursor: default;

biz/webui/htdocs/src/css/list-dialog.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
margin-right: 5px;
1111
}
1212
.w-list-dialog {
13-
width: 880px;
13+
width: 900px;
1414
}
1515
.w-list-dialog .w-list-wrapper {
1616
max-height: 360px;

biz/webui/htdocs/src/css/tools.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@
467467
display: inline-block;
468468
width: 16px;
469469
top: 12px;
470-
right: 18px;
470+
right: 15px;
471471
color: #747474;
472472
cursor: pointer;
473473
}

0 commit comments

Comments
 (0)