Minor Bug fixed

This commit is contained in:
Peng-YM 2020-09-01 20:24:32 +08:00
parent 2d6aa1ef1a
commit 80294618fb
4 changed files with 43 additions and 8 deletions

View File

@ -20,11 +20,7 @@
</component>
<component name="ChangeListManager">
<list default="true" id="8b97a098-48b2-4e64-a9ef-522fe2d30b52" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/sub-store.js" beforeDir="false" afterPath="$PROJECT_DIR$/sub-store.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../web/src/components/ProxyList.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../web/src/components/ProxyList.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../web/src/config.js" beforeDir="false" afterPath="$PROJECT_DIR$/../web/src/config.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../web/src/views/Subscription.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../web/src/views/Subscription.vue" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -95,6 +91,7 @@
<workItem from="1598931009084" duration="2069000" />
<workItem from="1598946261983" duration="463000" />
<workItem from="1598948545209" duration="3969000" />
<workItem from="1598962864003" duration="97000" />
</task>
<servers />
</component>

View File

@ -1692,12 +1692,12 @@ function Raw_Producer() {
/**************************** Operators ***************************************/
// force to set some properties (e.g., scert, udp, tfo, etc.)
function SetPropertyOperator(key, val) {
function SetPropertyOperator({key, value}) {
return {
name: "Set Property Operator",
func: (proxies) => {
return proxies.map((p) => {
p[key] = val;
p[key] = value;
return p;
});
},

38
config/README.md Normal file
View File

@ -0,0 +1,38 @@
# 配置说明
## 脚本配置:
## 1. Loon
1. 推荐直接使用[插件](https://raw.githubusercontent.com/Peng-YM/Sub-Store/master/config/Loon.plugin)。
2. 商店用户可以配置本地脚本和MTIM
```
[MITM]
hostname=sub.store
[Script]
http-request https?:\/\/sub\.store script-path=https://raw.githubusercontent.com/Peng-YM/Sub-Store/master/backend/sub-store.js, requires-body=true, timeout=120, tag=Sub-Store
```
## 2. Surge
目前iOS商店版本的bug未修复暂时无法使用。TF用户直接使用[模块](https://raw.githubusercontent.com/Peng-YM/Sub-Store/master/config/Surge.sgmodule)。
## 3. QX
QX暂时需要通过backend方式使用添加如下配置。注意HTTP backend开关需要打开
```
[http_backend]
https://raw.githubusercontent.com/Peng-YM/Sub-Store/master/backend/sub-store.js, tag=Sub-Store, path=/, enabled=true
```
## 界面配置:
### 1. Loon & Surge
Loon和Surge用户打开这个[页面](https://sub-store.vercel.app/)即可。
### 2. QX
QX用户需要曲线救国使用[JSBox版本]()。

View File

@ -379,7 +379,7 @@ function buildSubscription(options) {
if (options.flag !== 'DEFAULT') {
sub.process.push({
type: "Flag Operator",
args: [options.flag === 'ADD']
args: options.flag === 'ADD'
});
}
// udp, tfo, scert
@ -387,7 +387,7 @@ function buildSubscription(options) {
if (options[opt] !== 'DEFAULT') {
sub.process.push({
type: "Set Property Operator",
args: [opt, options[opt] === 'FORCE_OPEN']
args: {key: opt, value: options[opt] === 'FORCE_OPEN'}
});
}
}