+
+
+
+
+
diff --git a/frontend/src/enums/http-enum.ts b/frontend/src/enums/http-enum.ts
index 5877ca7cb..b8086b693 100644
--- a/frontend/src/enums/http-enum.ts
+++ b/frontend/src/enums/http-enum.ts
@@ -7,6 +7,8 @@ export enum ResultEnum {
EXPIRED = 405,
ERRAUTH = 406,
ERRGLOBALLOADDING = 407,
+ ERRIP = 408,
+ ERRDOMAIN = 409,
TIMEOUT = 20000,
TYPE = 'success',
}
diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts
index a7e877d3d..0540b70b7 100644
--- a/frontend/src/lang/modules/en.ts
+++ b/frontend/src/lang/modules/en.ts
@@ -115,6 +115,9 @@ const message = {
notSafe: 'Access Denied',
safeEntrance1: 'The secure login has been enabled in the current environment',
safeEntrance2: 'Enter the following command on the SSH terminal to view the panel entry: 1pctl user-info',
+ errIP1: 'Authorized IP address access is enabled in the current environment',
+ errDomain1: 'Access domain name binding is enabled in the current environment',
+ errHelper: 'To reset the binding information, run the following command on the SSH terminal: ',
codeInput: 'Please enter the 6-digit verification code of the MFA validator',
mfaTitle: 'MFA Certification',
mfaCode: 'MFA verification code',
@@ -933,6 +936,19 @@ const message = {
complexity: 'Complexity verification',
complexityHelper:
'The password must contain at least eight characters and contain at least three uppercase letters, lowercase letters, digits, and special characters',
+
+ bindDomain: 'Bind domain',
+ bindDomainHelper:
+ 'After the domain binding, only the domain in the setting can be used to access 1Panel service',
+ bindDomainHelper1: 'If the binding domain is empty, the binding of the domain is cancelled',
+ bindDomainWarnning:
+ 'If the binding domain is empty, the binding of the domain is cancelled. Do you want to continue?',
+ allowIPs: 'Authorized IP',
+ allowIPsHelper:
+ 'After setting the authorized IP address, only the IP address in the setting can access the 1Panel service',
+ allowIPsWarnning:
+ '设After setting the authorized IP address, only the IP address in the setting can access the 1Panel service. Do you want to continue?',
+ allowIPsHelper1: 'If the authorized IP address is empty, the authorized IP address is canceled',
mfa: 'MFA',
mfaAlert:
'MFA password is generated based on the current time. Please ensure that the server time is synchronized.',
diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts
index 02b3d600c..f62a42da0 100644
--- a/frontend/src/lang/modules/zh.ts
+++ b/frontend/src/lang/modules/zh.ts
@@ -119,6 +119,9 @@ const message = {
notSafe: '暂无权限访问',
safeEntrance1: '当前环境已经开启了安全入口登录',
safeEntrance2: '在 SSH 终端输入以下命令来查看面板入口: 1pctl user-info',
+ errIP1: '当前环境已经开启了授权 IP 访问',
+ errDomain1: '当前环境已经开启了访问域名绑定',
+ errHelper: '可在 SSH 终端输入以下命令来重置绑定信息: ',
codeInput: '请输入 MFA 验证器的 6 位验证码',
mfaTitle: 'MFA 认证',
mfaCode: 'MFA 验证码',
@@ -965,6 +968,14 @@ const message = {
timeoutHelper: '【 {0} 天后 】面板密码即将过期,过期后需要重新设置密码',
complexity: '密码复杂度验证',
complexityHelper: '开启后密码必须满足密码长度大于 8 位且包含字母、数字及特殊字符',
+ bindDomain: '域名绑定',
+ bindDomainHelper: '设置域名绑定后,仅能通过设置中域名访问 1Panel 服务',
+ bindDomainHelper1: '绑定域名为空时,则取消域名绑定',
+ bindDomainWarnning: '设置域名绑定后,仅能通过设置中域名访问 1Panel 服务,是否继续?',
+ allowIPs: '授权 IP',
+ allowIPsHelper: '设置授权 IP 后,仅有设置中的 IP 可以访问 1Panel 服务',
+ allowIPsWarnning: '设置授权 IP 后,仅有设置中的 IP 可以访问 1Panel 服务,是否继续?',
+ allowIPsHelper1: '授权 IP 为空时,则取消授权 IP',
mfa: '两步验证',
mfaAlert: '两步验证密码是基于当前时间生成,请确保服务器时间已同步',
mfaHelper: '开启后会验证手机应用验证码',
diff --git a/frontend/src/utils/util.ts b/frontend/src/utils/util.ts
index 53d0ef1eb..bccd6d18a 100644
--- a/frontend/src/utils/util.ts
+++ b/frontend/src/utils/util.ts
@@ -158,6 +158,9 @@ export function getIcon(extention: string): string {
}
export function checkIp(value: string): boolean {
+ if (value === '') {
+ return true;
+ }
const reg =
/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/;
if (!reg.test(value) && value !== '') {
diff --git a/frontend/src/views/login/entrance/index.vue b/frontend/src/views/login/entrance/index.vue
index a096cdd44..aafb87c3b 100644
--- a/frontend/src/views/login/entrance/index.vue
+++ b/frontend/src/views/login/entrance/index.vue
@@ -1,6 +1,6 @@