TLS: Remove ECH Force Query
This commit is contained in:
@@ -1,67 +1,31 @@
|
||||
{{define "form/externalProxy"}}
|
||||
<a-form
|
||||
:colon="false"
|
||||
:label-col="{ md: {span:8} }"
|
||||
:wrapper-col="{ md: {span:14} }"
|
||||
>
|
||||
<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
|
||||
<a-divider :style="{ margin: '5px 0 0' }"></a-divider>
|
||||
<a-form-item label="External Proxy">
|
||||
<a-switch v-model="externalProxy"></a-switch>
|
||||
<a-button
|
||||
icon="plus"
|
||||
v-if="externalProxy"
|
||||
type="primary"
|
||||
:style="{ marginLeft: '10px' }"
|
||||
size="small"
|
||||
@click="inbound.stream.externalProxy.push({forceTls: 'same', dest: '', port: 443, remark: ''})"
|
||||
></a-button>
|
||||
<a-button icon="plus" v-if="externalProxy" type="primary" :style="{ marginLeft: '10px' }" size="small"
|
||||
@click="inbound.stream.externalProxy.push({forceTls: 'same', dest: '', port: 443, remark: ''})"></a-button>
|
||||
</a-form-item>
|
||||
<a-input-group
|
||||
:style="{ margin: '8px 0' }"
|
||||
compact
|
||||
v-for="(row, index) in inbound.stream.externalProxy"
|
||||
>
|
||||
<a-input-group :style="{ margin: '8px 0' }" compact v-for="(row, index) in inbound.stream.externalProxy">
|
||||
<template>
|
||||
<a-tooltip title="Force TLS">
|
||||
<a-select
|
||||
v-model="row.forceTls"
|
||||
:style="{ width: '20%', margin: '0px' }"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme"
|
||||
>
|
||||
<a-select-option value="same"
|
||||
>{{ i18n "pages.inbounds.same" }}</a-select-option
|
||||
>
|
||||
<a-select v-model="row.forceTls" :style="{ width: '20%', margin: '0px' }"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme">
|
||||
<a-select-option value="same">{{ i18n "pages.inbounds.same" }}</a-select-option>
|
||||
<a-select-option value="none">{{ i18n "none" }}</a-select-option>
|
||||
<a-select-option value="tls">TLS</a-select-option>
|
||||
</a-select>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<a-input
|
||||
:style="{ width: '30%' }"
|
||||
v-model.trim="row.dest"
|
||||
placeholder='{{ i18n "host" }}'
|
||||
></a-input>
|
||||
<a-input :style="{ width: '30%' }" v-model.trim="row.dest" placeholder='{{ i18n "host" }}'></a-input>
|
||||
<a-tooltip title='{{ i18n "pages.inbounds.port" }}'>
|
||||
<a-input-number
|
||||
:style="{ width: '15%' }"
|
||||
v-model.number="row.port"
|
||||
min="1"
|
||||
max="65535"
|
||||
></a-input-number>
|
||||
<a-input-number :style="{ width: '15%' }" v-model.number="row.port" min="1" max="65535"></a-input-number>
|
||||
</a-tooltip>
|
||||
<a-input
|
||||
:style="{ width: '30%', top: '0' }"
|
||||
v-model.trim="row.remark"
|
||||
placeholder='{{ i18n "remark" }}'
|
||||
>
|
||||
<a-input :style="{ width: '30%', top: '0' }" v-model.trim="row.remark" placeholder='{{ i18n "remark" }}'>
|
||||
<template slot="addonAfter">
|
||||
<a-button
|
||||
icon="minus"
|
||||
size="small"
|
||||
@click="inbound.stream.externalProxy.splice(index, 1)"
|
||||
></a-button>
|
||||
<a-button icon="minus" size="small" @click="inbound.stream.externalProxy.splice(index, 1)"></a-button>
|
||||
</template>
|
||||
</a-input>
|
||||
</a-input-group>
|
||||
</a-form>
|
||||
{{end}}
|
||||
{{end}}
|
||||
@@ -1,446 +1,339 @@
|
||||
{{define "form/streamFinalMask"}}
|
||||
<a-form
|
||||
:colon="false"
|
||||
:label-col="{ md: {span:8} }"
|
||||
:wrapper-col="{ md: {span:14} }"
|
||||
v-if="inbound.protocol == Protocols.HYSTERIA || ['kcp', 'xhttp', 'raw', 'tcp', 'httpupgrade', 'ws', 'grpc'].includes(inbound.stream.network)"
|
||||
>
|
||||
<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }"
|
||||
v-if="inbound.protocol == Protocols.HYSTERIA || ['kcp', 'xhttp', 'raw', 'tcp', 'httpupgrade', 'ws', 'grpc'].includes(inbound.stream.network)">
|
||||
<a-divider :style="{ margin: '5px 0 0' }"></a-divider>
|
||||
|
||||
<!-- TCP Masks – for raw/tcp/httpupgrade/ws/grpc/xhttp -->
|
||||
<template v-if="['raw', 'tcp', 'httpupgrade', 'ws', 'grpc', 'xhttp'].includes(inbound.stream.network)">
|
||||
<a-form-item label="TCP Masks">
|
||||
<a-button
|
||||
icon="plus"
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="inbound.stream.addTcpMask('fragment')"
|
||||
></a-button>
|
||||
</a-form-item>
|
||||
<template v-if="inbound.stream.finalmask.tcp && inbound.stream.finalmask.tcp.length > 0">
|
||||
<a-form
|
||||
v-for="(mask, index) in inbound.stream.finalmask.tcp"
|
||||
:key="index"
|
||||
:colon="false"
|
||||
:label-col="{ md: {span:8} }"
|
||||
:wrapper-col="{ md: {span:14} }"
|
||||
>
|
||||
<a-divider :style="{ margin: '0' }">
|
||||
TCP Mask [[ index + 1 ]]
|
||||
<a-icon
|
||||
type="delete"
|
||||
@click="() => inbound.stream.delTcpMask(index)"
|
||||
:style="{ color: 'rgb(255, 77, 79)', cursor: 'pointer' }"
|
||||
></a-icon>
|
||||
</a-divider>
|
||||
<a-form-item label='{{ i18n "pages.xray.outbound.type" }}'>
|
||||
<a-select
|
||||
v-model="mask.type"
|
||||
@change="(type) => { mask.settings = mask._getDefaultSettings(type, {}); }"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme"
|
||||
>
|
||||
<a-select-option value="fragment">Fragment</a-select-option>
|
||||
<a-select-option value="header-custom">Header Custom</a-select-option>
|
||||
<a-select-option value="sudoku">Sudoku</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
|
||||
<!-- Fragment settings -->
|
||||
<template v-if="mask.type === 'fragment'">
|
||||
<a-form-item label="Packets">
|
||||
<a-select
|
||||
v-model="mask.settings.packets"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme"
|
||||
>
|
||||
<a-select-option value="tlshello">tlshello</a-select-option>
|
||||
<a-select-option value="1-3">1-3</a-select-option>
|
||||
<a-select-option value="1-5">1-5</a-select-option>
|
||||
<a-form-item label="TCP Masks">
|
||||
<a-button icon="plus" type="primary" size="small" @click="inbound.stream.addTcpMask('fragment')"></a-button>
|
||||
</a-form-item>
|
||||
<template v-if="inbound.stream.finalmask.tcp && inbound.stream.finalmask.tcp.length > 0">
|
||||
<a-form v-for="(mask, index) in inbound.stream.finalmask.tcp" :key="index" :colon="false"
|
||||
:label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
|
||||
<a-divider :style="{ margin: '0' }">
|
||||
TCP Mask [[ index + 1 ]]
|
||||
<a-icon type="delete" @click="() => inbound.stream.delTcpMask(index)"
|
||||
:style="{ color: 'rgb(255, 77, 79)', cursor: 'pointer' }"></a-icon>
|
||||
</a-divider>
|
||||
<a-form-item label='{{ i18n "pages.xray.outbound.type" }}'>
|
||||
<a-select v-model="mask.type" @change="(type) => { mask.settings = mask._getDefaultSettings(type, {}); }"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme">
|
||||
<a-select-option value="fragment">Fragment</a-select-option>
|
||||
<a-select-option value="header-custom">Header Custom</a-select-option>
|
||||
<a-select-option value="sudoku">Sudoku</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item label="Length">
|
||||
<a-input v-model.trim="mask.settings.length" placeholder="e.g. 100-200" />
|
||||
</a-form-item>
|
||||
<a-form-item label="Delay">
|
||||
<a-input v-model.trim="mask.settings.delay" placeholder="e.g. 10-20" />
|
||||
</a-form-item>
|
||||
<a-form-item label="Max Split">
|
||||
<a-input v-model.trim="mask.settings.maxSplit" placeholder="e.g. 3-6" />
|
||||
</a-form-item>
|
||||
</template>
|
||||
|
||||
<!-- Sudoku settings (TCP) -->
|
||||
<template v-if="mask.type === 'sudoku'">
|
||||
<a-form-item label="Password">
|
||||
<a-input v-model.trim="mask.settings.password" placeholder="Obfuscation password" />
|
||||
</a-form-item>
|
||||
<a-form-item label="ASCII">
|
||||
<a-input v-model.trim="mask.settings.ascii" placeholder="ASCII" />
|
||||
</a-form-item>
|
||||
<a-form-item label="Custom Table">
|
||||
<a-input v-model.trim="mask.settings.customTable" placeholder="Custom Table" />
|
||||
</a-form-item>
|
||||
<a-form-item label="Custom Tables">
|
||||
<a-input v-model.trim="mask.settings.customTables" placeholder="Custom Tables" />
|
||||
</a-form-item>
|
||||
<a-form-item label="Padding Min">
|
||||
<a-input-number v-model.number="mask.settings.paddingMin" :min="0" />
|
||||
</a-form-item>
|
||||
<a-form-item label="Padding Max">
|
||||
<a-input-number v-model.number="mask.settings.paddingMax" :min="0" />
|
||||
</a-form-item>
|
||||
</template>
|
||||
<!-- Fragment settings -->
|
||||
<template v-if="mask.type === 'fragment'">
|
||||
<a-form-item label="Packets">
|
||||
<a-select v-model="mask.settings.packets" :dropdown-class-name="themeSwitcher.currentTheme">
|
||||
<a-select-option value="tlshello">tlshello</a-select-option>
|
||||
<a-select-option value="1-3">1-3</a-select-option>
|
||||
<a-select-option value="1-5">1-5</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item label="Length">
|
||||
<a-input v-model.trim="mask.settings.length" placeholder="e.g. 100-200" />
|
||||
</a-form-item>
|
||||
<a-form-item label="Delay">
|
||||
<a-input v-model.trim="mask.settings.delay" placeholder="e.g. 10-20" />
|
||||
</a-form-item>
|
||||
<a-form-item label="Max Split">
|
||||
<a-input v-model.trim="mask.settings.maxSplit" placeholder="e.g. 3-6" />
|
||||
</a-form-item>
|
||||
</template>
|
||||
|
||||
<!-- Header Custom (TCP) – clients/servers/errors are 2D arrays of groups -->
|
||||
<template v-if="mask.type === 'header-custom'">
|
||||
<!-- Clients -->
|
||||
<a-form-item label="Clients">
|
||||
<a-button
|
||||
icon="plus"
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="mask.settings.clients.push([{delay: 0, rand: 0, randRange: '0-255', type: 'array', packet: []}])"
|
||||
></a-button>
|
||||
</a-form-item>
|
||||
<template v-for="(group, gi) in mask.settings.clients" :key="'cg'+gi">
|
||||
<a-divider :style="{ margin: '0' }">
|
||||
Clients Group [[ gi + 1 ]]
|
||||
<a-icon
|
||||
type="delete"
|
||||
@click="mask.settings.clients.splice(gi, 1)"
|
||||
:style="{ color: 'rgb(255, 77, 79)', cursor: 'pointer', marginLeft: '8px' }"
|
||||
></a-icon>
|
||||
</a-divider>
|
||||
<template v-for="(item, ii) in group" :key="'ci'+ii">
|
||||
<a-form-item label='{{ i18n "pages.xray.outbound.type" }}'>
|
||||
<a-select v-model="item.type" :dropdown-class-name="themeSwitcher.currentTheme"
|
||||
@change="t => { if(t === 'base64') item.packet = RandomUtil.randomBase64(); else if(t === 'array') { item.rand = 0; item.packet = []; } else { item.packet = ''; } }">
|
||||
<a-select-option value="array">Array</a-select-option>
|
||||
<a-select-option value="str">String</a-select-option>
|
||||
<a-select-option value="hex">Hex</a-select-option>
|
||||
<a-select-option value="base64">Base64</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item label="Delay (ms)">
|
||||
<a-input-number v-model.number="item.delay" :min="0" />
|
||||
</a-form-item>
|
||||
<template v-if="item.type === 'array'">
|
||||
<a-form-item label="Rand">
|
||||
<a-input-number v-model.number="item.rand" :min="0" />
|
||||
<!-- Sudoku settings (TCP) -->
|
||||
<template v-if="mask.type === 'sudoku'">
|
||||
<a-form-item label="Password">
|
||||
<a-input v-model.trim="mask.settings.password" placeholder="Obfuscation password" />
|
||||
</a-form-item>
|
||||
<a-form-item label="ASCII">
|
||||
<a-input v-model.trim="mask.settings.ascii" placeholder="ASCII" />
|
||||
</a-form-item>
|
||||
<a-form-item label="Custom Table">
|
||||
<a-input v-model.trim="mask.settings.customTable" placeholder="Custom Table" />
|
||||
</a-form-item>
|
||||
<a-form-item label="Custom Tables">
|
||||
<a-input v-model.trim="mask.settings.customTables" placeholder="Custom Tables" />
|
||||
</a-form-item>
|
||||
<a-form-item label="Padding Min">
|
||||
<a-input-number v-model.number="mask.settings.paddingMin" :min="0" />
|
||||
</a-form-item>
|
||||
<a-form-item label="Padding Max">
|
||||
<a-input-number v-model.number="mask.settings.paddingMax" :min="0" />
|
||||
</a-form-item>
|
||||
</template>
|
||||
|
||||
<!-- Header Custom (TCP) – clients/servers/errors are 2D arrays of groups -->
|
||||
<template v-if="mask.type === 'header-custom'">
|
||||
<!-- Clients -->
|
||||
<a-form-item label="Clients">
|
||||
<a-button icon="plus" type="primary" size="small"
|
||||
@click="mask.settings.clients.push([{delay: 0, rand: 0, randRange: '0-255', type: 'array', packet: []}])"></a-button>
|
||||
</a-form-item>
|
||||
<template v-for="(group, gi) in mask.settings.clients" :key="'cg'+gi">
|
||||
<a-divider :style="{ margin: '0' }">
|
||||
Clients Group [[ gi + 1 ]]
|
||||
<a-icon type="delete" @click="mask.settings.clients.splice(gi, 1)"
|
||||
:style="{ color: 'rgb(255, 77, 79)', cursor: 'pointer', marginLeft: '8px' }"></a-icon>
|
||||
</a-divider>
|
||||
<template v-for="(item, ii) in group" :key="'ci'+ii">
|
||||
<a-form-item label='{{ i18n "pages.xray.outbound.type" }}'>
|
||||
<a-select v-model="item.type" :dropdown-class-name="themeSwitcher.currentTheme"
|
||||
@change="t => { if(t === 'base64') item.packet = RandomUtil.randomBase64(); else if(t === 'array') { item.rand = 0; item.packet = []; } else { item.packet = ''; } }">
|
||||
<a-select-option value="array">Array</a-select-option>
|
||||
<a-select-option value="str">String</a-select-option>
|
||||
<a-select-option value="hex">Hex</a-select-option>
|
||||
<a-select-option value="base64">Base64</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item label="Rand Range">
|
||||
<a-input v-model.trim="item.randRange" placeholder="0-255" />
|
||||
<a-form-item label="Delay (ms)">
|
||||
<a-input-number v-model.number="item.delay" :min="0" />
|
||||
</a-form-item>
|
||||
<template v-if="item.type === 'array'">
|
||||
<a-form-item label="Rand">
|
||||
<a-input-number v-model.number="item.rand" :min="0" />
|
||||
</a-form-item>
|
||||
<a-form-item label="Rand Range">
|
||||
<a-input v-model.trim="item.randRange" placeholder="0-255" />
|
||||
</a-form-item>
|
||||
</template>
|
||||
<a-form-item v-else label="Packet">
|
||||
<a-input-group compact v-if="item.type === 'base64'">
|
||||
<a-input v-model.trim="item.packet" placeholder="binary data"
|
||||
:style="{ width: 'calc(100% - 32px)' }" />
|
||||
<a-button icon="reload" @click="item.packet = RandomUtil.randomBase64()" />
|
||||
</a-input-group>
|
||||
<a-input v-else v-model.trim="item.packet" placeholder="binary data" />
|
||||
</a-form-item>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<!-- Servers -->
|
||||
<a-form-item label="Servers">
|
||||
<a-button icon="plus" type="primary" size="small"
|
||||
@click="mask.settings.servers.push([{delay: 0, rand: 0, randRange: '0-255', type: 'array', packet: []}])"></a-button>
|
||||
</a-form-item>
|
||||
<template v-for="(group, gi) in mask.settings.servers" :key="'sg'+gi">
|
||||
<a-divider :style="{ margin: '0' }">
|
||||
Servers Group [[ gi + 1 ]]
|
||||
<a-icon type="delete" @click="mask.settings.servers.splice(gi, 1)"
|
||||
:style="{ color: 'rgb(255, 77, 79)', cursor: 'pointer', marginLeft: '8px' }"></a-icon>
|
||||
</a-divider>
|
||||
<template v-for="(item, ii) in group" :key="'si'+ii">
|
||||
<a-form-item label='{{ i18n "pages.xray.outbound.type" }}'>
|
||||
<a-select v-model="item.type" :dropdown-class-name="themeSwitcher.currentTheme"
|
||||
@change="t => { if(t === 'base64') item.packet = RandomUtil.randomBase64(); else if(t === 'array') { item.rand = 0; item.packet = []; } else { item.packet = ''; } }">
|
||||
<a-select-option value="array">Array</a-select-option>
|
||||
<a-select-option value="str">String</a-select-option>
|
||||
<a-select-option value="hex">Hex</a-select-option>
|
||||
<a-select-option value="base64">Base64</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item label="Delay (ms)">
|
||||
<a-input-number v-model.number="item.delay" :min="0" />
|
||||
</a-form-item>
|
||||
<template v-if="item.type === 'array'">
|
||||
<a-form-item label="Rand">
|
||||
<a-input-number v-model.number="item.rand" :min="0" />
|
||||
</a-form-item>
|
||||
<a-form-item label="Rand Range">
|
||||
<a-input v-model.trim="item.randRange" placeholder="0-255" />
|
||||
</a-form-item>
|
||||
</template>
|
||||
<a-form-item v-else label="Packet">
|
||||
<a-input-group compact v-if="item.type === 'base64'">
|
||||
<a-input v-model.trim="item.packet" placeholder="binary data"
|
||||
:style="{ width: 'calc(100% - 32px)' }" />
|
||||
<a-button icon="reload" @click="item.packet = RandomUtil.randomBase64()" />
|
||||
</a-input-group>
|
||||
<a-input v-else v-model.trim="item.packet" placeholder="binary data" />
|
||||
</a-form-item>
|
||||
</template>
|
||||
<a-form-item v-else label="Packet">
|
||||
<a-input-group compact v-if="item.type === 'base64'">
|
||||
<a-input v-model.trim="item.packet" placeholder="binary data" :style="{ width: 'calc(100% - 32px)' }" />
|
||||
<a-button icon="reload" @click="item.packet = RandomUtil.randomBase64()" />
|
||||
</a-input-group>
|
||||
<a-input v-else v-model.trim="item.packet" placeholder="binary data" />
|
||||
</a-form-item>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<!-- Servers -->
|
||||
<a-form-item label="Servers">
|
||||
<a-button
|
||||
icon="plus"
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="mask.settings.servers.push([{delay: 0, rand: 0, randRange: '0-255', type: 'array', packet: []}])"
|
||||
></a-button>
|
||||
</a-form-item>
|
||||
<template v-for="(group, gi) in mask.settings.servers" :key="'sg'+gi">
|
||||
<a-divider :style="{ margin: '0' }">
|
||||
Servers Group [[ gi + 1 ]]
|
||||
<a-icon
|
||||
type="delete"
|
||||
@click="mask.settings.servers.splice(gi, 1)"
|
||||
:style="{ color: 'rgb(255, 77, 79)', cursor: 'pointer', marginLeft: '8px' }"
|
||||
></a-icon>
|
||||
</a-divider>
|
||||
<template v-for="(item, ii) in group" :key="'si'+ii">
|
||||
<a-form-item label='{{ i18n "pages.xray.outbound.type" }}'>
|
||||
<a-select v-model="item.type" :dropdown-class-name="themeSwitcher.currentTheme"
|
||||
@change="t => { if(t === 'base64') item.packet = RandomUtil.randomBase64(); else if(t === 'array') { item.rand = 0; item.packet = []; } else { item.packet = ''; } }">
|
||||
<a-select-option value="array">Array</a-select-option>
|
||||
<a-select-option value="str">String</a-select-option>
|
||||
<a-select-option value="hex">Hex</a-select-option>
|
||||
<a-select-option value="base64">Base64</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item label="Delay (ms)">
|
||||
<a-input-number v-model.number="item.delay" :min="0" />
|
||||
</a-form-item>
|
||||
<template v-if="item.type === 'array'">
|
||||
<a-form-item label="Rand">
|
||||
<a-input-number v-model.number="item.rand" :min="0" />
|
||||
</a-form-item>
|
||||
<a-form-item label="Rand Range">
|
||||
<a-input v-model.trim="item.randRange" placeholder="0-255" />
|
||||
</a-form-item>
|
||||
</template>
|
||||
<a-form-item v-else label="Packet">
|
||||
<a-input-group compact v-if="item.type === 'base64'">
|
||||
<a-input v-model.trim="item.packet" placeholder="binary data" :style="{ width: 'calc(100% - 32px)' }" />
|
||||
<a-button icon="reload" @click="item.packet = RandomUtil.randomBase64()" />
|
||||
</a-input-group>
|
||||
<a-input v-else v-model.trim="item.packet" placeholder="binary data" />
|
||||
</a-form-item>
|
||||
</template>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
</a-form>
|
||||
</template>
|
||||
</a-form>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<template v-if="inbound.protocol == Protocols.HYSTERIA || inbound.stream.network == 'kcp'">
|
||||
<a-form-item label="UDP Masks">
|
||||
<a-button
|
||||
icon="plus"
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="inbound.stream.addUdpMask(inbound.protocol === Protocols.HYSTERIA ? 'salamander' : 'mkcp-aes128gcm')"
|
||||
></a-button>
|
||||
</a-form-item>
|
||||
<template
|
||||
v-if="inbound.stream.finalmask.udp && inbound.stream.finalmask.udp.length > 0"
|
||||
>
|
||||
<a-form
|
||||
v-for="(mask, index) in inbound.stream.finalmask.udp"
|
||||
:key="index"
|
||||
:colon="false"
|
||||
:label-col="{ md: {span:8} }"
|
||||
:wrapper-col="{ md: {span:14} }"
|
||||
>
|
||||
<a-divider :style="{ margin: '0' }">
|
||||
UDP Mask [[ index + 1 ]]
|
||||
<a-icon
|
||||
type="delete"
|
||||
@click="() => inbound.stream.delUdpMask(index)"
|
||||
:style="{ color: 'rgb(255, 77, 79)', cursor: 'pointer' }"
|
||||
></a-icon>
|
||||
</a-divider>
|
||||
<a-form-item label='{{ i18n "pages.xray.outbound.type" }}'>
|
||||
<a-select
|
||||
v-model="mask.type"
|
||||
@change="(type) => { mask.settings = mask._getDefaultSettings(type, {}); if(inbound.stream.network === 'kcp') { inbound.stream.kcp.mtu = type === 'xdns' ? 900 : 1350; } }"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme"
|
||||
>
|
||||
<template v-if="inbound.protocol === Protocols.HYSTERIA">
|
||||
<a-select-option value="salamander"
|
||||
>Salamander (Hysteria2)</a-select-option
|
||||
>
|
||||
</template>
|
||||
<template v-else>
|
||||
<a-select-option value="mkcp-aes128gcm"
|
||||
>mKCP AES-128-GCM</a-select-option
|
||||
>
|
||||
<a-select-option value="header-dns">Header DNS</a-select-option>
|
||||
<a-select-option value="header-dtls"
|
||||
>Header DTLS 1.2</a-select-option
|
||||
>
|
||||
<a-select-option value="header-srtp">Header SRTP</a-select-option>
|
||||
<a-select-option value="header-utp">Header uTP</a-select-option>
|
||||
<a-select-option value="header-wechat"
|
||||
>Header WeChat Video</a-select-option
|
||||
>
|
||||
<a-select-option value="header-wireguard"
|
||||
>Header WireGuard</a-select-option
|
||||
>
|
||||
<a-select-option value="mkcp-original"
|
||||
>mKCP Original</a-select-option
|
||||
>
|
||||
<a-select-option value="xdns">xDNS</a-select-option>
|
||||
<a-select-option value="xicmp">xICMP</a-select-option>
|
||||
<a-select-option value="header-custom">Header Custom</a-select-option>
|
||||
<a-select-option value="noise">Noise</a-select-option>
|
||||
</template>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
label="Password"
|
||||
v-if="['mkcp-aes128gcm', 'salamander'].includes(mask.type)"
|
||||
>
|
||||
<a-input
|
||||
v-model.trim="mask.settings.password"
|
||||
placeholder="Obfuscation password"
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="Domain" v-if="mask.type === 'header-dns'">
|
||||
<a-input
|
||||
v-model.trim="mask.settings.domain"
|
||||
placeholder="e.g., www.example.com"
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
<template v-if="mask.type === 'xdns'">
|
||||
<a-form-item label="Domains">
|
||||
<a-select
|
||||
mode="tags"
|
||||
v-model="mask.settings.domains"
|
||||
:style="{ width: '100%' }"
|
||||
:token-separators="[',']"
|
||||
placeholder="e.g., www.example.com"
|
||||
></a-select>
|
||||
<a-form-item label="UDP Masks">
|
||||
<a-button icon="plus" type="primary" size="small"
|
||||
@click="inbound.stream.addUdpMask(inbound.protocol === Protocols.HYSTERIA ? 'salamander' : 'mkcp-aes128gcm')"></a-button>
|
||||
</a-form-item>
|
||||
<template v-if="inbound.stream.finalmask.udp && inbound.stream.finalmask.udp.length > 0">
|
||||
<a-form v-for="(mask, index) in inbound.stream.finalmask.udp" :key="index" :colon="false"
|
||||
:label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
|
||||
<a-divider :style="{ margin: '0' }">
|
||||
UDP Mask [[ index + 1 ]]
|
||||
<a-icon type="delete" @click="() => inbound.stream.delUdpMask(index)"
|
||||
:style="{ color: 'rgb(255, 77, 79)', cursor: 'pointer' }"></a-icon>
|
||||
</a-divider>
|
||||
<a-form-item label='{{ i18n "pages.xray.outbound.type" }}'>
|
||||
<a-select v-model="mask.type"
|
||||
@change="(type) => { mask.settings = mask._getDefaultSettings(type, {}); if(inbound.stream.network === 'kcp') { inbound.stream.kcp.mtu = type === 'xdns' ? 900 : 1350; } }"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme">
|
||||
<template v-if="inbound.protocol === Protocols.HYSTERIA">
|
||||
<a-select-option value="salamander">Salamander (Hysteria2)</a-select-option>
|
||||
</template>
|
||||
<template v-else>
|
||||
<a-select-option value="mkcp-aes128gcm">mKCP AES-128-GCM</a-select-option>
|
||||
<a-select-option value="header-dns">Header DNS</a-select-option>
|
||||
<a-select-option value="header-dtls">Header DTLS 1.2</a-select-option>
|
||||
<a-select-option value="header-srtp">Header SRTP</a-select-option>
|
||||
<a-select-option value="header-utp">Header uTP</a-select-option>
|
||||
<a-select-option value="header-wechat">Header WeChat Video</a-select-option>
|
||||
<a-select-option value="header-wireguard">Header WireGuard</a-select-option>
|
||||
<a-select-option value="mkcp-original">mKCP Original</a-select-option>
|
||||
<a-select-option value="xdns">xDNS</a-select-option>
|
||||
<a-select-option value="xicmp">xICMP</a-select-option>
|
||||
<a-select-option value="header-custom">Header Custom</a-select-option>
|
||||
<a-select-option value="noise">Noise</a-select-option>
|
||||
</template>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</template>
|
||||
<template v-if="mask.type === 'noise'">
|
||||
<a-form-item label="Reset">
|
||||
<a-input-number v-model.number="mask.settings.reset" :min="0" />
|
||||
<a-form-item label="Password" v-if="['mkcp-aes128gcm', 'salamander'].includes(mask.type)">
|
||||
<a-input v-model.trim="mask.settings.password" placeholder="Obfuscation password"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="Noise">
|
||||
<a-button
|
||||
icon="plus"
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="mask.settings.noise.push({rand: '1-8192', randRange: '0-255', type: 'array', packet: [], delay: '10-20'})"
|
||||
></a-button>
|
||||
<a-form-item label="Domain" v-if="mask.type === 'header-dns'">
|
||||
<a-input v-model.trim="mask.settings.domain" placeholder="e.g., www.example.com"></a-input>
|
||||
</a-form-item>
|
||||
<template v-for="(n, index) in mask.settings.noise" :key="index">
|
||||
<a-divider :style="{ margin: '0' }">
|
||||
Noise [[ index + 1 ]]
|
||||
<a-icon
|
||||
type="delete"
|
||||
@click="() => mask.settings.noise.splice(index, 1)"
|
||||
:style="{ color: 'rgb(255, 77, 79)', cursor: 'pointer' }"
|
||||
></a-icon>
|
||||
</a-divider>
|
||||
<a-form-item label='{{ i18n "pages.xray.outbound.type" }}'>
|
||||
<a-select
|
||||
v-model="n.type"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme"
|
||||
@change="t => { if(t === 'base64') n.packet = RandomUtil.randomBase64(); else if(t === 'array') n.packet = []; else n.packet = ''; }"
|
||||
>
|
||||
<a-select-option value="array">Array</a-select-option>
|
||||
<a-select-option value="str">String</a-select-option>
|
||||
<a-select-option value="hex">Hex</a-select-option>
|
||||
<a-select-option value="base64">Base64</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<template v-if="n.type === 'array'">
|
||||
<a-form-item label="Rand">
|
||||
<a-input v-model.trim="n.rand" placeholder="0 or 1-8192" />
|
||||
</a-form-item>
|
||||
<a-form-item label="Rand Range">
|
||||
<a-input v-model.trim="n.randRange" placeholder="0-255" />
|
||||
</a-form-item>
|
||||
</template>
|
||||
<a-form-item v-else label="Packet">
|
||||
<a-input-group compact v-if="n.type === 'base64'">
|
||||
<a-input v-model.trim="n.packet" placeholder="binary data" :style="{ width: 'calc(100% - 32px)' }" />
|
||||
<a-button icon="reload" @click="n.packet = RandomUtil.randomBase64()" />
|
||||
</a-input-group>
|
||||
<a-input v-else v-model.trim="n.packet" placeholder="binary data" />
|
||||
</a-form-item>
|
||||
<a-form-item label="Delay">
|
||||
<a-input v-model.trim="n.delay" placeholder="10-20" />
|
||||
<template v-if="mask.type === 'xdns'">
|
||||
<a-form-item label="Domains">
|
||||
<a-select mode="tags" v-model="mask.settings.domains" :style="{ width: '100%' }" :token-separators="[',']"
|
||||
placeholder="e.g., www.example.com"></a-select>
|
||||
</a-form-item>
|
||||
</template>
|
||||
</template>
|
||||
<template v-if="mask.type === 'header-custom'">
|
||||
<a-form-item label="Client">
|
||||
<a-button
|
||||
icon="plus"
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="mask.settings.client.push({rand: 0, randRange: '0-255', type: 'array', packet: []})"
|
||||
></a-button>
|
||||
</a-form-item>
|
||||
<template v-for="(c, index) in mask.settings.client" :key="index">
|
||||
<a-divider :style="{ margin: '0' }">
|
||||
Client [[ index + 1 ]]
|
||||
<a-icon
|
||||
type="delete"
|
||||
@click="mask.settings.client.splice(index, 1)"
|
||||
:style="{ color: 'rgb(255, 77, 79)', cursor: 'pointer' }"
|
||||
></a-icon>
|
||||
</a-divider>
|
||||
<a-form-item label='{{ i18n "pages.xray.outbound.type" }}'>
|
||||
<a-select
|
||||
v-model="c.type"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme"
|
||||
@change="t => { if(t === 'base64') c.packet = RandomUtil.randomBase64(); else if(t === 'array') c.packet = []; else c.packet = ''; }"
|
||||
>
|
||||
<a-select-option value="array">Array</a-select-option>
|
||||
<a-select-option value="str">String</a-select-option>
|
||||
<a-select-option value="hex">Hex</a-select-option>
|
||||
<a-select-option value="base64">Base64</a-select-option>
|
||||
</a-select>
|
||||
<template v-if="mask.type === 'noise'">
|
||||
<a-form-item label="Reset">
|
||||
<a-input-number v-model.number="mask.settings.reset" :min="0" />
|
||||
</a-form-item>
|
||||
<template v-if="c.type === 'array'">
|
||||
<a-form-item label="Rand">
|
||||
<a-input-number v-model.number="c.rand" />
|
||||
<a-form-item label="Noise">
|
||||
<a-button icon="plus" type="primary" size="small"
|
||||
@click="mask.settings.noise.push({rand: '1-8192', randRange: '0-255', type: 'array', packet: [], delay: '10-20'})"></a-button>
|
||||
</a-form-item>
|
||||
<template v-for="(n, index) in mask.settings.noise" :key="index">
|
||||
<a-divider :style="{ margin: '0' }">
|
||||
Noise [[ index + 1 ]]
|
||||
<a-icon type="delete" @click="() => mask.settings.noise.splice(index, 1)"
|
||||
:style="{ color: 'rgb(255, 77, 79)', cursor: 'pointer' }"></a-icon>
|
||||
</a-divider>
|
||||
<a-form-item label='{{ i18n "pages.xray.outbound.type" }}'>
|
||||
<a-select v-model="n.type" :dropdown-class-name="themeSwitcher.currentTheme"
|
||||
@change="t => { if(t === 'base64') n.packet = RandomUtil.randomBase64(); else if(t === 'array') n.packet = []; else n.packet = ''; }">
|
||||
<a-select-option value="array">Array</a-select-option>
|
||||
<a-select-option value="str">String</a-select-option>
|
||||
<a-select-option value="hex">Hex</a-select-option>
|
||||
<a-select-option value="base64">Base64</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item label="Rand Range">
|
||||
<a-input v-model.trim="c.randRange" placeholder="0-255" />
|
||||
<template v-if="n.type === 'array'">
|
||||
<a-form-item label="Rand">
|
||||
<a-input v-model.trim="n.rand" placeholder="0 or 1-8192" />
|
||||
</a-form-item>
|
||||
<a-form-item label="Rand Range">
|
||||
<a-input v-model.trim="n.randRange" placeholder="0-255" />
|
||||
</a-form-item>
|
||||
</template>
|
||||
<a-form-item v-else label="Packet">
|
||||
<a-input-group compact v-if="n.type === 'base64'">
|
||||
<a-input v-model.trim="n.packet" placeholder="binary data" :style="{ width: 'calc(100% - 32px)' }" />
|
||||
<a-button icon="reload" @click="n.packet = RandomUtil.randomBase64()" />
|
||||
</a-input-group>
|
||||
<a-input v-else v-model.trim="n.packet" placeholder="binary data" />
|
||||
</a-form-item>
|
||||
<a-form-item label="Delay">
|
||||
<a-input v-model.trim="n.delay" placeholder="10-20" />
|
||||
</a-form-item>
|
||||
</template>
|
||||
<a-form-item v-else label="Packet">
|
||||
<a-input-group compact v-if="c.type === 'base64'">
|
||||
<a-input v-model.trim="c.packet" placeholder="binary data" :style="{ width: 'calc(100% - 32px)' }" />
|
||||
<a-button icon="reload" @click="c.packet = RandomUtil.randomBase64()" />
|
||||
</a-input-group>
|
||||
<a-input v-else v-model.trim="c.packet" placeholder="binary data" />
|
||||
</a-form-item>
|
||||
</template>
|
||||
<a-divider :style="{ margin: '0' }"></a-divider>
|
||||
<a-form-item label="Server">
|
||||
<a-button
|
||||
icon="plus"
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="mask.settings.server.push({rand: 0, randRange: '0-255', type: 'array', packet: []})"
|
||||
></a-button>
|
||||
</a-form-item>
|
||||
<template v-for="(s, index) in mask.settings.server" :key="index">
|
||||
<a-divider :style="{ margin: '0' }">
|
||||
Server [[ index + 1 ]]
|
||||
<a-icon
|
||||
type="delete"
|
||||
@click="mask.settings.server.splice(index, 1)"
|
||||
:style="{ color: 'rgb(255, 77, 79)', cursor: 'pointer' }"
|
||||
></a-icon>
|
||||
</a-divider>
|
||||
<a-form-item label='{{ i18n "pages.xray.outbound.type" }}'>
|
||||
<a-select
|
||||
v-model="s.type"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme"
|
||||
@change="t => { if(t === 'base64') s.packet = RandomUtil.randomBase64(); else if(t === 'array') s.packet = []; else s.packet = ''; }"
|
||||
>
|
||||
<a-select-option value="array">Array</a-select-option>
|
||||
<a-select-option value="str">String</a-select-option>
|
||||
<a-select-option value="hex">Hex</a-select-option>
|
||||
<a-select-option value="base64">Base64</a-select-option>
|
||||
</a-select>
|
||||
<template v-if="mask.type === 'header-custom'">
|
||||
<a-form-item label="Client">
|
||||
<a-button icon="plus" type="primary" size="small"
|
||||
@click="mask.settings.client.push({rand: 0, randRange: '0-255', type: 'array', packet: []})"></a-button>
|
||||
</a-form-item>
|
||||
<template v-if="s.type === 'array'">
|
||||
<a-form-item label="Rand">
|
||||
<a-input-number v-model.number="s.rand" />
|
||||
<template v-for="(c, index) in mask.settings.client" :key="index">
|
||||
<a-divider :style="{ margin: '0' }">
|
||||
Client [[ index + 1 ]]
|
||||
<a-icon type="delete" @click="mask.settings.client.splice(index, 1)"
|
||||
:style="{ color: 'rgb(255, 77, 79)', cursor: 'pointer' }"></a-icon>
|
||||
</a-divider>
|
||||
<a-form-item label='{{ i18n "pages.xray.outbound.type" }}'>
|
||||
<a-select v-model="c.type" :dropdown-class-name="themeSwitcher.currentTheme"
|
||||
@change="t => { if(t === 'base64') c.packet = RandomUtil.randomBase64(); else if(t === 'array') c.packet = []; else c.packet = ''; }">
|
||||
<a-select-option value="array">Array</a-select-option>
|
||||
<a-select-option value="str">String</a-select-option>
|
||||
<a-select-option value="hex">Hex</a-select-option>
|
||||
<a-select-option value="base64">Base64</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item label="Rand Range">
|
||||
<a-input v-model.trim="s.randRange" placeholder="0-255" />
|
||||
<template v-if="c.type === 'array'">
|
||||
<a-form-item label="Rand">
|
||||
<a-input-number v-model.number="c.rand" />
|
||||
</a-form-item>
|
||||
<a-form-item label="Rand Range">
|
||||
<a-input v-model.trim="c.randRange" placeholder="0-255" />
|
||||
</a-form-item>
|
||||
</template>
|
||||
<a-form-item v-else label="Packet">
|
||||
<a-input-group compact v-if="c.type === 'base64'">
|
||||
<a-input v-model.trim="c.packet" placeholder="binary data" :style="{ width: 'calc(100% - 32px)' }" />
|
||||
<a-button icon="reload" @click="c.packet = RandomUtil.randomBase64()" />
|
||||
</a-input-group>
|
||||
<a-input v-else v-model.trim="c.packet" placeholder="binary data" />
|
||||
</a-form-item>
|
||||
</template>
|
||||
<a-form-item v-else label="Packet">
|
||||
<a-input-group compact v-if="s.type === 'base64'">
|
||||
<a-input v-model.trim="s.packet" placeholder="binary data" :style="{ width: 'calc(100% - 32px)' }" />
|
||||
<a-button icon="reload" @click="s.packet = RandomUtil.randomBase64()" />
|
||||
</a-input-group>
|
||||
<a-input v-else v-model.trim="s.packet" placeholder="binary data" />
|
||||
<a-divider :style="{ margin: '0' }"></a-divider>
|
||||
<a-form-item label="Server">
|
||||
<a-button icon="plus" type="primary" size="small"
|
||||
@click="mask.settings.server.push({rand: 0, randRange: '0-255', type: 'array', packet: []})"></a-button>
|
||||
</a-form-item>
|
||||
<template v-for="(s, index) in mask.settings.server" :key="index">
|
||||
<a-divider :style="{ margin: '0' }">
|
||||
Server [[ index + 1 ]]
|
||||
<a-icon type="delete" @click="mask.settings.server.splice(index, 1)"
|
||||
:style="{ color: 'rgb(255, 77, 79)', cursor: 'pointer' }"></a-icon>
|
||||
</a-divider>
|
||||
<a-form-item label='{{ i18n "pages.xray.outbound.type" }}'>
|
||||
<a-select v-model="s.type" :dropdown-class-name="themeSwitcher.currentTheme"
|
||||
@change="t => { if(t === 'base64') s.packet = RandomUtil.randomBase64(); else if(t === 'array') s.packet = []; else s.packet = ''; }">
|
||||
<a-select-option value="array">Array</a-select-option>
|
||||
<a-select-option value="str">String</a-select-option>
|
||||
<a-select-option value="hex">Hex</a-select-option>
|
||||
<a-select-option value="base64">Base64</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<template v-if="s.type === 'array'">
|
||||
<a-form-item label="Rand">
|
||||
<a-input-number v-model.number="s.rand" />
|
||||
</a-form-item>
|
||||
<a-form-item label="Rand Range">
|
||||
<a-input v-model.trim="s.randRange" placeholder="0-255" />
|
||||
</a-form-item>
|
||||
</template>
|
||||
<a-form-item v-else label="Packet">
|
||||
<a-input-group compact v-if="s.type === 'base64'">
|
||||
<a-input v-model.trim="s.packet" placeholder="binary data" :style="{ width: 'calc(100% - 32px)' }" />
|
||||
<a-button icon="reload" @click="s.packet = RandomUtil.randomBase64()" />
|
||||
</a-input-group>
|
||||
<a-input v-else v-model.trim="s.packet" placeholder="binary data" />
|
||||
</a-form-item>
|
||||
</template>
|
||||
</template>
|
||||
<template v-if="mask.type === 'xicmp'">
|
||||
<a-form-item label="IP">
|
||||
<a-input v-model.trim="mask.settings.ip" placeholder="0.0.0.0" />
|
||||
</a-form-item>
|
||||
<a-form-item label="ID">
|
||||
<a-input-number v-model.number="mask.settings.id" :min="0" />
|
||||
</a-form-item>
|
||||
</template>
|
||||
</template>
|
||||
<template v-if="mask.type === 'xicmp'">
|
||||
<a-form-item label="IP">
|
||||
<a-input v-model.trim="mask.settings.ip" placeholder="0.0.0.0" />
|
||||
</a-form-item>
|
||||
<a-form-item label="ID">
|
||||
<a-input-number v-model.number="mask.settings.id" :min="0" />
|
||||
</a-form-item>
|
||||
</template>
|
||||
</a-form>
|
||||
</template>
|
||||
</a-form>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<!-- quicParams – only for xhttp H3 and hysteria -->
|
||||
@@ -450,10 +343,8 @@
|
||||
</a-form-item>
|
||||
<template v-if="inbound.stream.finalmask.enableQuicParams">
|
||||
<a-form-item label="Congestion">
|
||||
<a-select
|
||||
v-model="inbound.stream.finalmask.quicParams.congestion"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme"
|
||||
>
|
||||
<a-select v-model="inbound.stream.finalmask.quicParams.congestion"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme">
|
||||
<a-select-option value="reno">Reno</a-select-option>
|
||||
<a-select-option value="bbr">BBR</a-select-option>
|
||||
<a-select-option value="brutal">Brutal</a-select-option>
|
||||
@@ -492,21 +383,26 @@
|
||||
<a-switch v-model="inbound.stream.finalmask.quicParams.disablePathMTUDiscovery"></a-switch>
|
||||
</a-form-item>
|
||||
<a-form-item label="Max Incoming Streams">
|
||||
<a-input-number v-model.number="inbound.stream.finalmask.quicParams.maxIncomingStreams" :min="0" placeholder="0 = default" />
|
||||
<a-input-number v-model.number="inbound.stream.finalmask.quicParams.maxIncomingStreams" :min="0"
|
||||
placeholder="0 = default" />
|
||||
</a-form-item>
|
||||
<a-form-item label="Init Stream Window">
|
||||
<a-input-number v-model.number="inbound.stream.finalmask.quicParams.initStreamReceiveWindow" :min="0" placeholder="0 = default" />
|
||||
<a-input-number v-model.number="inbound.stream.finalmask.quicParams.initStreamReceiveWindow" :min="0"
|
||||
placeholder="0 = default" />
|
||||
</a-form-item>
|
||||
<a-form-item label="Max Stream Window">
|
||||
<a-input-number v-model.number="inbound.stream.finalmask.quicParams.maxStreamReceiveWindow" :min="0" placeholder="0 = default" />
|
||||
<a-input-number v-model.number="inbound.stream.finalmask.quicParams.maxStreamReceiveWindow" :min="0"
|
||||
placeholder="0 = default" />
|
||||
</a-form-item>
|
||||
<a-form-item label="Init Conn Window">
|
||||
<a-input-number v-model.number="inbound.stream.finalmask.quicParams.initConnectionReceiveWindow" :min="0" placeholder="0 = default" />
|
||||
<a-input-number v-model.number="inbound.stream.finalmask.quicParams.initConnectionReceiveWindow" :min="0"
|
||||
placeholder="0 = default" />
|
||||
</a-form-item>
|
||||
<a-form-item label="Max Conn Window">
|
||||
<a-input-number v-model.number="inbound.stream.finalmask.quicParams.maxConnectionReceiveWindow" :min="0" placeholder="0 = default" />
|
||||
<a-input-number v-model.number="inbound.stream.finalmask.quicParams.maxConnectionReceiveWindow" :min="0"
|
||||
placeholder="0 = default" />
|
||||
</a-form-item>
|
||||
</template>
|
||||
</template>
|
||||
</a-form>
|
||||
{{end}}
|
||||
{{end}}
|
||||
@@ -1,9 +1,5 @@
|
||||
{{define "form/streamGRPC"}}
|
||||
<a-form
|
||||
:colon="false"
|
||||
:label-col="{ md: {span:8} }"
|
||||
:wrapper-col="{ md: {span:14} }"
|
||||
>
|
||||
<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
|
||||
<a-form-item label="Service Name">
|
||||
<a-input v-model.trim="inbound.stream.grpc.serviceName"></a-input>
|
||||
</a-form-item>
|
||||
@@ -14,4 +10,4 @@
|
||||
<a-switch v-model="inbound.stream.grpc.multiMode"></a-switch>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
{{end}}
|
||||
{{end}}
|
||||
@@ -1,13 +1,7 @@
|
||||
{{define "form/streamHTTPUpgrade"}}
|
||||
<a-form
|
||||
:colon="false"
|
||||
:label-col="{ md: {span:8} }"
|
||||
:wrapper-col="{ md: {span:14} }"
|
||||
>
|
||||
<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
|
||||
<a-form-item label="Proxy Protocol">
|
||||
<a-switch
|
||||
v-model="inbound.stream.httpupgrade.acceptProxyProtocol"
|
||||
></a-switch>
|
||||
<a-switch v-model="inbound.stream.httpupgrade.acceptProxyProtocol"></a-switch>
|
||||
</a-form-item>
|
||||
<a-form-item label='{{ i18n "host" }}'>
|
||||
<a-input v-model.trim="inbound.stream.httpupgrade.host"></a-input>
|
||||
@@ -16,39 +10,20 @@
|
||||
<a-input v-model.trim="inbound.stream.httpupgrade.path"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label='{{ i18n "pages.inbounds.stream.tcp.requestHeader" }}'>
|
||||
<a-button
|
||||
icon="plus"
|
||||
size="small"
|
||||
@click="inbound.stream.httpupgrade.addHeader('', '')"
|
||||
></a-button>
|
||||
<a-button icon="plus" size="small" @click="inbound.stream.httpupgrade.addHeader('', '')"></a-button>
|
||||
</a-form-item>
|
||||
<a-form-item :wrapper-col="{span:24}">
|
||||
<a-input-group
|
||||
compact
|
||||
v-for="(header, index) in inbound.stream.httpupgrade.headers"
|
||||
>
|
||||
<a-input
|
||||
:style="{ width: '50%' }"
|
||||
v-model.trim="header.name"
|
||||
placeholder='{{ i18n "pages.inbounds.stream.general.name"}}'
|
||||
>
|
||||
<template slot="addonBefore" :style="{ margin: '0' }"
|
||||
>[[ index+1 ]]</template
|
||||
>
|
||||
<a-input-group compact v-for="(header, index) in inbound.stream.httpupgrade.headers">
|
||||
<a-input :style="{ width: '50%' }" v-model.trim="header.name"
|
||||
placeholder='{{ i18n "pages.inbounds.stream.general.name"}}'>
|
||||
<template slot="addonBefore" :style="{ margin: '0' }">[[ index+1 ]]</template>
|
||||
</a-input>
|
||||
<a-input
|
||||
:style="{ width: '50%' }"
|
||||
v-model.trim="header.value"
|
||||
placeholder='{{ i18n "pages.inbounds.stream.general.value" }}'
|
||||
>
|
||||
<a-button
|
||||
icon="minus"
|
||||
slot="addonAfter"
|
||||
size="small"
|
||||
@click="inbound.stream.httpupgrade.removeHeader(index)"
|
||||
></a-button>
|
||||
<a-input :style="{ width: '50%' }" v-model.trim="header.value"
|
||||
placeholder='{{ i18n "pages.inbounds.stream.general.value" }}'>
|
||||
<a-button icon="minus" slot="addonAfter" size="small"
|
||||
@click="inbound.stream.httpupgrade.removeHeader(index)"></a-button>
|
||||
</a-input>
|
||||
</a-input-group>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
{{end}}
|
||||
{{end}}
|
||||
@@ -1,14 +1,7 @@
|
||||
{{define "form/streamHysteria"}}
|
||||
<a-form
|
||||
:colon="false"
|
||||
:label-col="{ md: {span:8} }"
|
||||
:wrapper-col="{ md: {span:14} }"
|
||||
>
|
||||
<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
|
||||
<a-form-item label="UDP Idle Timeout">
|
||||
<a-input-number
|
||||
v-model.number="inbound.stream.hysteria.udpIdleTimeout"
|
||||
:min="0"
|
||||
></a-input-number>
|
||||
<a-input-number v-model.number="inbound.stream.hysteria.udpIdleTimeout" :min="0"></a-input-number>
|
||||
</a-form-item>
|
||||
<a-form-item label="Masquerade">
|
||||
<a-switch v-model="inbound.stream.hysteria.masqueradeSwitch"></a-switch>
|
||||
@@ -16,85 +9,50 @@
|
||||
<template v-if="inbound.stream.hysteria.masqueradeSwitch">
|
||||
<a-divider :style="{ margin: '5px 0 0' }">Masquerade</a-divider>
|
||||
<a-form-item label="Type">
|
||||
<a-select
|
||||
v-model="inbound.stream.hysteria.masquerade.type"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme"
|
||||
>
|
||||
<a-select v-model="inbound.stream.hysteria.masquerade.type" :dropdown-class-name="themeSwitcher.currentTheme">
|
||||
<a-select-option value="file">File</a-select-option>
|
||||
<a-select-option value="proxy">Proxy</a-select-option>
|
||||
<a-select-option value="string">String</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
label="Dir"
|
||||
v-if="inbound.stream.hysteria.masquerade.type === 'file'"
|
||||
>
|
||||
<a-form-item label="Dir" v-if="inbound.stream.hysteria.masquerade.type === 'file'">
|
||||
<a-input v-model.trim="inbound.stream.hysteria.masquerade.dir"></a-input>
|
||||
</a-form-item>
|
||||
<template v-if="inbound.stream.hysteria.masquerade.type === 'proxy'">
|
||||
<a-form-item label="URL">
|
||||
<a-input
|
||||
v-model.trim="inbound.stream.hysteria.masquerade.url"
|
||||
></a-input>
|
||||
<a-input v-model.trim="inbound.stream.hysteria.masquerade.url"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="Rewrite Host">
|
||||
<a-switch
|
||||
v-model="inbound.stream.hysteria.masquerade.rewriteHost"
|
||||
></a-switch>
|
||||
<a-switch v-model="inbound.stream.hysteria.masquerade.rewriteHost"></a-switch>
|
||||
</a-form-item>
|
||||
<a-form-item label="Insecure">
|
||||
<a-switch
|
||||
v-model="inbound.stream.hysteria.masquerade.insecure"
|
||||
></a-switch>
|
||||
<a-switch v-model="inbound.stream.hysteria.masquerade.insecure"></a-switch>
|
||||
</a-form-item>
|
||||
</template>
|
||||
<template v-if="inbound.stream.hysteria.masquerade.type === 'string'">
|
||||
<a-form-item label="Content">
|
||||
<a-input
|
||||
v-model.trim="inbound.stream.hysteria.masquerade.content"
|
||||
></a-input>
|
||||
<a-input v-model.trim="inbound.stream.hysteria.masquerade.content"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label='{{ i18n "pages.inbounds.stream.tcp.requestHeader" }}'>
|
||||
<a-button
|
||||
size="small"
|
||||
@click="inbound.stream.hysteria.masquerade.addHeader('', '')"
|
||||
>+</a-button
|
||||
>
|
||||
<a-button size="small" @click="inbound.stream.hysteria.masquerade.addHeader('', '')">+</a-button>
|
||||
</a-form-item>
|
||||
<a-form-item :wrapper-col="{span:24}">
|
||||
<a-input-group
|
||||
compact
|
||||
v-for="(header, index) in inbound.stream.hysteria.masquerade.headers"
|
||||
>
|
||||
<a-input
|
||||
style="width: 50%"
|
||||
v-model.trim="header.name"
|
||||
placeholder='{{ i18n "pages.inbounds.stream.general.name"}}'
|
||||
>
|
||||
<template slot="addonBefore" style="margin: 0"
|
||||
>[[ index+1 ]]</template
|
||||
>
|
||||
<a-input-group compact v-for="(header, index) in inbound.stream.hysteria.masquerade.headers">
|
||||
<a-input style="width: 50%" v-model.trim="header.name"
|
||||
placeholder='{{ i18n "pages.inbounds.stream.general.name"}}'>
|
||||
<template slot="addonBefore" style="margin: 0">[[ index+1 ]]</template>
|
||||
</a-input>
|
||||
<a-input
|
||||
style="width: 50%"
|
||||
v-model.trim="header.value"
|
||||
placeholder='{{ i18n "pages.inbounds.stream.general.value" }}'
|
||||
>
|
||||
<a-button
|
||||
slot="addonAfter"
|
||||
size="small"
|
||||
@click="inbound.stream.hysteria.masquerade.removeHeader(index)"
|
||||
>-</a-button
|
||||
>
|
||||
<a-input style="width: 50%" v-model.trim="header.value"
|
||||
placeholder='{{ i18n "pages.inbounds.stream.general.value" }}'>
|
||||
<a-button slot="addonAfter" size="small"
|
||||
@click="inbound.stream.hysteria.masquerade.removeHeader(index)">-</a-button>
|
||||
</a-input>
|
||||
</a-input-group>
|
||||
</a-form-item>
|
||||
<a-form-item label="Status Code">
|
||||
<a-input-number
|
||||
v-model.number="inbound.stream.hysteria.masquerade.statusCode"
|
||||
></a-input-number>
|
||||
<a-input-number v-model.number="inbound.stream.hysteria.masquerade.statusCode"></a-input-number>
|
||||
</a-form-item>
|
||||
</template>
|
||||
</template>
|
||||
</a-form>
|
||||
{{end}}
|
||||
{{end}}
|
||||
@@ -1,46 +1,22 @@
|
||||
{{define "form/streamKCP"}}
|
||||
<a-form
|
||||
:colon="false"
|
||||
:label-col="{ md: {span:8} }"
|
||||
:wrapper-col="{ md: {span:14} }"
|
||||
>
|
||||
<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
|
||||
<a-form-item label="MTU">
|
||||
<a-input-number
|
||||
v-model.number="inbound.stream.kcp.mtu"
|
||||
:min="576"
|
||||
:max="1460"
|
||||
></a-input-number>
|
||||
<a-input-number v-model.number="inbound.stream.kcp.mtu" :min="576" :max="1460"></a-input-number>
|
||||
</a-form-item>
|
||||
<a-form-item label="TTI (ms)">
|
||||
<a-input-number
|
||||
v-model.number="inbound.stream.kcp.tti"
|
||||
:min="10"
|
||||
:max="100"
|
||||
></a-input-number>
|
||||
<a-input-number v-model.number="inbound.stream.kcp.tti" :min="10" :max="100"></a-input-number>
|
||||
</a-form-item>
|
||||
<a-form-item label="Uplink (MB/s)">
|
||||
<a-input-number
|
||||
v-model.number="inbound.stream.kcp.upCap"
|
||||
:min="0"
|
||||
></a-input-number>
|
||||
<a-input-number v-model.number="inbound.stream.kcp.upCap" :min="0"></a-input-number>
|
||||
</a-form-item>
|
||||
<a-form-item label="Downlink (MB/s)">
|
||||
<a-input-number
|
||||
v-model.number="inbound.stream.kcp.downCap"
|
||||
:min="0"
|
||||
></a-input-number>
|
||||
<a-input-number v-model.number="inbound.stream.kcp.downCap" :min="0"></a-input-number>
|
||||
</a-form-item>
|
||||
<a-form-item label="CWND Multiplier">
|
||||
<a-input-number
|
||||
v-model.number="inbound.stream.kcp.cwndMultiplier"
|
||||
:min="1"
|
||||
></a-input-number>
|
||||
<a-input-number v-model.number="inbound.stream.kcp.cwndMultiplier" :min="1"></a-input-number>
|
||||
</a-form-item>
|
||||
<a-form-item label="Max Sending Window">
|
||||
<a-input-number
|
||||
v-model.number="inbound.stream.kcp.maxSendingWindow"
|
||||
:min="0"
|
||||
></a-input-number>
|
||||
<a-input-number v-model.number="inbound.stream.kcp.maxSendingWindow" :min="0"></a-input-number>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
{{end}}
|
||||
{{end}}
|
||||
@@ -1,18 +1,10 @@
|
||||
{{define "form/streamSettings"}}
|
||||
<!-- select stream network -->
|
||||
<a-form
|
||||
:colon="false"
|
||||
:label-col="{ md: {span:8} }"
|
||||
:wrapper-col="{ md: {span:14} }"
|
||||
v-if="inbound.protocol != Protocols.HYSTERIA"
|
||||
>
|
||||
<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }"
|
||||
v-if="inbound.protocol != Protocols.HYSTERIA">
|
||||
<a-form-item label='{{ i18n "transmission" }}'>
|
||||
<a-select
|
||||
v-model="inbound.stream.network"
|
||||
:style="{ width: '75%' }"
|
||||
@change="streamNetworkChange"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme"
|
||||
>
|
||||
<a-select v-model="inbound.stream.network" :style="{ width: '75%' }" @change="streamNetworkChange"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme">
|
||||
<a-select-option value="tcp">TCP (RAW)</a-select-option>
|
||||
<a-select-option value="kcp">mKCP</a-select-option>
|
||||
<a-select-option value="ws">WebSocket</a-select-option>
|
||||
@@ -63,4 +55,4 @@
|
||||
|
||||
<!-- finalmask -->
|
||||
<template> {{template "form/streamFinalMask"}} </template>
|
||||
{{end}}
|
||||
{{end}}
|
||||
@@ -1,49 +1,27 @@
|
||||
{{define "form/streamSockopt"}}
|
||||
<a-divider :style="{ margin: '5px 0 0' }"></a-divider>
|
||||
<a-form
|
||||
:colon="false"
|
||||
:label-col="{ md: {span:8} }"
|
||||
:wrapper-col="{ md: {span:14} }"
|
||||
>
|
||||
<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
|
||||
<a-form-item label="Sockopt">
|
||||
<a-switch v-model="inbound.stream.sockoptSwitch"></a-switch>
|
||||
</a-form-item>
|
||||
<template v-if="inbound.stream.sockoptSwitch">
|
||||
<a-form-item label="Route Mark">
|
||||
<a-input-number
|
||||
v-model.number="inbound.stream.sockopt.mark"
|
||||
:min="0"
|
||||
></a-input-number>
|
||||
<a-input-number v-model.number="inbound.stream.sockopt.mark" :min="0"></a-input-number>
|
||||
</a-form-item>
|
||||
<a-form-item label="TCP Keep Alive Interval">
|
||||
<a-input-number
|
||||
v-model.number="inbound.stream.sockopt.tcpKeepAliveInterval"
|
||||
:min="0"
|
||||
></a-input-number>
|
||||
<a-input-number v-model.number="inbound.stream.sockopt.tcpKeepAliveInterval" :min="0"></a-input-number>
|
||||
</a-form-item>
|
||||
<a-form-item label="TCP Keep Alive Idle">
|
||||
<a-input-number
|
||||
v-model.number="inbound.stream.sockopt.tcpKeepAliveIdle"
|
||||
:min="0"
|
||||
></a-input-number>
|
||||
<a-input-number v-model.number="inbound.stream.sockopt.tcpKeepAliveIdle" :min="0"></a-input-number>
|
||||
</a-form-item>
|
||||
<a-form-item label="TCP Max Seg">
|
||||
<a-input-number
|
||||
v-model.number="inbound.stream.sockopt.tcpMaxSeg"
|
||||
:min="0"
|
||||
></a-input-number>
|
||||
<a-input-number v-model.number="inbound.stream.sockopt.tcpMaxSeg" :min="0"></a-input-number>
|
||||
</a-form-item>
|
||||
<a-form-item label="TCP User Timeout">
|
||||
<a-input-number
|
||||
v-model.number="inbound.stream.sockopt.tcpUserTimeout"
|
||||
:min="0"
|
||||
></a-input-number>
|
||||
<a-input-number v-model.number="inbound.stream.sockopt.tcpUserTimeout" :min="0"></a-input-number>
|
||||
</a-form-item>
|
||||
<a-form-item label="TCP Window Clamp">
|
||||
<a-input-number
|
||||
v-model.number="inbound.stream.sockopt.tcpWindowClamp"
|
||||
:min="0"
|
||||
></a-input-number>
|
||||
<a-input-number v-model.number="inbound.stream.sockopt.tcpWindowClamp" :min="0"></a-input-number>
|
||||
</a-form-item>
|
||||
<a-form-item label="Proxy Protocol">
|
||||
<a-switch v-model="inbound.stream.sockopt.acceptProxyProtocol"></a-switch>
|
||||
@@ -61,33 +39,20 @@
|
||||
<a-switch v-model.trim="inbound.stream.sockopt.V6Only"></a-switch>
|
||||
</a-form-item>
|
||||
<a-form-item label="Domain Strategy">
|
||||
<a-select
|
||||
v-model="inbound.stream.sockopt.domainStrategy"
|
||||
:style="{ width: '50%' }"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme"
|
||||
>
|
||||
<a-select-option v-for="key in DOMAIN_STRATEGY_OPTION" :value="key"
|
||||
>[[ key ]]</a-select-option
|
||||
>
|
||||
<a-select v-model="inbound.stream.sockopt.domainStrategy" :style="{ width: '50%' }"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme">
|
||||
<a-select-option v-for="key in DOMAIN_STRATEGY_OPTION" :value="key">[[ key ]]</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item label="TCP Congestion">
|
||||
<a-select
|
||||
v-model="inbound.stream.sockopt.tcpcongestion"
|
||||
:style="{ width: '50%' }"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme"
|
||||
>
|
||||
<a-select-option v-for="key in TCP_CONGESTION_OPTION" :value="key"
|
||||
>[[ key ]]</a-select-option
|
||||
>
|
||||
<a-select v-model="inbound.stream.sockopt.tcpcongestion" :style="{ width: '50%' }"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme">
|
||||
<a-select-option v-for="key in TCP_CONGESTION_OPTION" :value="key">[[ key ]]</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item label="TProxy">
|
||||
<a-select
|
||||
v-model="inbound.stream.sockopt.tproxy"
|
||||
:style="{ width: '50%' }"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme"
|
||||
>
|
||||
<a-select v-model="inbound.stream.sockopt.tproxy" :style="{ width: '50%' }"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme">
|
||||
<a-select-option value="off">Off</a-select-option>
|
||||
<a-select-option value="redirect">Redirect</a-select-option>
|
||||
<a-select-option value="tproxy">TProxy</a-select-option>
|
||||
@@ -100,15 +65,9 @@
|
||||
<a-input v-model="inbound.stream.sockopt.interfaceName"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="Trusted X-Forwarded-For">
|
||||
<a-select
|
||||
mode="tags"
|
||||
v-model="inbound.stream.sockopt.trustedXForwardedFor"
|
||||
:style="{ width: '100%' }"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme"
|
||||
>
|
||||
<a-select-option value="CF-Connecting-IP"
|
||||
>CF-Connecting-IP</a-select-option
|
||||
>
|
||||
<a-select mode="tags" v-model="inbound.stream.sockopt.trustedXForwardedFor" :style="{ width: '100%' }"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme">
|
||||
<a-select-option value="CF-Connecting-IP">CF-Connecting-IP</a-select-option>
|
||||
<a-select-option value="X-Real-IP">X-Real-IP</a-select-option>
|
||||
<a-select-option value="True-Client-IP">True-Client-IP</a-select-option>
|
||||
<a-select-option value="X-Client-IP">X-Client-IP</a-select-option>
|
||||
@@ -116,4 +75,4 @@
|
||||
</a-form-item>
|
||||
</template>
|
||||
</a-form>
|
||||
{{end}}
|
||||
{{end}}
|
||||
@@ -1,31 +1,19 @@
|
||||
{{define "form/streamTCP"}}
|
||||
<!-- tcp type -->
|
||||
<a-form
|
||||
:colon="false"
|
||||
:label-col="{ md: {span:8} }"
|
||||
:wrapper-col="{ md: {span:14} }"
|
||||
>
|
||||
<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
|
||||
<a-form-item label="Proxy Protocol" v-if="inbound.canEnableTls()">
|
||||
<a-switch v-model="inbound.stream.tcp.acceptProxyProtocol"></a-switch>
|
||||
</a-form-item>
|
||||
<a-form-item label='HTTP {{ i18n "camouflage" }}'>
|
||||
<a-switch
|
||||
:checked="inbound.stream.tcp.type === 'http'"
|
||||
@change="checked => inbound.stream.tcp.type = checked ? 'http' : 'none'"
|
||||
></a-switch>
|
||||
<a-switch :checked="inbound.stream.tcp.type === 'http'"
|
||||
@change="checked => inbound.stream.tcp.type = checked ? 'http' : 'none'"></a-switch>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
|
||||
<a-form
|
||||
v-if="inbound.stream.tcp.type === 'http'"
|
||||
:colon="false"
|
||||
:label-col="{ md: {span:8} }"
|
||||
:wrapper-col="{ md: {span:14} }"
|
||||
>
|
||||
<a-form v-if="inbound.stream.tcp.type === 'http'" :colon="false" :label-col="{ md: {span:8} }"
|
||||
:wrapper-col="{ md: {span:14} }">
|
||||
<!-- tcp request -->
|
||||
<a-divider :style="{ margin: '0' }"
|
||||
>{{ i18n "pages.inbounds.stream.general.request" }}</a-divider
|
||||
>
|
||||
<a-divider :style="{ margin: '0' }">{{ i18n "pages.inbounds.stream.general.request" }}</a-divider>
|
||||
<a-form-item label='{{ i18n "pages.inbounds.stream.tcp.version" }}'>
|
||||
<a-input v-model.trim="inbound.stream.tcp.request.version"></a-input>
|
||||
</a-form-item>
|
||||
@@ -33,66 +21,35 @@
|
||||
<a-input v-model.trim="inbound.stream.tcp.request.method"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item>
|
||||
<template slot="label"
|
||||
>{{ i18n "pages.inbounds.stream.tcp.path" }}
|
||||
<a-button
|
||||
icon="plus"
|
||||
size="small"
|
||||
@click="inbound.stream.tcp.request.addPath('/')"
|
||||
></a-button>
|
||||
<template slot="label">{{ i18n "pages.inbounds.stream.tcp.path" }}
|
||||
<a-button icon="plus" size="small" @click="inbound.stream.tcp.request.addPath('/')"></a-button>
|
||||
</template>
|
||||
<template v-for="(path, index) in inbound.stream.tcp.request.path">
|
||||
<a-input v-model.trim="inbound.stream.tcp.request.path[index]">
|
||||
<a-button
|
||||
icon="minus"
|
||||
size="small"
|
||||
slot="addonAfter"
|
||||
@click="inbound.stream.tcp.request.removePath(index)"
|
||||
v-if="inbound.stream.tcp.request.path.length>1"
|
||||
></a-button>
|
||||
<a-button icon="minus" size="small" slot="addonAfter" @click="inbound.stream.tcp.request.removePath(index)"
|
||||
v-if="inbound.stream.tcp.request.path.length>1"></a-button>
|
||||
</a-input>
|
||||
</template>
|
||||
</a-form-item>
|
||||
<a-form-item label='{{ i18n "pages.inbounds.stream.tcp.requestHeader" }}'>
|
||||
<a-button
|
||||
icon="plus"
|
||||
size="small"
|
||||
@click="inbound.stream.tcp.request.addHeader('Host', '')"
|
||||
></a-button>
|
||||
<a-button icon="plus" size="small" @click="inbound.stream.tcp.request.addHeader('Host', '')"></a-button>
|
||||
</a-form-item>
|
||||
<a-form-item :wrapper-col="{span:24}">
|
||||
<a-input-group
|
||||
compact
|
||||
v-for="(header, index) in inbound.stream.tcp.request.headers"
|
||||
>
|
||||
<a-input
|
||||
:style="{ width: '50%' }"
|
||||
v-model.trim="header.name"
|
||||
placeholder='{{ i18n "pages.inbounds.stream.general.name" }}'
|
||||
>
|
||||
<template slot="addonBefore" :style="{ margin: '0' }"
|
||||
>[[ index+1 ]]</template
|
||||
>
|
||||
<a-input-group compact v-for="(header, index) in inbound.stream.tcp.request.headers">
|
||||
<a-input :style="{ width: '50%' }" v-model.trim="header.name"
|
||||
placeholder='{{ i18n "pages.inbounds.stream.general.name" }}'>
|
||||
<template slot="addonBefore" :style="{ margin: '0' }">[[ index+1 ]]</template>
|
||||
</a-input>
|
||||
<a-input
|
||||
:style="{ width: '50%' }"
|
||||
v-model.trim="header.value"
|
||||
placeholder='{{ i18n "pages.inbounds.stream.general.value" }}'
|
||||
>
|
||||
<a-button
|
||||
icon="minus"
|
||||
slot="addonAfter"
|
||||
size="small"
|
||||
@click="inbound.stream.tcp.request.removeHeader(index)"
|
||||
></a-button>
|
||||
<a-input :style="{ width: '50%' }" v-model.trim="header.value"
|
||||
placeholder='{{ i18n "pages.inbounds.stream.general.value" }}'>
|
||||
<a-button icon="minus" slot="addonAfter" size="small"
|
||||
@click="inbound.stream.tcp.request.removeHeader(index)"></a-button>
|
||||
</a-input>
|
||||
</a-input-group>
|
||||
</a-form-item>
|
||||
|
||||
<!-- tcp response -->
|
||||
<a-divider :style="{ margin: '0' }"
|
||||
>{{ i18n "pages.inbounds.stream.general.response" }}</a-divider
|
||||
>
|
||||
<a-divider :style="{ margin: '0' }">{{ i18n "pages.inbounds.stream.general.response" }}</a-divider>
|
||||
<a-form-item label='{{ i18n "pages.inbounds.stream.tcp.version" }}'>
|
||||
<a-input v-model.trim="inbound.stream.tcp.response.version"></a-input>
|
||||
</a-form-item>
|
||||
@@ -103,40 +60,22 @@
|
||||
<a-input v-model.trim="inbound.stream.tcp.response.reason"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label='{{ i18n "pages.inbounds.stream.tcp.responseHeader" }}'>
|
||||
<a-button
|
||||
icon="plus"
|
||||
size="small"
|
||||
@click="inbound.stream.tcp.response.addHeader('Content-Type', 'application/octet-stream')"
|
||||
></a-button>
|
||||
<a-button icon="plus" size="small"
|
||||
@click="inbound.stream.tcp.response.addHeader('Content-Type', 'application/octet-stream')"></a-button>
|
||||
</a-form-item>
|
||||
<a-form-item :wrapper-col="{span:24}">
|
||||
<a-input-group
|
||||
compact
|
||||
v-for="(header, index) in inbound.stream.tcp.response.headers"
|
||||
>
|
||||
<a-input
|
||||
:style="{ width: '50%' }"
|
||||
v-model.trim="header.name"
|
||||
placeholder='{{ i18n "pages.inbounds.stream.general.name" }}'
|
||||
>
|
||||
<template slot="addonBefore" :style="{ margin: '0' }"
|
||||
>[[ index+1 ]]</template
|
||||
>
|
||||
<a-input-group compact v-for="(header, index) in inbound.stream.tcp.response.headers">
|
||||
<a-input :style="{ width: '50%' }" v-model.trim="header.name"
|
||||
placeholder='{{ i18n "pages.inbounds.stream.general.name" }}'>
|
||||
<template slot="addonBefore" :style="{ margin: '0' }">[[ index+1 ]]</template>
|
||||
</a-input>
|
||||
<a-input
|
||||
:style="{ width: '50%' }"
|
||||
v-model.trim="header.value"
|
||||
placeholder='{{ i18n "pages.inbounds.stream.general.value" }}'
|
||||
>
|
||||
<a-input :style="{ width: '50%' }" v-model.trim="header.value"
|
||||
placeholder='{{ i18n "pages.inbounds.stream.general.value" }}'>
|
||||
<template slot="addonAfter">
|
||||
<a-button
|
||||
icon="minus"
|
||||
size="small"
|
||||
@click="inbound.stream.tcp.response.removeHeader(index)"
|
||||
></a-button>
|
||||
<a-button icon="minus" size="small" @click="inbound.stream.tcp.response.removeHeader(index)"></a-button>
|
||||
</template>
|
||||
</a-input>
|
||||
</a-input-group>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
{{end}}
|
||||
{{end}}
|
||||
@@ -1,9 +1,5 @@
|
||||
{{define "form/streamWS"}}
|
||||
<a-form
|
||||
:colon="false"
|
||||
:label-col="{ md: {span:8} }"
|
||||
:wrapper-col="{ md: {span:14} }"
|
||||
>
|
||||
<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
|
||||
<a-form-item label="Proxy Protocol">
|
||||
<a-switch v-model="inbound.stream.ws.acceptProxyProtocol"></a-switch>
|
||||
</a-form-item>
|
||||
@@ -14,42 +10,22 @@
|
||||
<a-input v-model.trim="inbound.stream.ws.path"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="Heartbeat Period">
|
||||
<a-input-number
|
||||
v-model.number="inbound.stream.ws.heartbeatPeriod"
|
||||
:min="0"
|
||||
></a-input-number>
|
||||
<a-input-number v-model.number="inbound.stream.ws.heartbeatPeriod" :min="0"></a-input-number>
|
||||
</a-form-item>
|
||||
<a-form-item label='{{ i18n "pages.inbounds.stream.tcp.requestHeader" }}'>
|
||||
<a-button
|
||||
icon="plus"
|
||||
size="small"
|
||||
@click="inbound.stream.ws.addHeader('', '')"
|
||||
></a-button>
|
||||
<a-button icon="plus" size="small" @click="inbound.stream.ws.addHeader('', '')"></a-button>
|
||||
</a-form-item>
|
||||
<a-form-item :wrapper-col="{span:24}">
|
||||
<a-input-group compact v-for="(header, index) in inbound.stream.ws.headers">
|
||||
<a-input
|
||||
:style="{ width: '50%' }"
|
||||
v-model.trim="header.name"
|
||||
placeholder='{{ i18n "pages.inbounds.stream.general.name"}}'
|
||||
>
|
||||
<template slot="addonBefore" :style="{ margin: '0' }"
|
||||
>[[ index+1 ]]</template
|
||||
>
|
||||
<a-input :style="{ width: '50%' }" v-model.trim="header.name"
|
||||
placeholder='{{ i18n "pages.inbounds.stream.general.name"}}'>
|
||||
<template slot="addonBefore" :style="{ margin: '0' }">[[ index+1 ]]</template>
|
||||
</a-input>
|
||||
<a-input
|
||||
:style="{ width: '50%' }"
|
||||
v-model.trim="header.value"
|
||||
placeholder='{{ i18n "pages.inbounds.stream.general.value" }}'
|
||||
>
|
||||
<a-button
|
||||
icon="minus"
|
||||
slot="addonAfter"
|
||||
size="small"
|
||||
@click="inbound.stream.ws.removeHeader(index)"
|
||||
></a-button>
|
||||
<a-input :style="{ width: '50%' }" v-model.trim="header.value"
|
||||
placeholder='{{ i18n "pages.inbounds.stream.general.value" }}'>
|
||||
<a-button icon="minus" slot="addonAfter" size="small" @click="inbound.stream.ws.removeHeader(index)"></a-button>
|
||||
</a-input>
|
||||
</a-input-group>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
{{end}}
|
||||
{{end}}
|
||||
@@ -1,9 +1,5 @@
|
||||
{{define "form/streamXHTTP"}}
|
||||
<a-form
|
||||
:colon="false"
|
||||
:label-col="{ md: {span:8} }"
|
||||
:wrapper-col="{ md: {span:14} }"
|
||||
>
|
||||
<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
|
||||
<a-form-item label='{{ i18n "host" }}'>
|
||||
<a-input v-model.trim="inbound.stream.xhttp.host"></a-input>
|
||||
</a-form-item>
|
||||
@@ -11,69 +7,34 @@
|
||||
<a-input v-model.trim="inbound.stream.xhttp.path"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label='{{ i18n "pages.inbounds.stream.tcp.requestHeader" }}'>
|
||||
<a-button
|
||||
icon="plus"
|
||||
size="small"
|
||||
@click="inbound.stream.xhttp.addHeader('', '')"
|
||||
></a-button>
|
||||
<a-button icon="plus" size="small" @click="inbound.stream.xhttp.addHeader('', '')"></a-button>
|
||||
</a-form-item>
|
||||
<a-form-item :wrapper-col="{span:24}">
|
||||
<a-input-group
|
||||
compact
|
||||
v-for="(header, index) in inbound.stream.xhttp.headers"
|
||||
>
|
||||
<a-input
|
||||
:style="{ width: '50%' }"
|
||||
v-model.trim="header.name"
|
||||
placeholder='{{ i18n "pages.inbounds.stream.general.name"}}'
|
||||
>
|
||||
<template slot="addonBefore" :style="{ margin: '0' }"
|
||||
>[[ index+1 ]]</template
|
||||
>
|
||||
<a-input-group compact v-for="(header, index) in inbound.stream.xhttp.headers">
|
||||
<a-input :style="{ width: '50%' }" v-model.trim="header.name"
|
||||
placeholder='{{ i18n "pages.inbounds.stream.general.name"}}'>
|
||||
<template slot="addonBefore" :style="{ margin: '0' }">[[ index+1 ]]</template>
|
||||
</a-input>
|
||||
<a-input
|
||||
:style="{ width: '50%' }"
|
||||
v-model.trim="header.value"
|
||||
placeholder='{{ i18n "pages.inbounds.stream.general.value" }}'
|
||||
>
|
||||
<a-button
|
||||
icon="minus"
|
||||
slot="addonAfter"
|
||||
size="small"
|
||||
@click="inbound.stream.xhttp.removeHeader(index)"
|
||||
></a-button>
|
||||
<a-input :style="{ width: '50%' }" v-model.trim="header.value"
|
||||
placeholder='{{ i18n "pages.inbounds.stream.general.value" }}'>
|
||||
<a-button icon="minus" slot="addonAfter" size="small"
|
||||
@click="inbound.stream.xhttp.removeHeader(index)"></a-button>
|
||||
</a-input>
|
||||
</a-input-group>
|
||||
</a-form-item>
|
||||
<a-form-item label="Mode">
|
||||
<a-select
|
||||
v-model="inbound.stream.xhttp.mode"
|
||||
:style="{ width: '50%' }"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme"
|
||||
>
|
||||
<a-select-option v-for="key in MODE_OPTION" :value="key"
|
||||
>[[ key ]]</a-select-option
|
||||
>
|
||||
<a-select v-model="inbound.stream.xhttp.mode" :style="{ width: '50%' }"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme">
|
||||
<a-select-option v-for="key in MODE_OPTION" :value="key">[[ key ]]</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
label="Max Buffered Upload"
|
||||
v-if="inbound.stream.xhttp.mode === 'packet-up'"
|
||||
>
|
||||
<a-input-number
|
||||
v-model.number="inbound.stream.xhttp.scMaxBufferedPosts"
|
||||
></a-input-number>
|
||||
<a-form-item label="Max Buffered Upload" v-if="inbound.stream.xhttp.mode === 'packet-up'">
|
||||
<a-input-number v-model.number="inbound.stream.xhttp.scMaxBufferedPosts"></a-input-number>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
label="Max Upload Size (Byte)"
|
||||
v-if="inbound.stream.xhttp.mode === 'packet-up'"
|
||||
>
|
||||
<a-form-item label="Max Upload Size (Byte)" v-if="inbound.stream.xhttp.mode === 'packet-up'">
|
||||
<a-input v-model.trim="inbound.stream.xhttp.scMaxEachPostBytes"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
label="Stream-Up Server"
|
||||
v-if="inbound.stream.xhttp.mode === 'stream-up'"
|
||||
>
|
||||
<a-form-item label="Stream-Up Server" v-if="inbound.stream.xhttp.mode === 'stream-up'">
|
||||
<a-input v-model.trim="inbound.stream.xhttp.scStreamUpServerSecs"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="Padding Bytes">
|
||||
@@ -84,22 +45,13 @@
|
||||
</a-form-item>
|
||||
<template v-if="inbound.stream.xhttp.xPaddingObfsMode">
|
||||
<a-form-item label="Padding Key">
|
||||
<a-input
|
||||
v-model.trim="inbound.stream.xhttp.xPaddingKey"
|
||||
placeholder="x_padding"
|
||||
></a-input>
|
||||
<a-input v-model.trim="inbound.stream.xhttp.xPaddingKey" placeholder="x_padding"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="Padding Header">
|
||||
<a-input
|
||||
v-model.trim="inbound.stream.xhttp.xPaddingHeader"
|
||||
placeholder="X-Padding"
|
||||
></a-input>
|
||||
<a-input v-model.trim="inbound.stream.xhttp.xPaddingHeader" placeholder="X-Padding"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="Padding Placement">
|
||||
<a-select
|
||||
v-model="inbound.stream.xhttp.xPaddingPlacement"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme"
|
||||
>
|
||||
<a-select v-model="inbound.stream.xhttp.xPaddingPlacement" :dropdown-class-name="themeSwitcher.currentTheme">
|
||||
<a-select-option value>Default (queryInHeader)</a-select-option>
|
||||
<a-select-option value="queryInHeader">queryInHeader</a-select-option>
|
||||
<a-select-option value="header">header</a-select-option>
|
||||
@@ -108,10 +60,7 @@
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item label="Padding Method">
|
||||
<a-select
|
||||
v-model="inbound.stream.xhttp.xPaddingMethod"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme"
|
||||
>
|
||||
<a-select v-model="inbound.stream.xhttp.xPaddingMethod" :dropdown-class-name="themeSwitcher.currentTheme">
|
||||
<a-select-option value>Default (repeat-x)</a-select-option>
|
||||
<a-select-option value="repeat-x">repeat-x</a-select-option>
|
||||
<a-select-option value="tokenish">tokenish</a-select-option>
|
||||
@@ -119,10 +68,7 @@
|
||||
</a-form-item>
|
||||
</template>
|
||||
<a-form-item label="Uplink HTTP Method">
|
||||
<a-select
|
||||
v-model="inbound.stream.xhttp.uplinkHTTPMethod"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme"
|
||||
>
|
||||
<a-select v-model="inbound.stream.xhttp.uplinkHTTPMethod" :dropdown-class-name="themeSwitcher.currentTheme">
|
||||
<a-select-option value>Default (POST)</a-select-option>
|
||||
<a-select-option value="POST">POST</a-select-option>
|
||||
<a-select-option value="PUT">PUT</a-select-option>
|
||||
@@ -130,10 +76,7 @@
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item label="Session Placement">
|
||||
<a-select
|
||||
v-model="inbound.stream.xhttp.sessionPlacement"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme"
|
||||
>
|
||||
<a-select v-model="inbound.stream.xhttp.sessionPlacement" :dropdown-class-name="themeSwitcher.currentTheme">
|
||||
<a-select-option value>Default (path)</a-select-option>
|
||||
<a-select-option value="path">path</a-select-option>
|
||||
<a-select-option value="header">header</a-select-option>
|
||||
@@ -141,20 +84,12 @@
|
||||
<a-select-option value="query">query</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
label="Session Key"
|
||||
v-if="inbound.stream.xhttp.sessionPlacement && inbound.stream.xhttp.sessionPlacement !== 'path'"
|
||||
>
|
||||
<a-input
|
||||
v-model.trim="inbound.stream.xhttp.sessionKey"
|
||||
placeholder="x_session"
|
||||
></a-input>
|
||||
<a-form-item label="Session Key"
|
||||
v-if="inbound.stream.xhttp.sessionPlacement && inbound.stream.xhttp.sessionPlacement !== 'path'">
|
||||
<a-input v-model.trim="inbound.stream.xhttp.sessionKey" placeholder="x_session"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item label="Sequence Placement">
|
||||
<a-select
|
||||
v-model="inbound.stream.xhttp.seqPlacement"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme"
|
||||
>
|
||||
<a-select v-model="inbound.stream.xhttp.seqPlacement" :dropdown-class-name="themeSwitcher.currentTheme">
|
||||
<a-select-option value>Default (path)</a-select-option>
|
||||
<a-select-option value="path">path</a-select-option>
|
||||
<a-select-option value="header">header</a-select-option>
|
||||
@@ -162,23 +97,12 @@
|
||||
<a-select-option value="query">query</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
label="Sequence Key"
|
||||
v-if="inbound.stream.xhttp.seqPlacement && inbound.stream.xhttp.seqPlacement !== 'path'"
|
||||
>
|
||||
<a-input
|
||||
v-model.trim="inbound.stream.xhttp.seqKey"
|
||||
placeholder="x_seq"
|
||||
></a-input>
|
||||
<a-form-item label="Sequence Key"
|
||||
v-if="inbound.stream.xhttp.seqPlacement && inbound.stream.xhttp.seqPlacement !== 'path'">
|
||||
<a-input v-model.trim="inbound.stream.xhttp.seqKey" placeholder="x_seq"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
label="Uplink Data Placement"
|
||||
v-if="inbound.stream.xhttp.mode === 'packet-up'"
|
||||
>
|
||||
<a-select
|
||||
v-model="inbound.stream.xhttp.uplinkDataPlacement"
|
||||
:dropdown-class-name="themeSwitcher.currentTheme"
|
||||
>
|
||||
<a-form-item label="Uplink Data Placement" v-if="inbound.stream.xhttp.mode === 'packet-up'">
|
||||
<a-select v-model="inbound.stream.xhttp.uplinkDataPlacement" :dropdown-class-name="themeSwitcher.currentTheme">
|
||||
<a-select-option value>Default (body)</a-select-option>
|
||||
<a-select-option value="body">body</a-select-option>
|
||||
<a-select-option value="header">header</a-select-option>
|
||||
@@ -186,27 +110,17 @@
|
||||
<a-select-option value="query">query</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
label="Uplink Data Key"
|
||||
v-if="inbound.stream.xhttp.mode === 'packet-up' && inbound.stream.xhttp.uplinkDataPlacement && inbound.stream.xhttp.uplinkDataPlacement !== 'body'"
|
||||
>
|
||||
<a-input
|
||||
v-model.trim="inbound.stream.xhttp.uplinkDataKey"
|
||||
placeholder="x_data"
|
||||
></a-input>
|
||||
<a-form-item label="Uplink Data Key"
|
||||
v-if="inbound.stream.xhttp.mode === 'packet-up' && inbound.stream.xhttp.uplinkDataPlacement && inbound.stream.xhttp.uplinkDataPlacement !== 'body'">
|
||||
<a-input v-model.trim="inbound.stream.xhttp.uplinkDataKey" placeholder="x_data"></a-input>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
label="Uplink Chunk Size"
|
||||
v-if="inbound.stream.xhttp.mode === 'packet-up' && inbound.stream.xhttp.uplinkDataPlacement && inbound.stream.xhttp.uplinkDataPlacement !== 'body'"
|
||||
>
|
||||
<a-input-number
|
||||
v-model.number="inbound.stream.xhttp.uplinkChunkSize"
|
||||
:min="0"
|
||||
placeholder="0 (unlimited)"
|
||||
></a-input-number>
|
||||
<a-form-item label="Uplink Chunk Size"
|
||||
v-if="inbound.stream.xhttp.mode === 'packet-up' && inbound.stream.xhttp.uplinkDataPlacement && inbound.stream.xhttp.uplinkDataPlacement !== 'body'">
|
||||
<a-input-number v-model.number="inbound.stream.xhttp.uplinkChunkSize" :min="0"
|
||||
placeholder="0 (unlimited)"></a-input-number>
|
||||
</a-form-item>
|
||||
<a-form-item label="No SSE Header">
|
||||
<a-switch v-model="inbound.stream.xhttp.noSSEHeader"></a-switch>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
{{end}}
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user