🚧 htts2http插件应用
This commit is contained in:
parent
5e436ccaf1
commit
eaa588698a
@ -90,18 +90,39 @@ remotePort = ${m.remotePort}
|
||||
break;
|
||||
case "http":
|
||||
case "https":
|
||||
const customDomains = m.customDomains.filter(f1 => f1 !== "");
|
||||
if (customDomains && customDomains.length > 0) {
|
||||
toml += `
|
||||
localIP = "${m.localIp}"
|
||||
localPort = ${m.localPort}
|
||||
customDomains=[${m.customDomains.map(m => `"${m}"`)}]
|
||||
`;
|
||||
}
|
||||
if (m.subdomain) {
|
||||
toml += `
|
||||
subdomain="${m.subdomain}"
|
||||
`;
|
||||
}
|
||||
if (m.basicAuth) {
|
||||
toml += `
|
||||
httpUser = "${m.httpUser}"
|
||||
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;
|
||||
case "stcp":
|
||||
case "xtcp":
|
||||
|
@ -147,7 +147,8 @@ const editFormRules = reactive<FormRules>({
|
||||
{ required: true, message: "请选择是否开启HTTP基本认证", 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) {
|
||||
//padding-top: 0;
|
||||
}
|
||||
|
||||
.button-input {
|
||||
width: calc(100% - 68px);
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user