Browse Source

Add Clash new name

develop
CareyWong 4 years ago
parent
commit
e5db19bcf6
  1. 32
      src/views/Subconverter.vue

32
src/views/Subconverter.vue

@ -79,6 +79,9 @@
<el-checkbox v-model="form.nodeList" label="输出为 Node List" border></el-checkbox>
</el-col>
<el-popover placement="bottom" v-model="form.extraset">
<el-row>
<el-checkbox v-model="form.new_name" label="Clash New Field"></el-checkbox>
</el-row>
<el-row>
<el-checkbox v-model="form.udp" label="启用 UDP"></el-checkbox>
</el-row>
@ -298,6 +301,16 @@ export default {
value:
"https://subconverter.oss-ap-southeast-1.aliyuncs.com/Rules/RemoteConfig/customized/nexitally.ini"
},
{
label: "SoCloud",
value:
"https://subconverter.oss-ap-southeast-1.aliyuncs.com/Rules/RemoteConfig/customized/socloud.ini"
},
{
label: "ARK",
value:
"https://subconverter.oss-ap-southeast-1.aliyuncs.com/Rules/RemoteConfig/customized/ark.ini"
},
{
label: "贼船",
value:
@ -307,11 +320,6 @@ export default {
label: "布丁",
value:
"https://subconverter.oss-ap-southeast-1.aliyuncs.com/Rules/RemoteConfig/customized/pud.ini"
},
{
label: "SoCloud",
value:
"https://subconverter.oss-ap-southeast-1.aliyuncs.com/Rules/RemoteConfig/customized/socloud.ini"
}
]
},
@ -349,7 +357,8 @@ export default {
scv: false,
fdn: false,
appendType: false,
insert: false, // insert_url
insert: true, // insert_url
new_name: true, // 使 Clash
// tpl
tpl: {
@ -439,8 +448,8 @@ export default {
"target=" +
this.form.clientType +
"&url=" +
encodeURIComponent(sourceSub) +
"&insert=" +
encodeURIComponent(sourceSub) +
"&insert=" +
this.form.insert;
if (this.advanced === "2") {
@ -484,8 +493,9 @@ export default {
if (this.form.tpl.surge.doh === true) {
this.customSubUrl += "&surge.doh=true";
}
if (this.form.tpl.clash.doh === true) {
this.customSubUrl += "&clash.doh=true";
if (this.form.clientType === "clash") {
this.customSubUrl += "&new_name=" + this.form.new_name.toString();
}
}
@ -604,7 +614,7 @@ export default {
this.backendVersion = res.data.replace(/backend\n$/gm, "");
this.backendVersion = this.backendVersion.replace("subconverter", "");
});
},
}
}
};
</script>

Loading…
Cancel
Save