|
|
@ -31,6 +31,9 @@ |
|
|
|
<el-switch v-model="proxy.sni"></el-switch> |
|
|
|
<el-switch v-model="proxy.sni"></el-switch> |
|
|
|
<span class="input-help">{{ $t('website.sniHelper') }}</span> |
|
|
|
<span class="input-help">{{ $t('website.sniHelper') }}</span> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="proxy_ssl_name" prop="proxySSLName" v-if="proxy.sni"> |
|
|
|
|
|
|
|
<el-input v-model.trim="proxy.proxySSLName"></el-input> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="$t('website.cacheTime')" prop="cacheTime" v-if="proxy.cache"> |
|
|
|
<el-form-item :label="$t('website.cacheTime')" prop="cacheTime" v-if="proxy.cache"> |
|
|
|
<el-input v-model.number="proxy.cacheTime" maxlength="15"> |
|
|
|
<el-input v-model.number="proxy.cacheTime" maxlength="15"> |
|
|
|
<template #append> |
|
|
|
<template #append> |
|
|
@ -47,7 +50,7 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-row :gutter="10"> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item :label="$t('website.proxyPass')" prop="proxyPass"> |
|
|
|
<el-form-item :label="$t('website.proxyPass')" prop="proxyAddress"> |
|
|
|
<el-input |
|
|
|
<el-input |
|
|
|
v-model.trim="proxy.proxyAddress" |
|
|
|
v-model.trim="proxy.proxyAddress" |
|
|
|
:placeholder="$t('website.proxyHelper')" |
|
|
|
:placeholder="$t('website.proxyHelper')" |
|
|
@ -139,6 +142,7 @@ const rules = ref({ |
|
|
|
cacheTime: [Rules.requiredInput, checkNumberRange(1, 65535)], |
|
|
|
cacheTime: [Rules.requiredInput, checkNumberRange(1, 65535)], |
|
|
|
proxyPass: [Rules.requiredInput], |
|
|
|
proxyPass: [Rules.requiredInput], |
|
|
|
proxyHost: [Rules.requiredInput], |
|
|
|
proxyHost: [Rules.requiredInput], |
|
|
|
|
|
|
|
proxyAddress: [Rules.requiredInput], |
|
|
|
}); |
|
|
|
}); |
|
|
|
const open = ref(false); |
|
|
|
const open = ref(false); |
|
|
|
const loading = ref(false); |
|
|
|
const loading = ref(false); |
|
|
@ -159,6 +163,8 @@ const initData = (): Website.ProxyConfig => ({ |
|
|
|
replaces: {}, |
|
|
|
replaces: {}, |
|
|
|
proxyAddress: '', |
|
|
|
proxyAddress: '', |
|
|
|
proxyProtocol: 'http://', |
|
|
|
proxyProtocol: 'http://', |
|
|
|
|
|
|
|
sni: false, |
|
|
|
|
|
|
|
proxySSLName: '$proxy_host', |
|
|
|
}); |
|
|
|
}); |
|
|
|
let proxy = ref(initData()); |
|
|
|
let proxy = ref(initData()); |
|
|
|
const replaces = ref<any>([]); |
|
|
|
const replaces = ref<any>([]); |
|
|
|