diff --git a/localwaf/index.html b/localwaf/index.html index ece5ad1..ef6f403 100644 --- a/localwaf/index.html +++ b/localwaf/index.html @@ -5,7 +5,7 @@ - SamWaf网站防火墙系统(Web Application Firewall) +
diff --git a/localwaf/package.json b/localwaf/package.json index 56f1c39..84a44d5 100644 --- a/localwaf/package.json +++ b/localwaf/package.json @@ -34,6 +34,8 @@ "vue-baidu-map": "^0.21.22", "vue-clipboard2": "^0.3.1", "vue-codemirror": "^4.0.6", + "vue-i18n": "^8.28.2", + "vue-meta": "^2.4.0", "vue-router": "^3.5.1", "vuex": "^3.6.2", "vuex-router-sync": "^5.0.0" diff --git a/localwaf/src/i18n/en_US.js b/localwaf/src/i18n/en_US.js new file mode 100644 index 0000000..e085443 --- /dev/null +++ b/localwaf/src/i18n/en_US.js @@ -0,0 +1,494 @@ +/** + * SamWaf English Language Pack + * + * common - Common fields + * menu - Left menu + * page - Fields for specific functional pages + */ +export default { + common:{ + confirm: "Confirm", + cancel: "Cancel", + close: "Close", + search: "Search", + all: "All", + details: "Details", + new: "New", + copy: "Copy", + edit: "Edit", + delete: "Delete", + reset: "Reset", + submit: "Submit", + return: "Return", + status: "Status", + remarks: "Remarks", + select_placeholder: "Please select", + placeholder: "Please enter", + placeholder_content: "Please enter content", + debug: "Debug", + confirm_delete: "Confirm delete the selected data?", + data_delete_warning: "After deletion, the data will be removed and cannot be recovered", + create_time: "Creation Time", + op: "Operation Content", + date: "Date", + online_document: "Online Document", + defense_status:{ + all: "All", + stop: "Block", + pass: "Allow", + forbid: "Forbid", + }, + on: "On", + off: "Off" + }, + login:{ + login_title: "Login", + login_sub_title: "SamWaf Website Firewall Management", + login_has_question: "Having trouble?", + login_online_document: "SamWaf Online Documentation", + input_account_placeholder: "Please enter your account:", + input_password_placeholder: "Please enter your password:", + login_btn_title: "Login", + rule:{ + phone: "Phone number is required", + account: "Account is required", + password: "Password is required", + verifyCode: "Verification code is required" + }, + login_success: "Login successful", + }, + topNav:{ + update:{ + has_new_version: "New version available", + }, + contract: "Contact SamWaf", + help_document: "Help Document", + current_server: "Current Server", + system_config: "System Configuration", + dropdown_person_center: "Personal", + dropdown_update: "Update", + dropdown_reboot_waf: "Reboot", + dropdown_logout: "Logout", + }, + dashboard:{ + tip_create_website_title: "You have not created a protected website, click to create one", + tip_create_website_link: "Create now", + tip_modify_pwd_title: "You are still using the default account and password, please change it soon", + tip_modify_pwd_link: "Change now", + counter:{ + today_of_attack_count: "Today's Attack Count", + all_visit_count: "Total Visits Today", + not_normal_visit_count: "Abnormal IPs Today (count)", + qps: "Current QPS", + }, + cycle_title: "Comparison of Attacks and Normal Access Over Time", + cycle_subtitle: "(times)", + cycle_normal_count: "Normal Count This Period", + cycle_attack_count: "Attack Count This Period", + cycle_percent_title: "Proportion of Normal to Attack", + cycle_percent_subtitle: "In the Period", + }, + menu:{ + dashboard: { + parent_title: "Dashboard", + dashboard_title: "Overview Dashboard", + }, + host:{ + parent_title: "Website Protection", + host_title: "Website Protection", + host_detail: "Host Protection Details", + host_protect_rule: "Protection Rules", + host_protect_rule_edit: "Edit Protection Rules", + allow_ip: "IP Allow List", + allow_url: "URL Allow List", + deny_ip: "IP Block List", + deny_url: "URL Block List", + ldp_url: "Protection URL", + cc: "CC Protection", + }, + analysis:{ + parent_title: "Data Analysis", + analysis_title: "Data Analysis", + }, + visit_log:{ + parent_title: "Protection Logs", + visit_title: "Protection Logs", + visit_detail_title: "Protection Details", + }, + account:{ + parent_title: "Account", + account_list_title: "Account List", + account_log_title: "Account Logs", + }, + system:{ + parent_title: "System Settings", + system_log_title: "System Logs", + system_config_title: "Parameter Settings", + system_runtime_title: "Runtime Parameters", + system_one_key_modify_title: "Quick Modification", + }, + pc:{ + parent_title: "Device", + pc_list_title: "Device List", + } + }, + page:{ + account: { + create_account: "Create Account", + login_account_label: "Login Account", + reset_password: "Reset Password", + role: "Role", + role_super_admin: "Super Administrator", + role_admin: "Administrator", + login_password: "Login Password", + super_admin_password: "Super Administrator Password", + new_password: "New Password", + confirm_password: "Confirm Password", + password_mismatch_warning: "The passwords do not match, please check", + admin_delete_warning: "The default admin account cannot be deleted", + }, + account_log:{ + export_logs: "Export Logs", + view_log_dialog_title: "View Log", + operation_account: "Operation Account", + operation_type: "Operation Type", + operation_content: "Operation Content", + cancel: "Cancel", + operation_time: "Operation Time" + }, + analysis:{ + + }, + cc:{ + new_cc_protection: "New CC Protection", + selected_count: "Selected {count} items", + website: "Website", + url: "URL", + rate: "Rate", + limit: "Limit Access Times", + samwaf_cc_protection: "SamWaf Firewall Resists CC Attacks", + input_url_placeholder: "Enter URL (optional)" + }, + visit_log:{ + visit_log: "Protection Logs", + online_document: "Online Document", + website: "Website", + rule_name: "Rule Name", + access_status: "Access Status", + response_code: "Response Code", + access_ip: "Access IP", + access_date: "Access Date", + access_method: "Access Method", + log_archive_db: "Log Archive Database", + guest_identity: "Guest Identity", + time_spent: "Time Spent (ms)", + risk_level: "Risk Level", + trigger_rule: "Trigger Rule", + time: "Time", + domain: "Domain", + request: "Request", + source_ip: "Source IP", + country: "Country", + province: "Province", + city: "City", + access_url: "Access URL", + header: "Header", + status_code: "Response Code", + search_placeholder: "Please enter rule name", + select_placeholder: "Please select defense status", + input_placeholder: "Please enter access method", + date_range_today: "Today", + date_range_last_3_days: "Last 3 Days", + date_range_last_7_days: "Last 7 Days", + date_range_last_300_days: "Last 300 Days", + detail:{ + defense_status: "Defense Status", + visit_time: "Visit", + detection_time: "Detection", + defense_status_step: "Defense Status", + response_status: "Response Status", + request_identifier: "Request Identifier", + request_time: "Request Time", + request_domain: "Request Domain", + request_method: "Request Method", + request_content_size: "Request Content Size", + visitor_ip: "Visitor IP", + add_to_deny_list: "Add to Block List", + visitor_port: "Visitor Port", + request_region: "Request Region", + response_code: "Response Code", + more_info:"More Information", + request_path: "Request Path", + request_header: "Request Header", + request_user_browser: "Request User Browser", + request_cookies: "Request Cookies", + request_body: "Request BODY", + request_form: "Request Form", + response_data: "Response Data", + quick_add_rule: "Quickly Add Rule", + open: "Open", + close: "Close", + add_to_deny_list_confirm_header: "Add to Block List", + add_to_deny_list_confirm_body: "Are you sure you want to add this IP to the block list?", + website_not_exist_warning: "The website does not exist", + back: "Back", + mouse_select_tooltip: "Select the content you want to add with the mouse, then click on the page's blank area" + } + }, + center:{ + switch_local: "Switch to Local (No Remote Access)", + server_switch_button: "Switch Server", + recent_visit_time: "Recent Visit Time", + client_server_name: "Client Name", + client_system_type: "Operating System Type", + client_ip: "IP", + client_port: "Port", + client_new_version: "Version Number", + client_new_version_desc: "Version", + last_visit_time: "Last Visit Time", + }, + host: { + new_protection: "New Protection", + website_protection: "Website Protection", + export_data: "Export Data", + import_data: "Import Data", + website: "Website:", + url: "URL:", + search_placeholder: "Please enter", + search_button: "Search", + core_features: "SamWaf Core Features, All website information, Protection features enabled, etc.", + host: "Website", + host_tips: "Enter the domain name of the website you want to protect: e.g., www.samwaf.com", + host_placeholder: "Please enter the website URL", + port: "Port", + port_placeholder: "Please enter the website port, usually 80/443", + port_tips: "Enter the port of the website you want to protect. 1. HTTP is 80, HTTPS is 443. 2. If you have installed Baota, Nginx, IIS, etc., you need to manually change the port to non-80 or non-443.", + ssl: "SSL", + ssl_tips: "If it is HTTPS, you need to select an encryption certificate. Port 80 does not require one.", + ssl_yes: "Yes", + ssl_no: "No", + ssl_option_yes: "Encryption Certificate (requires certificate upload)", + ssl_option_no: "Non-encrypted", + guard_status_on: "Protected", + guard_status_off: "Not Protected", + auto_start_on: "Auto Start", + auto_start_off: "Manual Start", + tab_base: "Basic Information", + tab_engine: "Engine Built-in Protection", + tab_other: "Other Configurations", + start_status: "Start Status", + guard_status: "Protection Status", + start_status_content: "This feature selects whether to start directly.", + keyfile: "Key String", + keyfile_content: "Usually filename: *.key Content format: -----BEGIN RSA PRIVATE KEY----- Copy all and fill in", + certfile: "Certificate String", + certfile_content: "Usually filename: *.crt Content format: -----BEGIN CERTIFICATE----- Copy all and fill in", + remote_ip: "Backend IP", + remote_ip_content: "If SamWaf and the website are on the same server, fill in 127.0.0.1. If on different servers, please fill in the actual IP.", + remote_port: "Backend Port", + remote_port_content: "Situation 1: If SamWaf and the website are on the same server, the port needs to be changed to 81 or other ports. Situation 2: If on different servers, this can be the original port.", + remarks: "Remarks", + exclude_url_log: "Exclude URL When Logging", + exclude_url_log_tips: "Exclude URL prefix data when logging", + bot_detection: "Bot Detection", + bot_detection_tips: "Detect if search engines are disguised", + sql_injection_detection: "SQL Injection Detection", + sql_injection_detection_tips: "Detect if there is SQL injection", + xss_detection: "XSS Detection", + xss_detection_tips: "Detect if there is XSS attack", + scan_detection: "Scanning Tool Detection", + scan_detection_tips: "Detect if scanning tools are present", + rce_detection: "RCE Detection", + rce_detection_tips: "RCE Remote Attack Detection", + engine_protection: "Engine Built-in Protection", + other_config: "Other Configurations", + guard_status_confirm: "Protection Status Reminder", + guard_status_confirm_content: "Protection Status [On] means real-time protection for this website. Protection Status [Off] means real-time protection is turned off for this website.", + start_status_confirm: "Start Status Reminder", + start_status_confirm_content: "Start Status [On] will normally accept user requests. Start Status [Off] will stop user requests.", + import_file: "Import File", + upload_file: "Upload File", + upload_file_limit_size: "Upload file size within 5MB", + upload_tips: "No file selected", + file_upload_success: "File uploaded successfully", + file_upload_fail: "File upload failed", + file_safety: "File Safety", + back_system_type_baota: "Baota", + back_system_type_phpstudy: "Xiao Pi Panel (phpstudy)", + back_system_type_phpnow: "PHPnow", + back_system_type_default: "Default", + back_system_biz_website: "Pure Website", + back_system_biz_api: "API Business System", + back_system_biz_mange: "Business and Management", + back_system_biz_default: "Default", + delete_confirm_clear_relation: "After deletion, the website information and rules will be cleared and cannot be restored.", + forbid_for_global_site: "Global websites cannot be operated", + forbid_for_global_site_only_change_guard_status: "Global websites can only configure protection status", + host_rule_msg: "Do not fill in HTTP and HTTPS, just enter the domain name." + }, + one_key_mod: { + one_key_placeholder: "Due to the fact that only one program can use Web (port 80, port 443) on a single server, if you need to set Waf as a proxy, you need to change 80 to 81 and 443 to 444 here.\nSamWaf has added a one-click modification of Baota Web port for user convenience. Available only on Linux.", + baota_placeholder: "Baota Nginx configuration default path", + button_one_key_modify: "One-click Modify", + modify_logs: "SamWaf One-click Modification Records", + title_file_path: "File Path", + title_create_time: "Creation Time", + label_op_system: "Operating System", + label_file_path: "File Path", + label_before_content: "Original Content", + label_after_content: "Modified Content", + confirm_delete: "Are you sure you want to delete?", + success_modify_message: "Operation successful", + warning_modify_message: "Operation warning" + }, + ipallow: { + button_add_ip: "Add Allowlist IP", + label_website: "Website", + label_ip: "IP", + alert_message: "SamWaf firewall will ignore IPs in the allowlist." + }, + ipblock: { + button_add_ip: "Add Blocklist IP", + label_website: "Website", + label_ip: "IP", + alert_message: "SamWaf firewall will block access from IPs in the blocklist." + }, + ldpurl: { + new_privacy_url: "Add New Privacy Protection URL", + label_website: "Website", + label_url: "URL", + label_compare_type: "Match Type", + alert_message: "SamWaf will process sensitive data in the specified URL to hide parts of it, such as phone numbers.", + compare_type_option_equal: "Equal", + compare_type_option_pre: "Prefix Match", + compare_type_option_end: "Suffix Match", + compare_type_option_contain: "Contains Match" + }, + urlallow: { + button_add_url: "Add Allowlist URL", + label_website: "Website", + label_url: "URL", + label_compare_type: "Match Type", + alert_message: "SamWaf firewall will ignore URLs in the allowlist during protection.", + compare_type_option_equal: "Equal", + compare_type_option_pre: "Prefix Match", + compare_type_option_end: "Suffix Match", + compare_type_option_contain: "Contains Match" + }, + urlblock: { + button_add_url: "Add Blocklist URL", + label_website: "Website", + label_url: "URL", + label_compare_type: "Match Type", + alert_message: "SamWaf firewall will block access to URLs in the blocklist.", + compare_type_option_equal: "Equal", + compare_type_option_pre: "Prefix Match", + compare_type_option_end: "Suffix Match", + compare_type_option_contain: "Contains Match" + }, + systemconfig: { + new_system_configuration: "Add New System Configuration", + label_configuration_item: "Configuration Item", + label_configuration_value: "Configuration Value" + }, + syslog: { + syslog: "System Log", + label_op_type: "Operation Type", + label_op_content: "Operation Content" + }, + rule: { + button_add_rule: "Add New Rule", + label_website: "Website", + label_rule_name: "Rule Name", + label_rule_version: "Rule Version", + label_rule_status: "Rule Status", + alert_message: "SamWaf defense rules can be edited via scripts (preferred) or interface.", + rule_online_document: "Rule Editing Online Documentation", + rule_on: "Active", + rule_off: "Inactive", + detail: { + recommend_message: "It is recommended to automatically edit defense scripts by selecting feature values from (Log Details) with one click.", + jump_visit_log: "Go to Log List", + jump_online_document: "Defense Rules Online Documentation", + base_info: "Basic Information", + rule_name: "Rule Name", + rule_domain_code: "Protected Website", + rule_salience: "Protection Level", + rule_manual: "Protection Arrangement Method", + rule_dyn_add: "Add New", + relation: "Relation", + condition: "Condition", + built_in_entity_name: "Built-in Entity Name", + scope: "Scope", + value_type: "Value Type", + judgment: "Judgment", + value: "Value", + function_judgment_result: "Function Judgment Result", + assignment: "Assignment", + assignment_area: "Assignment Area", + assignment_detail: "Assignment Details", + method_execution: "Method Execution", + method_execution_area: "Method Execution Area", + method_details: "Method Details", + inner_method: "Built-in Method", + parameter: "Parameters", + write_rule: "Rule Arrangement", + system_variable: "System Variable", + ui_rule_edit: "UI Arrangement", + manual_code_rule_edit: "Manual Code Arrangement", + mf_option_default: "Default", + method_option: "Perform Action", + inner_option_host: "Host", + inner_option_url: "URL", + inner_option_referrer: "Referrer", + inner_option_user_agent: "User-Agent", + inner_option_method: "METHOD", + inner_option_cookies: "Cookies", + inner_option_body: "Body", + inner_option_port: "Request Port", + inner_option_src_ip: "Visitor IP", + inner_option_country: "Visitor Country", + inner_option_province: "Visitor Province", + inner_option_city: "Visitor City", + attr_type_text: "Text", + attr_type_int: "Number", + judge_equal: "Judge if Equal", + judge_not_equal: "Judge if Not Equal", + judge_greater_than: "Judge if Greater Than", + judge_less_than: "Judge if Less Than", + judge_greater_than_equal: "Judge if Greater Than or Equal", + judge_less_than_equal: "Judge if Less Than or Equal", + judge_contain: "Judge if Contains (Function)", + judge_has_prefix: "Judge if Starts With (Function)", + judge_has_suffix: "Judge if Ends With (Function)", + judge_logic_and: "And", + judge_logic_or: "Or" + } + }, + notice: { + notice_title: "Notice", + clear: "Clear", + set_read: "Mark as Read", + empty: "No Notifications", + all: "View All" + }, + right_setting: { + page_setting: "Page Configuration", + theme_mode: "Theme Mode", + theme_color: "Theme Color", + navigation_layout: "Navigation Layout", + element_switches: "Element Switches", + fix_header: "Fixed Header", + fix_sidebar: "Fixed Sidebar", + show_header: "Show Header", + show_breadcrumb: "Show Breadcrumbs", + show_footer: "Show Footer", + use_tabs_router: "Use Multiple Tab Pages", + footer_position: "Footer Inner Collapse", + split_menu: "Split Menu (Effective in Mixed Mode)", + theme_mode_color_light:"Light", + theme_mode_color_dark:"Dark", + theme_mode_color_auto:"Auto", + } + }, +}; diff --git a/localwaf/src/i18n/index.js b/localwaf/src/i18n/index.js new file mode 100644 index 0000000..2a86a11 --- /dev/null +++ b/localwaf/src/i18n/index.js @@ -0,0 +1,15 @@ +import Vue from "vue"; +import VueI18n from "vue-i18n"; +import zh_CN from "./zh_CN"; +import en_US from "./en_US"; +Vue.use(VueI18n); + +const i18n = new VueI18n({ + locale: localStorage.getItem("lang") || "zh_CN", // 语言标识 + messages: { + zh_CN, // 中文语言包 + en_US, // 英文语言包 + }, +}); + +export default i18n; diff --git a/localwaf/src/i18n/zh_CN.js b/localwaf/src/i18n/zh_CN.js new file mode 100644 index 0000000..1b3539b --- /dev/null +++ b/localwaf/src/i18n/zh_CN.js @@ -0,0 +1,500 @@ +/** + * SamWaf 中文语言包 + * + * common 放置一些公共字段 + * menu 左侧菜单 + * page 里面放置对应功能页面的字段 + */ +export default { + common:{ + confirm:"确认", + cancel:"取消", + close:"关闭", + search:"查询", + all:"全部", + details: "详情", + new: "新建", + copy: "复制", + edit: "编辑", + delete: "删除", + reset: "重置", + submit: "提交", + return: "返回", + status: "状态", + remarks: "备注", + select_placeholder: "请选择", + placeholder: "请输入", + placeholder_content: "请输入内容", + debug:'调试', + confirm_delete: "确认删除当前所选数据?", + data_delete_warning: "删除后,数据将被删除,且无法恢复", + create_time: "创建时间", + op: "操作内容", + date:"日期", + online_document:"在线文档", + defense_status:{ + all:"全部", + stop:"阻止", + pass:"放行", + forbid:"禁止", + }, + on:"开启", + of:"关闭" + }, + login:{ + login_title:"登录", + login_sub_title:"SamWaf网站防火墙后台", + login_has_question:"遇到问题?", + login_online_document:"SamWaf在线文档", + input_account_placeholder:"请输入账号:", + input_password_placeholder:"请输入登录密码:", + login_btn_title:"登录", + rule:{ + phone:"手机号必填", + account:"账号必填", + password:"密码必填", + verifyCode:"验证码必填" + }, + login_success:"登录成功", + }, + topNav:{ + update:{ + has_new_version:"有新版本啦", + }, + contract:"联系SamWaf", + help_document:"帮助文档", + current_server:"当前 服务器", + system_config:"系统设置", + dropdown_person_center:"个人中心", + dropdown_update:"升级", + dropdown_reboot_waf:"重启WAF", + dropdown_logout:"退出", + }, + dashboard:{ + tip_create_website_title:"您当前未创建需要防护的网站,点击进行创建", + tip_create_website_link:"马上创建", + tip_modify_pwd_title:"您当前还是使用默认帐号和密码请尽快修改", + tip_modify_pwd_link:"马上修改", + counter:{ + today_of_attack_count:"今日攻击数", + all_visit_count:"今天总访问量", + not_normal_visit_count:"今天异常IP(个)", + qps:"当前QPS", + }, + cycle_title:"周期攻击与正常对比情况", + cycle_subtitle:"(次)", + cycle_normal_count:"本周期正常数", + cycle_attack_count:"本周期攻击数", + cycle_percent_title:"正常攻击占比", + cycle_percent_subtitle:"周期内", + }, + menu:{ + dashboard: { + parent_title:"仪表盘", + dashboard_title:"概览仪表盘", + }, + host:{ + parent_title:"网站防护", + host_title:"网站防护", + host_detail:"主机防护详情", + host_protect_rule:"防御规则", + host_protect_rule_edit:"防御规则编辑", + allow_ip:"IP白名单", + allow_url:"Url白名单", + deny_ip:"IP黑名单", + deny_url:"IP黑名单", + ldp_url:"隐私保护Url", + cc:"cc防御", + }, + analysis:{ + parent_title:"数据分析", + analysis_title:"数据分析", + }, + visit_log:{ + parent_title:"防护日志", + visit_title:"防护日志", + visit_detail_title:"防护详情", + }, + account:{ + parent_title:"账号管理", + account_list_title:"账号列表", + account_log_title:"账号日志", + }, + system:{ + parent_title:"系统设置", + system_log_title:"系统日志", + system_config_title:"参数设置", + system_runtime_title:"运行参数", + system_one_key_modify_title:"一键修改", + }, + pc:{ + parent_title:"设备管理", + pc_list_title:"设备列表", + } + }, + page:{ + account: { + create_account: "新建账号", + login_account_label: "登录帐号", + reset_password: "重置密码", + role: "角色", + role_super_admin: "超级管理员", + role_admin: "管理员", + login_password: "登录密码", + super_admin_password: "超级管理员密码", + new_password: "新密码", + confirm_password: "确认密码", + password_mismatch_warning: "两次输入的密码不相同,请检查", + admin_delete_warning: "默认管理帐号不允许删除", + }, + account_log:{ + export_logs: "导出日志", + view_log_dialog_title: "查看日志", + operation_account: "操作账号", + operation_type: "操作类型", + operation_content: "操作内容", + cancel: "取消", + operation_time: "添加时间" + }, + analysis:{ + + }, + cc:{ + new_cc_protection: "新建CC防护", + selected_count: "已选 {count} 项", + website: "网站", + url: "URL", + rate: "速率", + limit: "限制访问次数", + samwaf_cc_protection: "SamWaf防护墙抵御CC攻击", + input_url_placeholder: "输入URL(可不填)" + }, + visit_log:{ + visit_log: "防御日志", + online_document: "在线文档", + website: "网站", + rule_name: "规则名称", + access_status: "访问状态", + response_code: "响应码", + access_ip: "访问IP", + access_date: "访问日期", + access_method: "访问方法", + log_archive_db: "日志归档库", + guest_identity: "访客身份", + time_spent: "耗时(ms)", + risk_level: "危害程度", + trigger_rule: "触发规则", + time: "时间", + domain: "域名", + request: "请求", + source_ip: "来源IP", + country: "国家", + province: "省份", + city: "城市", + access_url: "访问url", + header: "Header", + status_code: "响应码", + search_placeholder: "请输入规则名称", + select_placeholder: "请选择防御状态", + input_placeholder: "请输入访问方法", + date_range_today: "今天", + date_range_last_3_days: "最近3天", + date_range_last_7_days: "最近7天", + date_range_last_300_days: "最近300天", + detail:{ + defense_status: "防御情况", + visit_time: "访问", + detection_time: "检测", + defense_status_step: "防御状态", + response_status: "响应状态", + request_identifier: "请求标识", + request_time: "请求时间", + request_domain: "请求域名", + request_method: "请求方法", + request_content_size: "请求内容大小", + visitor_ip: "访问者IP", + add_to_deny_list: "加入不允许访问", + visitor_port: "访问者端口", + request_region: "请求地区", + response_code: "响应编码", + more_info:"更多信息", + request_path: "请求路径", + request_header: "请求头", + request_user_browser: "请求用户浏览器", + request_cookies: "请求cookies", + request_body: "请求BODY", + request_form: "请求Form", + response_data: "响应数据", + quick_add_rule: "快捷加入规则", + open: "开", + close: "关", + add_to_deny_list_confirm_header: "加入不允许访问的IP列表", + add_to_deny_list_confirm_body: "你确定要加入不允许访问的IP?", + website_not_exist_warning: "当前网站不存在", + back: "返回", + mouse_select_tooltip: "鼠标选中想要添加的内容后,点击页面空白即可" + } + }, + center:{ + switch_local: "切换本机(不进行远程访问)", + server_switch_button: "切换服务器", + recent_visit_time: "最近访问时间", + client_server_name: "客户端名称", + client_system_type: "操作系统类型", + client_ip: "IP", + client_port: "端口", + client_new_version: "版本号", + client_new_version_desc: "版本", + last_visit_time: "最近访问时间", + }, + host:{ + new_protection: "新建防护", + website_protection: "网站防御", + export_data: "导出数据", + import_data: "导入数据", + website: "网站:", + url: "URL:", + search_placeholder: "请输入", + search_button: "查询", + core_features: "SamWaf核心功能,所有网站信息,防护功能开启等", + host: "网站", + host_tips: "输入您需要防护的网站域名:如 www.samwaf.com", + host_placeholder: "请输入网站的网址", + port: "端口", + port_placeholder: "请输入网站的端口一般是80/443", + port_tips: "输入您需要防护的网站端口 1. http是80 https 是 443 2.如果已经安装了宝塔,Nginx,IIS等 您需要手工改动端口成非80,或者非443端口", + ssl: "加密证书", + ssl_tips: "如果是https需要选择加密证书,80端口不需要", + ssl_yes:"是", + ssl_no:"否", + ssl_option_yes:"加密证书(需上传证书)", + ssl_option_no:"非加密", + guard_status_on: "已防护", + guard_status_off: "未防护", + auto_start_on: "自动启动", + auto_start_off: "手工启动", + tab_base:"基础内容", + tab_engine:"引擎自带防护", + tab_other:"其他配置", + start_status: "启动状态", + guard_status: "防御状态", + start_status_content: "该功能是选择是否直接启动。", + keyfile: "密钥串", + keyfile_content: "通常文件名:*.key 内容格式如下:-----BEGIN RSA PRIVATE KEY----- 全选复制填写进来", + certfile: "证书串", + certfile_content: "通常文件名:*.crt 内容格式如下:-----BEGIN CERTIFICATE----- 全选复制填写进来", + remote_ip: "后端IP", + remote_ip_content: "如SamWaf同网站在同一台服务器 填写127.0.0.1 如果是不同服务器请填写实际IP", + remote_port: "后端端口", + remote_port_content: "情况1,在SamWaf和网站在同一台服务器,那么端口需要写成81等其他端口 情况2:如果不在同一台服务器,那么此处可以原来端口", + remarks: "备注", + exclude_url_log: "记录日志时排除URL", + exclude_url_log_tips: "记录日志时排除URL开头的数据", + bot_detection: "Bot检测", + bot_detection_tips: "检测搜索引擎是否是伪装的", + sql_injection_detection: "Sql注入检测", + sql_injection_detection_tips: "检测是否存在sql注入", + xss_detection: "XSS检测", + xss_detection_tips: "检测是否存在xss攻击", + scan_detection: "扫描工具检测", + scan_detection_tips: "是否检测扫描工具", + rce_detection: "RCE检测", + rce_detection_tips: "RCE远程攻击检测", + engine_protection: "引擎自带防护", + other_config: "其他配置", + guard_status_confirm: "防护状态提示", + guard_status_confirm_content: "防护状态【开启】,该网站进行实时防护。防护状态【关闭】,该网站会关闭实时防护。", + start_status_confirm: "启动状态提示", + start_status_confirm_content:"启动状态【开启】会正常接收用户请求。 启动状态【关闭】会停止用户请求", + import_file: "导入文件", + upload_file: "上传文件", + upload_file_limit_size: "上传文件大小在 5M 以内", + upload_tips: "未选择文件", + file_upload_success: "文件上传成功", + file_upload_fail: "文件上传失败", + file_safety: "文件安全", + back_system_type_baota:"宝塔", + back_system_type_phpstudy:"小皮面板(phpstudy)", + back_system_type_phpnow:"PHPnow", + back_system_type_default:"默认", + back_system_biz_website:"纯网站", + back_system_biz_api:"API业务系统", + back_system_biz_mange:"业务加管理", + back_system_biz_default:"默认", + delete_confirm_clear_relation:"删除后,该网站信息和规则将被清空,且无法恢复", + forbid_for_global_site:"全局网站不能操作", + forbid_for_global_site_only_change_guard_status:"全局网站只能配置保护状态", + host_rule_msg:"主机请不要填写http和https 直接写域名即可", + }, + one_key_mod:{ + one_key_placeholder: "由于单台服务器只能一个程序使用Web(80端口,443端口),所以如果需要让Waf变为前置,那么此处需要将80=》81 ,443=》444。\n" + + " SamWaf为了方便用户部署,新增一键修改宝塔Web端口。仅在Linux下可使用。", + baota_placeholder:"宝塔Nginx配置默认路径", + button_one_key_modify: "一键修改", + modify_logs: "SamWaf一键修改记录", + title_file_path: "文件路径", + title_create_time: "添加时间", + label_op_system: "系统类型", + label_file_path: "文件路径", + label_before_content: "原始内容", + label_after_content: "修改后内容", + confirm_delete: "确认要删除吗", + success_modify_message: "操作成功", + warning_modify_message: "操作警告" + }, + ipallow:{ + button_add_ip: "新建白名单IP", + label_website: "网站", + label_ip: "Ip", + alert_message: "SamWaf防护墙会忽略在白名单内的IP", + }, + ipblock:{ + button_add_ip: "新建黑名单IP", + label_website: "网站", + label_ip: "Ip", + alert_message: "SamWaf防护墙会阻止在黑名单内的IP的访问", + }, + ldpurl:{ + new_privacy_url: "新建隐私保护Url", + label_website: "网站", + label_url: "URL", + label_compare_type: "匹配方式", + alert_message: "SamWaf用户在访问指定的url返回的敏感数据脱敏处理,如手机号会隐藏部分", + compare_type_option_equal:"等于", + compare_type_option_pre:"前缀匹配", + compare_type_option_end:"后缀匹配", + compare_type_option_contain:"包含匹配", + }, + urlallow:{ + button_add_url: "新建白名单URL", + label_website: "网站", + label_url: "Ip", + label_compare_type: "匹配方式", + alert_message: "SamWaf防护墙防护时候会忽略在白名单内的URL", + compare_type_option_equal:"等于", + compare_type_option_pre:"前缀匹配", + compare_type_option_end:"后缀匹配", + compare_type_option_contain:"包含匹配", + }, + urlblock:{ + button_add_url: "新建黑名单URL", + label_website: "网站", + label_url: "Ip", + label_compare_type: "匹配方式", + alert_message: "SamWaf防护墙会阻止访问在限制访问内的URL", + compare_type_option_equal:"等于", + compare_type_option_pre:"前缀匹配", + compare_type_option_end:"后缀匹配", + compare_type_option_contain:"包含匹配", + }, + systemconfig:{ + new_system_configuration: "新建系统配置", + label_configuration_item: "配置项", + label_configuration_value: "配置值", + }, + syslog:{ + syslog:"系统日志", + label_op_type:"操作类型", + label_op_content:"操作内容", + }, + rule:{ + button_add_rule:"新建规则", + label_website: "网站", + label_rule_name: "规则名", + label_rule_version: "规则版本", + label_rule_status: "规则状态", + alert_message: "SamWaf防御规则,可进行脚本(首选),界面编辑", + rule_online_document: "规则编辑在线文档", + rule_on: "生效", + rule_off: "未生效", + detail:{ + recommend_message:"推荐从(日志详情)里面一键选择特征值自动编辑防御脚本", + jump_visit_log:"跳转到日志列表", + jump_online_document:"防御规则在线文档Online", + base_info: "基本信息", + rule_name: "规则名称", + rule_domain_code: "防护网站", + rule_salience: "防护级别", + rule_manual: "防护编排方式", + rule_dyn_add: "新建", + relation: "关系", + condition:"条件", + built_in_entity_name: "内置实体名称", + scope: "作用域", + value_type: "值类型", + judgment: "判断", + value: "值", + function_judgment_result: "函数判断结果", + assignment: "赋值", + assignment_area: "赋值区域", + assignment_detail: "赋值明细", + method_execution: "方法执行", + method_execution_area: "方法执行区域", + method_details: "方法明细", + inner_method: "内置方法", + parameter: "传参", + write_rule: "规则编排", + system_variable: "系统变量", + ui_rule_edit:"界面编排", + manual_code_rule_edit:"手工代码编排", + //options + mf_option_default:"默认", + method_option:"做动作", + //options header + inner_option_host:"主机", + inner_option_url:"URL", + inner_option_referrer:"网站来路(referrer)", + inner_option_user_agent:"用户代理(User-Agent)", + inner_option_method:"METHOD", + inner_option_cookies:"访问COOKIES", + inner_option_body:"访问BODY", + inner_option_port:"请求端口", + inner_option_src_ip:"访客IP", + inner_option_country:"访客归属国家", + inner_option_province:"访客归属省份", + inner_option_city:"访客归属城市", + //options attr + attr_type_text:"文本", + attr_type_int:"数字", + //options judge + judge_equal:"判断是否等于", + judge_not_equal:"判断是否不等于", + judge_greater_than:"判断是否大于", + judge_less_than:"判断是否小于", + judge_greater_than_equal:"判断是否大于等于", + judge_less_than_equal:"判断是否小于等于", + judge_contain:"判断包含(函数)", + judge_has_prefix:"判断开头(函数)", + judge_has_suffix:"判断结尾(函数)", + //options logic relation + judge_logic_and:"并且", + judge_logic_or:"或者", + } + }, + notice:{ + notice_title:"通知", + clear:"清空", + set_read:"设为已读", + empty:"暂无通知", + all:"查看全部", + }, + right_setting:{ + page_setting: "页面配置", + theme_mode: "主题模式", + theme_color: "主题色", + navigation_layout: "导航布局", + element_switches: "元素开关", + fix_header: "固定 Header", + fix_sidebar: "固定 Sidebar", + show_header: "显示 Header", + show_breadcrumb: "显示 Breadcrumbs", + show_footer: "显示 Footer", + use_tabs_router: "使用 多标签Tab页", + footer_position: "footer 内收", + split_menu: "分割菜单(混合模式下有效)", + theme_mode_color_light:"明亮", + theme_mode_color_dark:"暗黑", + theme_mode_color_auto:"跟随系统", + } + } +}; diff --git a/localwaf/src/layouts/components/Breadcrumb.vue b/localwaf/src/layouts/components/Breadcrumb.vue index 24b774d..d38e081 100644 --- a/localwaf/src/layouts/components/Breadcrumb.vue +++ b/localwaf/src/layouts/components/Breadcrumb.vue @@ -1,7 +1,7 @@ diff --git a/localwaf/src/layouts/components/Header.vue b/localwaf/src/layouts/components/Header.vue index aef5636..288e746 100644 --- a/localwaf/src/layouts/components/Header.vue +++ b/localwaf/src/layouts/components/Header.vue @@ -2,7 +2,7 @@
- +

{{update_new_ver}}

@@ -28,40 +28,48 @@ - + - + - + + + + - 当前 服务器{{ current_server.client_server_name }} + {{ $t('topNav.current_server')}} {{ current_server.client_server_name }} @@ -75,7 +83,7 @@

- + @@ -99,7 +107,8 @@ RotateIcon, Icon, MailIcon, - NotificationErrorIcon + NotificationErrorIcon, + ArrowUpDownCircleIcon } from 'tdesign-icons-vue'; import { prefix @@ -129,7 +138,8 @@ RotateIcon, Icon, MailIcon, - NotificationErrorIcon + NotificationErrorIcon, + ArrowUpDownCircleIcon }, props: { theme: String, @@ -173,6 +183,18 @@ /**控制中心相关**/ hasClientServer:false, current_server:"", + /**语言问题**/ + langValue:"zh_CN", + langOptions: [ + { + value: "zh_CN", + label: "中文" + }, + { + value: "en_US", + label: "English" + }, + ] }; }, computed: { @@ -208,6 +230,24 @@ this.init() }, methods: { + // 切换语言 + changeLangEvent(value, context) { + switch (value) { + case "zh_CN": + this.langValue = value; + this.$i18n.locale = this.langValue; + localStorage.setItem("lang",this.langValue) + break; + case "en_US": + this.langValue = value; + this.$i18n.locale = this.langValue; + localStorage.setItem("lang",this.langValue) + break; + default: + break; + } + location.reload(); // 刷新页面 + }, //init init(){ //帐号初始化 @@ -219,6 +259,8 @@ }else{ this.hasClientServer = false } + //多语言 + this.langValue = localStorage.getItem("lang") || "zh_CN" }, //切换服务器 diff --git a/localwaf/src/layouts/components/MenuContent.vue b/localwaf/src/layouts/components/MenuContent.vue index 4b34be2..9860120 100644 --- a/localwaf/src/layouts/components/MenuContent.vue +++ b/localwaf/src/layouts/components/MenuContent.vue @@ -13,7 +13,7 @@ - {{ item.title }} + {{ $t(item.title) }} - {{ item.title }} + {{ $t(item.title) }} - + @@ -49,12 +48,11 @@ - - + +
- - + @@ -62,27 +60,25 @@ - - + + - - + + - 取消 - 确定 + {{ $t('common.close') }} + {{ $t('common.confirm') }}
- - +
- - + @@ -90,22 +86,22 @@ - - + + - - + + - 取消 - 确定 + {{ $t('common.close') }} + {{ $t('common.confirm') }}
- @@ -161,12 +157,12 @@ rules: { host_code: [{ required: true, - message: '请输入网站名称', + message: this.$t('common.placeholder')+this.$t('page.ipallow.website'), type: 'error' }], ip: [{ required: true, - message: '请输入IP', + message: this.$t('common.placeholder')+this.$t('page.ipallow.ip'), type: 'error' }], }, @@ -179,7 +175,7 @@ value: 'first', columns: [ { - title: '网站', + title: this.$t('page.ipallow.website'), align: 'left', width: 250, ellipsis: true, @@ -187,19 +183,19 @@ fixed: 'left', }, { - title: 'IP', + title: this.$t('page.ipallow.ip'), width: 200, ellipsis: true, colKey: 'ip', }, { - title: '备注', + title: this.$t('common.remarks'), width: 200, ellipsis: true, colKey: 'remarks', }, { - title: '添加时间', + title: this.$t('common.create_time'), width: 200, ellipsis: true, colKey: 'create_time', @@ -210,7 +206,7 @@ fixed: 'right', width: 200, colKey: 'op', - title: '操作', + title: this.$t('common.op'), }, ], rowKey: 'code', @@ -242,7 +238,7 @@ const { host } = this.data?. [this.deleteIdx]; - return `确认要删除吗?`; + return this.$t('common.data_delete_warning'); } return ''; }, @@ -306,7 +302,6 @@ return document.querySelector('.tdesign-starter-layout'); }, rehandlePageChange(curr, pageInfo) { - console.log('分页变化', curr, pageInfo); this.pagination.current = curr.current if (this.pagination.pageSize != curr.pageSize) { this.pagination.current = 1 @@ -318,7 +313,6 @@ this.selectedRowKeys = selectedRowKeys; }, rehandleChange(changeParams, triggerAndData) { - console.log('统一Change', changeParams, triggerAndData); }, handleClickEdit(e) { console.log(e) @@ -330,7 +324,6 @@ this.getDetail(id) }, handleAddIpWhite() { - //添加白名单IP this.addFormVisible = true this.formData = { host_code: '', @@ -472,7 +465,6 @@ }) .finally(() => {}); }, - //跳转界面 handleJumpOnlineUrl(){ window.open(this.samwafglobalconfig.getOnlineUrl()+"/guide/IPWhite.html"); }, @@ -483,16 +475,6 @@ diff --git a/localwaf/src/pages/waf/onekeymod/index.vue b/localwaf/src/pages/waf/onekeymod/index.vue index 13948a3..1d65ecd 100644 --- a/localwaf/src/pages/waf/onekeymod/index.vue +++ b/localwaf/src/pages/waf/onekeymod/index.vue @@ -4,30 +4,28 @@
- 由于单台服务器只能一个程序使用Web(80端口,443端口),所以如果需要让Waf变为前置,那么此处需要将80=》81 ,443=》444。 - SamWaf为了方便用户部署,新增一键修改宝塔Web端口。仅在Linux下可使用。 + {{ $t('page.one_key_mod.one_key_placeholder')}} - 宝塔Nginx配置默认路径: - + {{ $t('page.one_key_mod.baota_placeholder') }}: + - 一键修改 -

已选{{ selectedRowKeys.length }}项

+ {{ $t('page.on_key_mod.button_one_key_modify') }}
- 查询 + {{ $t('common.search') }}
- +
@@ -37,8 +35,8 @@ :headerAffixedTop="true" :headerAffixProps="{ offsetTop: offsetTop, container: getContainer }">
@@ -48,33 +46,31 @@ - - +
- - + - + - - + + - - + + - 取消 + {{ $t('common.close') }}
- @@ -131,21 +127,6 @@ import { ...INITIAL_DATA }, rules: { - host_code: [{ - required: true, - message: '请输入网站名称', - type: 'error' - }], - rate: [{ - required: true, - message: '请输入速率', - type: 'error' - }], - limit: [{ - required: true, - message: '请输入访问次数限制', - type: 'error' - }], }, textareaValue: '', prefix, @@ -156,20 +137,20 @@ import { value: 'first', columns: [ { - title: '系统', + title: this.$t('page.one_key_mod.label_op_system'), align: 'left', width: 60, ellipsis: true, colKey: 'op_system', }, { - title: '文件路径', + title: this.$t('page.one_key_mod.label_file_path'), width: 450, ellipsis: true, colKey: 'file_path', }, { - title: '添加时间', + title: this.$t('common.create_time'), width: 130, ellipsis: true, colKey: 'create_time', @@ -179,7 +160,7 @@ import { align: 'left', width: 200, colKey: 'op', - title: '操作', + title: this.$t('common.op'), }, ], rowKey: 'code', @@ -211,7 +192,7 @@ import { const { url } = this.data?. [this.deleteIdx]; - return `确认要删除吗?`; + return this.$t('common.confirm_delete'); } return ''; }, @@ -257,7 +238,6 @@ import { return document.querySelector('.tdesign-starter-layout'); }, rehandlePageChange(curr, pageInfo) { - console.log('分页变化', curr, pageInfo); this.pagination.current = curr.current if (this.pagination.pageSize != curr.pageSize) { this.pagination.current = 1 @@ -269,7 +249,6 @@ import { this.selectedRowKeys = selectedRowKeys; }, rehandleChange(changeParams, triggerAndData) { - console.log('统一Change', changeParams, triggerAndData); }, handleClickEdit(e) { console.log(e) @@ -380,17 +359,6 @@ import { diff --git a/localwaf/src/pages/waf/syslog/index.vue b/localwaf/src/pages/waf/syslog/index.vue index ff21890..8acc942 100644 --- a/localwaf/src/pages/waf/syslog/index.vue +++ b/localwaf/src/pages/waf/syslog/index.vue @@ -3,27 +3,20 @@
- 导出日志 -

已选{{ selectedRowKeys.length }}项

- +
-
- - -
@@ -32,26 +25,24 @@
- - +
- - - + + - - + + - 取消 + {{ $t('common.close') }}
- + - + + +