🚧 htts2http插件应用
This commit is contained in:
parent
5e436ccaf1
commit
eaa588698a
@ -90,18 +90,39 @@ remotePort = ${m.remotePort}
|
|||||||
break;
|
break;
|
||||||
case "http":
|
case "http":
|
||||||
case "https":
|
case "https":
|
||||||
toml += `
|
const customDomains = m.customDomains.filter(f1 => f1 !== "");
|
||||||
localIP = "${m.localIp}"
|
if (customDomains && customDomains.length > 0) {
|
||||||
localPort = ${m.localPort}
|
toml += `
|
||||||
customDomains=[${m.customDomains.map(m => `"${m}"`)}]
|
customDomains=[${m.customDomains.map(m => `"${m}"`)}]
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
if (m.subdomain) {
|
||||||
|
toml += `
|
||||||
subdomain="${m.subdomain}"
|
subdomain="${m.subdomain}"
|
||||||
`;
|
`;
|
||||||
|
}
|
||||||
if (m.basicAuth) {
|
if (m.basicAuth) {
|
||||||
toml += `
|
toml += `
|
||||||
httpUser = "${m.httpUser}"
|
httpUser = "${m.httpUser}"
|
||||||
httpPassword = "${m.httpPassword}"
|
httpPassword = "${m.httpPassword}"
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
if (m.https2http) {
|
||||||
|
toml += `
|
||||||
|
[proxies.plugin]
|
||||||
|
type = "https2http"
|
||||||
|
localAddr = "${m.localIp}:${m.localPort}"
|
||||||
|
|
||||||
|
crtPath = "${m.https2httpCaFile}"
|
||||||
|
keyPath = "${m.https2httpCaFile}"
|
||||||
|
`;
|
||||||
|
} else {
|
||||||
|
toml += `
|
||||||
|
localIP = "${m.localIp}"
|
||||||
|
localPort = ${m.localPort}
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "stcp":
|
case "stcp":
|
||||||
case "xtcp":
|
case "xtcp":
|
||||||
|
@ -147,7 +147,8 @@ const editFormRules = reactive<FormRules>({
|
|||||||
{ required: true, message: "请选择是否开启HTTP基本认证", trigger: "blur" }
|
{ required: true, message: "请选择是否开启HTTP基本认证", trigger: "blur" }
|
||||||
],
|
],
|
||||||
httpUser: [{ required: true, message: "请输入认证用户名", trigger: "blur" }],
|
httpUser: [{ required: true, message: "请输入认证用户名", trigger: "blur" }],
|
||||||
httpPassword: [{ required: true, message: "请输入认证密码", trigger: "blur" }]
|
httpPassword: [{ required: true, message: "请输入认证密码", trigger: "blur" }],
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1498,4 +1499,8 @@ onUnmounted(() => {
|
|||||||
:deep(.el-drawer__body) {
|
:deep(.el-drawer__body) {
|
||||||
//padding-top: 0;
|
//padding-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.button-input {
|
||||||
|
width: calc(100% - 68px);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user