@@ -14,8 +14,8 @@ const defaultJson = `
|
||||
"inbounds": [
|
||||
{
|
||||
"type": "tun",
|
||||
"inet4_address": "172.19.0.1/30",
|
||||
"inet6_address": [
|
||||
"address": [
|
||||
"172.19.0.1/30",
|
||||
"fdfe:dcba:9876::1/126"
|
||||
],
|
||||
"mtu": 9000,
|
||||
@@ -249,8 +249,11 @@ func (j *JsonService) addOthers(jsonConfig *map[string]interface{}) error {
|
||||
if _, ok := othersJson["dns"]; ok {
|
||||
(*jsonConfig)["dns"] = othersJson["dns"]
|
||||
}
|
||||
if _, ok := othersJson["inbounds"]; ok {
|
||||
(*jsonConfig)["inbounds"] = othersJson["inbounds"]
|
||||
}
|
||||
if _, ok := othersJson["experimental"]; ok {
|
||||
(*jsonConfig)["experimental"] = othersJson["lexperimentalog"]
|
||||
(*jsonConfig)["experimental"] = othersJson["experimental"]
|
||||
}
|
||||
if _, ok := othersJson["rule_set"]; ok {
|
||||
route["rule_set"] = othersJson["rule_set"]
|
||||
|
||||
@@ -62,6 +62,48 @@
|
||||
></v-select>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<template v-if="enableInb">
|
||||
<v-row>
|
||||
<v-col cols="12" sm="6" md="3">
|
||||
<v-combobox
|
||||
v-model="inbounds[0].address"
|
||||
:items="defaultInb[0].address"
|
||||
chips
|
||||
multiple
|
||||
hide-details
|
||||
:label="$t('in.addr')"
|
||||
></v-combobox>
|
||||
</v-col>
|
||||
<v-col cols="12" sm="6" md="3" lg="2">
|
||||
<v-text-field
|
||||
type="number"
|
||||
v-model.number="inbounds[0].mtu"
|
||||
hide-details
|
||||
label="MTU"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col cols="12" sm="6" md="3">
|
||||
<v-combobox
|
||||
v-model="inbounds[0].exclude_package"
|
||||
:items="['ir.mci.ecareapp','com.myirancell']"
|
||||
chips
|
||||
multiple
|
||||
hide-details
|
||||
:label="$t('setting.excludePkg')"
|
||||
></v-combobox>
|
||||
</v-col>
|
||||
<v-col cols="12" sm="6" md="3" lg="2">
|
||||
<v-switch
|
||||
v-model="platformProxy"
|
||||
hide-details
|
||||
color="primary"
|
||||
label="Platform HTTP proxy"
|
||||
></v-switch>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-menu v-model="menu" :close-on-content-click="false" location="start">
|
||||
@@ -76,6 +118,9 @@
|
||||
<v-list-item>
|
||||
<v-switch v-model="enableDns" color="primary" label="DNS" hide-details></v-switch>
|
||||
</v-list-item>
|
||||
<v-list-item>
|
||||
<v-switch v-model="enableInb" color="primary" :label="$t('objects.inbound')" hide-details></v-switch>
|
||||
</v-list-item>
|
||||
<v-list-item>
|
||||
<v-switch v-model="enableExp" color="primary" label="Experimental" hide-details></v-switch>
|
||||
</v-list-item>
|
||||
@@ -98,6 +143,36 @@ export default {
|
||||
"level": "info",
|
||||
"timestamp": true
|
||||
},
|
||||
defaultInb: [
|
||||
{
|
||||
"type": "tun",
|
||||
"address": [
|
||||
"172.19.0.1/30",
|
||||
"fdfe:dcba:9876::1/126"
|
||||
],
|
||||
"mtu": 9000,
|
||||
"auto_route": true,
|
||||
"strict_route": false,
|
||||
"sniff": true,
|
||||
"endpoint_independent_nat": false,
|
||||
"stack": "system",
|
||||
"exclude_package": [],
|
||||
"platform": {
|
||||
"http_proxy": {
|
||||
"enabled": true,
|
||||
"server": "127.0.0.1",
|
||||
"server_port": 2080
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "mixed",
|
||||
"listen": "127.0.0.1",
|
||||
"listen_port": 2080,
|
||||
"sniff": true,
|
||||
"users": []
|
||||
}
|
||||
],
|
||||
defaultExp: {
|
||||
"clash_api": {
|
||||
"external_controller": "127.0.0.1:9090",
|
||||
@@ -253,6 +328,10 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
enableInb: {
|
||||
get() :boolean { return this.subJsonExt?.inbounds != undefined },
|
||||
set(v:boolean) { v ? this.subJsonExt.inbounds = this.defaultInb.slice() : delete this.subJsonExt.inbounds }
|
||||
},
|
||||
enableExp: {
|
||||
get() :boolean { return this.subJsonExt?.experimental != undefined },
|
||||
set(v:boolean) { v ? this.subJsonExt.experimental = this.defaultExp : delete this.subJsonExt.experimental }
|
||||
@@ -298,6 +377,11 @@ export default {
|
||||
this.updateRuleSets()
|
||||
}
|
||||
},
|
||||
inbounds():any[] { return this.subJsonExt?.inbounds?? undefined },
|
||||
platformProxy: {
|
||||
get() :boolean { return this.inbounds[0]?.platform != undefined },
|
||||
set(v:boolean) { this.subJsonExt.inbounds[0].platform = v ? this.defaultInb[0].platform : undefined }
|
||||
},
|
||||
rules():any { return this.subJsonExt?.rules?? undefined },
|
||||
ruleToDirect: {
|
||||
get() :string[] {
|
||||
|
||||
@@ -154,6 +154,7 @@ export default {
|
||||
directDns: "Direct DNS",
|
||||
toDirectDns: "Route to Direct DNS",
|
||||
jsonSubOptions: "Other Options",
|
||||
excludePkg: "Exclude Packages",
|
||||
},
|
||||
client: {
|
||||
name: "Name",
|
||||
|
||||
@@ -153,6 +153,7 @@ export default {
|
||||
directDns: "DNS مستقیم",
|
||||
toDirectDns: "هدایت به DNS مستقیم",
|
||||
jsonSubOptions: "گزینههای دیگر",
|
||||
excludePkg: "نرمافزارهای استثنا",
|
||||
},
|
||||
client: {
|
||||
name: "نام",
|
||||
|
||||
@@ -154,6 +154,7 @@ export default {
|
||||
directDns: "Прямой DNS",
|
||||
toDirectDns: "Маршрутизация на Direct DNS",
|
||||
jsonSubOptions: "Другие параметры",
|
||||
excludePkg: "Исключить пакеты",
|
||||
},
|
||||
client: {
|
||||
name: "Имя",
|
||||
|
||||
@@ -154,6 +154,7 @@ export default {
|
||||
directDns: "DNS Trực tiếp",
|
||||
toDirectDns: "Chuyển hướng tới DNS Trực tiếp",
|
||||
jsonSubOptions: "Tùy chọn Khác",
|
||||
excludePkg: "Loại trừ Gói",
|
||||
},
|
||||
client: {
|
||||
name: "Tên",
|
||||
|
||||
@@ -154,6 +154,7 @@ export default {
|
||||
directDns: "直连 DNS",
|
||||
toDirectDns: "路由到直连 DNS",
|
||||
jsonSubOptions: "其他选项",
|
||||
excludePkg: "排除包",
|
||||
},
|
||||
client: {
|
||||
name: "名称",
|
||||
|
||||
@@ -155,6 +155,7 @@ export default {
|
||||
directDns: "直連 DNS",
|
||||
toDirectDns: "路由到直連 DNS",
|
||||
jsonSubOptions: "其他選項",
|
||||
excludePkg: "排除包",
|
||||
},
|
||||
client: {
|
||||
name: "名稱",
|
||||
|
||||
Reference in New Issue
Block a user