🚧 htts2http插件应用
This commit is contained in:
parent
ae4b346084
commit
5e436ccaf1
@ -63,7 +63,10 @@ const defaultForm = ref<Proxy>({
|
|||||||
httpUser: "",
|
httpUser: "",
|
||||||
httpPassword: "",
|
httpPassword: "",
|
||||||
fallbackTo: "",
|
fallbackTo: "",
|
||||||
fallbackTimeoutMs: 500
|
fallbackTimeoutMs: 500,
|
||||||
|
https2http: false,
|
||||||
|
https2httpCaFile: "",
|
||||||
|
https2httpKeyFile: ""
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -727,7 +730,9 @@ onUnmounted(() => {
|
|||||||
<div
|
<div
|
||||||
class="text-sm text-center"
|
class="text-sm text-center"
|
||||||
v-if="
|
v-if="
|
||||||
(proxy.type !== 'stcp' && proxy.type !== 'xtcp' && proxy.type !== 'sudp') ||
|
(proxy.type !== 'stcp' &&
|
||||||
|
proxy.type !== 'xtcp' &&
|
||||||
|
proxy.type !== 'sudp') ||
|
||||||
proxy.stcpModel !== 'visitors'
|
proxy.stcpModel !== 'visitors'
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
@ -738,7 +743,9 @@ onUnmounted(() => {
|
|||||||
<div
|
<div
|
||||||
class="text-sm text-center"
|
class="text-sm text-center"
|
||||||
v-if="
|
v-if="
|
||||||
(proxy.type === 'stcp' || proxy.type === 'xtcp' || proxy.type === 'sudp') &&
|
(proxy.type === 'stcp' ||
|
||||||
|
proxy.type === 'xtcp' ||
|
||||||
|
proxy.type === 'sudp') &&
|
||||||
proxy.stcpModel === 'visitors'
|
proxy.stcpModel === 'visitors'
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
@ -749,7 +756,9 @@ onUnmounted(() => {
|
|||||||
<div
|
<div
|
||||||
class="text-sm text-center"
|
class="text-sm text-center"
|
||||||
v-if="
|
v-if="
|
||||||
(proxy.type === 'stcp' || proxy.type === 'xtcp' || proxy.type === 'sudp') &&
|
(proxy.type === 'stcp' ||
|
||||||
|
proxy.type === 'xtcp' ||
|
||||||
|
proxy.type === 'sudp') &&
|
||||||
proxy.stcpModel === 'visitors'
|
proxy.stcpModel === 'visitors'
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
@ -760,7 +769,9 @@ onUnmounted(() => {
|
|||||||
<div
|
<div
|
||||||
class="text-sm text-center"
|
class="text-sm text-center"
|
||||||
v-if="
|
v-if="
|
||||||
(proxy.type === 'stcp' || proxy.type === 'xtcp' || proxy.type === 'sudp') &&
|
(proxy.type === 'stcp' ||
|
||||||
|
proxy.type === 'xtcp' ||
|
||||||
|
proxy.type === 'sudp') &&
|
||||||
proxy.stcpModel === 'visitors'
|
proxy.stcpModel === 'visitors'
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
@ -1089,6 +1100,113 @@ onUnmounted(() => {
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-if="isHttps">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="https2http:" prop="https2http">
|
||||||
|
<el-switch
|
||||||
|
active-text="开"
|
||||||
|
inline-prompt
|
||||||
|
inactive-text="关"
|
||||||
|
v-model="editForm.https2http"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="24" v-if="editForm.https2http">
|
||||||
|
<el-form-item
|
||||||
|
label="证书文件:"
|
||||||
|
prop="https2httpCaFile"
|
||||||
|
label-width="180"
|
||||||
|
>
|
||||||
|
<!-- <template #label>
|
||||||
|
<div class="h-full flex items-center mr-1">
|
||||||
|
<el-popover width="310" placement="top" trigger="hover">
|
||||||
|
<template #default>
|
||||||
|
对应参数:<span class="font-black text-[#5A3DAA]"
|
||||||
|
>transport.tls.trustedCaFile</span
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
<template #reference>
|
||||||
|
<IconifyIconOffline
|
||||||
|
class="text-base"
|
||||||
|
color="#5A3DAA"
|
||||||
|
icon="info"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-popover>
|
||||||
|
</div>
|
||||||
|
CA 证书文件:
|
||||||
|
</template> -->
|
||||||
|
<el-input
|
||||||
|
class="button-input"
|
||||||
|
v-model="editForm.https2httpCaFile"
|
||||||
|
placeholder="点击选择证书文件"
|
||||||
|
readonly
|
||||||
|
@click="handleSelectFile(1, ['crt', 'pem'])"
|
||||||
|
/>
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- class="ml-2"-->
|
||||||
|
<!-- type="primary"-->
|
||||||
|
<!-- @click="handleSelectFile(3, ['crt'])"-->
|
||||||
|
<!-- >选择-->
|
||||||
|
<!-- </el-button>-->
|
||||||
|
<el-button
|
||||||
|
v-if="editForm.https2httpCaFile"
|
||||||
|
class="ml-2"
|
||||||
|
type="danger"
|
||||||
|
@click="editForm.https2httpCaFile = ''"
|
||||||
|
>清除
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" v-if="editForm.https2http">
|
||||||
|
<el-form-item
|
||||||
|
label="密钥文件:"
|
||||||
|
prop="https2httpKeyFile"
|
||||||
|
label-width="180"
|
||||||
|
>
|
||||||
|
<!-- <template #label>
|
||||||
|
<div class="h-full flex items-center mr-1">
|
||||||
|
<el-popover width="310" placement="top" trigger="hover">
|
||||||
|
<template #default>
|
||||||
|
对应参数:<span class="font-black text-[#5A3DAA]"
|
||||||
|
>transport.tls.trustedCaFile</span
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
<template #reference>
|
||||||
|
<IconifyIconOffline
|
||||||
|
class="text-base"
|
||||||
|
color="#5A3DAA"
|
||||||
|
icon="info"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-popover>
|
||||||
|
</div>
|
||||||
|
CA 证书文件:
|
||||||
|
</template> -->
|
||||||
|
<el-input
|
||||||
|
class="button-input cursor-pointer"
|
||||||
|
v-model="editForm.https2httpKeyFile"
|
||||||
|
placeholder="点击选择密钥文件"
|
||||||
|
readonly
|
||||||
|
@click="handleSelectFile(2, ['key'])"
|
||||||
|
/>
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- class="ml-2"-->
|
||||||
|
<!-- type="primary"-->
|
||||||
|
<!-- @click="handleSelectFile(3, ['crt'])"-->
|
||||||
|
<!-- >选择-->
|
||||||
|
<!-- </el-button>-->
|
||||||
|
<el-button
|
||||||
|
v-if="editForm.https2httpKeyFile"
|
||||||
|
class="ml-2"
|
||||||
|
type="danger"
|
||||||
|
@click="editForm.https2httpKeyFile = ''"
|
||||||
|
>清除
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</template>
|
||||||
<template v-if="isStcpVisitors">
|
<template v-if="isStcpVisitors">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="被访问者代理名称:" prop="serverName">
|
<el-form-item label="被访问者代理名称:" prop="serverName">
|
||||||
|
3
types/global.d.ts
vendored
3
types/global.d.ts
vendored
@ -33,6 +33,9 @@ declare global {
|
|||||||
httpPassword: string;
|
httpPassword: string;
|
||||||
fallbackTo: string;
|
fallbackTo: string;
|
||||||
fallbackTimeoutMs: number;
|
fallbackTimeoutMs: number;
|
||||||
|
https2http: boolean;
|
||||||
|
https2httpCaFile: string;
|
||||||
|
https2httpKeyFile: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user