mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-10-13 11:39:13 +00:00
fragment : MaxSplit
This commit is contained in:
parent
2eb9d2e2e8
commit
8153e0ac05
2 changed files with 37 additions and 19 deletions
|
@ -9,19 +9,20 @@
|
||||||
<a-spin :spinning="loadingStates.spinning" :delay="500" tip='{{ i18n "loading"}}'>
|
<a-spin :spinning="loadingStates.spinning" :delay="500" tip='{{ i18n "loading"}}'>
|
||||||
<transition name="list" appear>
|
<transition name="list" appear>
|
||||||
<a-alert type="error" v-if="confAlerts.length>0 && loadingStates.fetched" :style="{ marginBottom: '10px' }"
|
<a-alert type="error" v-if="confAlerts.length>0 && loadingStates.fetched" :style="{ marginBottom: '10px' }"
|
||||||
message='{{ i18n "secAlertTitle" }}'
|
message='{{ i18n "secAlertTitle" }}' color="red" show-icon closable>
|
||||||
color="red"
|
|
||||||
show-icon closable>
|
|
||||||
<template slot="description">
|
<template slot="description">
|
||||||
<b>{{ i18n "secAlertConf" }}</b>
|
<b>{{ i18n "secAlertConf" }}</b>
|
||||||
<ul><li v-for="a in confAlerts">[[ a ]]</li></ul>
|
<ul>
|
||||||
|
<li v-for="a in confAlerts">[[ a ]]</li>
|
||||||
|
</ul>
|
||||||
</template>
|
</template>
|
||||||
</a-alert>
|
</a-alert>
|
||||||
</transition>
|
</transition>
|
||||||
<transition name="list" appear>
|
<transition name="list" appear>
|
||||||
<template>
|
<template>
|
||||||
<a-row v-if="!loadingStates.fetched">
|
<a-row v-if="!loadingStates.fetched">
|
||||||
<a-card :style="{ textAlign: 'center', padding: '30px 0', marginTop: '10px', background: 'transparent', border: 'none' }">
|
<a-card
|
||||||
|
:style="{ textAlign: 'center', padding: '30px 0', marginTop: '10px', background: 'transparent', border: 'none' }">
|
||||||
<a-spin tip='{{ i18n "loading" }}'></a-spin>
|
<a-spin tip='{{ i18n "loading" }}'></a-spin>
|
||||||
</a-card>
|
</a-card>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
@ -31,17 +32,19 @@
|
||||||
<a-row :style="{ display: 'flex', flexWrap: 'wrap', alignItems: 'center' }">
|
<a-row :style="{ display: 'flex', flexWrap: 'wrap', alignItems: 'center' }">
|
||||||
<a-col :xs="24" :sm="10" :style="{ padding: '4px' }">
|
<a-col :xs="24" :sm="10" :style="{ padding: '4px' }">
|
||||||
<a-space direction="horizontal">
|
<a-space direction="horizontal">
|
||||||
<a-button type="primary" :disabled="saveBtnDisable" @click="updateAllSetting">{{ i18n "pages.settings.save" }}</a-button>
|
<a-button type="primary" :disabled="saveBtnDisable" @click="updateAllSetting">{{ i18n
|
||||||
<a-button type="danger" :disabled="!saveBtnDisable" @click="restartPanel">{{ i18n "pages.settings.restartPanel" }}</a-button>
|
"pages.settings.save" }}</a-button>
|
||||||
|
<a-button type="danger" :disabled="!saveBtnDisable" @click="restartPanel">{{ i18n
|
||||||
|
"pages.settings.restartPanel" }}</a-button>
|
||||||
</a-space>
|
</a-space>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xs="24" :sm="14">
|
<a-col :xs="24" :sm="14">
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<a-back-top :target="() => document.getElementById('content-layout')" visibility-height="200"></a-back-top>
|
<a-back-top :target="() => document.getElementById('content-layout')"
|
||||||
|
visibility-height="200"></a-back-top>
|
||||||
<a-alert type="warning" :style="{ float: 'right', width: 'fit-content' }"
|
<a-alert type="warning" :style="{ float: 'right', width: 'fit-content' }"
|
||||||
message='{{ i18n "pages.settings.infoDesc" }}'
|
message='{{ i18n "pages.settings.infoDesc" }}' show-icon>
|
||||||
show-icon>
|
|
||||||
</a-alert>
|
</a-alert>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -132,7 +135,8 @@
|
||||||
fragment: {
|
fragment: {
|
||||||
packets: "tlshello",
|
packets: "tlshello",
|
||||||
length: "100-200",
|
length: "100-200",
|
||||||
interval: "10-20"
|
interval: "10-20",
|
||||||
|
maxSplit: "300-400"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
streamSettings: {
|
streamSettings: {
|
||||||
|
@ -381,11 +385,11 @@
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
ldapInboundTagList: {
|
ldapInboundTagList: {
|
||||||
get: function() {
|
get: function () {
|
||||||
const csv = this.allSetting.ldapInboundTags || "";
|
const csv = this.allSetting.ldapInboundTags || "";
|
||||||
return csv.length ? csv.split(',').map(s => s.trim()).filter(Boolean) : [];
|
return csv.length ? csv.split(',').map(s => s.trim()).filter(Boolean) : [];
|
||||||
},
|
},
|
||||||
set: function(list) {
|
set: function (list) {
|
||||||
this.allSetting.ldapInboundTags = Array.isArray(list) ? list.join(',') : '';
|
this.allSetting.ldapInboundTags = Array.isArray(list) ? list.join(',') : '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -425,6 +429,16 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
fragmentMaxSplit: {
|
||||||
|
get: function () { return this.fragment ? JSON.parse(this.allSetting.subJsonFragment).settings.fragment.maxSplit : ""; },
|
||||||
|
set: function (v) {
|
||||||
|
if (v != "") {
|
||||||
|
newFragment = JSON.parse(this.allSetting.subJsonFragment);
|
||||||
|
newFragment.settings.fragment.maxSplit = v;
|
||||||
|
this.allSetting.subJsonFragment = JSON.stringify(newFragment);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
noises: {
|
noises: {
|
||||||
get() {
|
get() {
|
||||||
return this.allSetting?.subJsonNoises != "";
|
return this.allSetting?.subJsonNoises != "";
|
||||||
|
|
|
@ -5,13 +5,10 @@
|
||||||
<template #title>{{ i18n "pages.settings.subPath"}}</template>
|
<template #title>{{ i18n "pages.settings.subPath"}}</template>
|
||||||
<template #description>{{ i18n "pages.settings.subPathDesc"}}</template>
|
<template #description>{{ i18n "pages.settings.subPathDesc"}}</template>
|
||||||
<template #control>
|
<template #control>
|
||||||
<a-input
|
<a-input type="text" v-model="allSetting.subJsonPath"
|
||||||
type="text"
|
|
||||||
v-model="allSetting.subJsonPath"
|
|
||||||
@input="allSetting.subJsonPath = ((typeof $event === 'string' ? $event : ($event && $event.target ? $event.target.value : '')) || '').replace(/[:*]/g, '')"
|
@input="allSetting.subJsonPath = ((typeof $event === 'string' ? $event : ($event && $event.target ? $event.target.value : '')) || '').replace(/[:*]/g, '')"
|
||||||
@blur="allSetting.subJsonPath = (p => { p = p || '/'; if (!p.startsWith('/')) p='/' + p; if (!p.endsWith('/')) p += '/'; return p.replace(/\/+/g,'/'); })(allSetting.subJsonPath)"
|
@blur="allSetting.subJsonPath = (p => { p = p || '/'; if (!p.startsWith('/')) p='/' + p; if (!p.endsWith('/')) p += '/'; return p.replace(/\/+/g,'/'); })(allSetting.subJsonPath)"
|
||||||
placeholder="/json/"
|
placeholder="/json/"></a-input>
|
||||||
></a-input>
|
|
||||||
</template>
|
</template>
|
||||||
</a-setting-list-item>
|
</a-setting-list-item>
|
||||||
<a-setting-list-item paddings="small">
|
<a-setting-list-item paddings="small">
|
||||||
|
@ -53,6 +50,12 @@
|
||||||
<a-input type="text" v-model="fragmentInterval" placeholder="10-20"></a-input>
|
<a-input type="text" v-model="fragmentInterval" placeholder="10-20"></a-input>
|
||||||
</template>
|
</template>
|
||||||
</a-setting-list-item>
|
</a-setting-list-item>
|
||||||
|
<a-setting-list-item paddings="small">
|
||||||
|
<template #title>MaxSplit</template>
|
||||||
|
<template #control>
|
||||||
|
<a-input type="text" v-model="fragmentMaxSplit" placeholder="300-400"></a-input>
|
||||||
|
</template>
|
||||||
|
</a-setting-list-item>
|
||||||
</a-collapse-panel>
|
</a-collapse-panel>
|
||||||
</a-collapse>
|
</a-collapse>
|
||||||
</a-list-item>
|
</a-list-item>
|
||||||
|
@ -74,7 +77,8 @@
|
||||||
<a-select :value="noise.type" :style="{ width: '100%' }"
|
<a-select :value="noise.type" :style="{ width: '100%' }"
|
||||||
:dropdown-class-name="themeSwitcher.currentTheme"
|
:dropdown-class-name="themeSwitcher.currentTheme"
|
||||||
@change="(value) => updateNoiseType(index, value)">
|
@change="(value) => updateNoiseType(index, value)">
|
||||||
<a-select-option :value="p" :label="p" v-for="p in ['rand', 'base64', 'str', 'hex']" :key="p">
|
<a-select-option :value="p" :label="p" v-for="p in ['rand', 'base64', 'str', 'hex']"
|
||||||
|
:key="p">
|
||||||
<span>[[ p ]]</span>
|
<span>[[ p ]]</span>
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
|
|
Loading…
Reference in a new issue