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