Skip to content

Commit fa9ce05

Browse files
committed
custom
1 parent 918a92a commit fa9ce05

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"version": "0.1.0",
44
"private": true,
55
"scripts": {
6-
"serve": "vue-cli-service serve",
7-
"build": "vue-cli-service build",
6+
"serve": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
7+
"build": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
88
"lint": "vue-cli-service lint"
99
},
1010
"dependencies": {

src/views/Subconverter.vue

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@
7878
</el-popover>
7979
<el-popover placement="bottom" style="margin-left: 10px">
8080
<el-row>
81-
<el-checkbox v-model="form.tpl.surge.doh" label="Surge.DoH"></el-checkbox>
81+
<el-checkbox v-model="form.tpl.clash.doh" label="Clash.DoH"></el-checkbox>
8282
</el-row>
8383
<el-row>
84-
<el-checkbox v-model="form.tpl.clash.doh" label="Clash.DoH"></el-checkbox>
84+
<el-checkbox v-model="form.tpl.provider.expand" label="provider模式"></el-checkbox>
8585
</el-row>
8686
<el-row>
87-
<el-checkbox v-model="form.insert" label="网易云"></el-checkbox>
87+
<el-checkbox v-model="form.tpl.surge.doh" label="Surge.DoH"></el-checkbox>
8888
</el-row>
8989
<el-button slot="reference">定制功能</el-button>
9090
</el-popover>
@@ -210,11 +210,16 @@ export default {
210210
ClashR: "clashr",
211211
Surge2: "surge&ver=2",
212212
},
213-
backendOptions: [{ value: "http://127.0.0.1:25500/sub?" }],
213+
backendOptions: [{ value: "http://127.0.0.1:25500/sub?" }, {value: "https://sub.085404.xyz/sub?"}],
214214
remoteConfig: [
215215
{
216216
label: "universal",
217217
options: [
218+
{
219+
label: "sun2ot",
220+
value:
221+
"https://raw.githubusercontent.com/sun2ot/ClashRules/main/config/test.ini"
222+
},
218223
{
219224
label: "No-Urltest",
220225
value:
@@ -310,7 +315,10 @@ export default {
310315
doh: false // dns 查询是否使用 DoH
311316
},
312317
clash: {
313-
doh: false
318+
doh: true
319+
},
320+
provider: {
321+
expand: true // 是否将规则列表以provider形式附加到配置文件中
314322
}
315323
}
316324
},
@@ -451,7 +459,11 @@ export default {
451459
452460
if (this.form.clientType === "clash") {
453461
if (this.form.tpl.clash.doh === true) {
454-
this.customSubUrl += "&clash.doh=true";
462+
this.customSubUrl += "&clash.dns=1";
463+
}
464+
if (this.form.tpl.expand === true) {
465+
// urlencode 中, expand=false 表示 provider 模式
466+
this.customSubUrl += "&expand=false";
455467
}
456468
457469
this.customSubUrl += "&new_name=" + this.form.new_name.toString();
@@ -625,6 +637,7 @@ export default {
625637
this.form.udp = params.get("udp") === "true";
626638
this.form.tpl.surge.doh = params.get("surge.doh") === "true";
627639
this.form.tpl.clash.doh = params.get("clash.doh") === "true";
640+
this.form.tpl.expand = params.get("expand") === "true";
628641
this.form.new_name = params.get("new_name") === "true";
629642
630643
// Hide the configuration dialog

0 commit comments

Comments
 (0)