mirror of
https://github.com/RuoJi6/ARTEX.git
synced 2026-12-02 12:01:50 +08:00
- Implement full-traffic transparent gateway (cmd/artex-gateway, traffic/netstack.go, traffic/transparent.go) using Linux TUN + gVisor netstack deferred TCP handshakes (eliminating nmap/nc false-positive open ports), real ICMPv4 Echo proxying, UDP/DNS interception, and per-container upstream proxy overrides. - Add egress blacklist + asset-intercept sync, non-HTTP flow/DNS SQLite persistence and APIs, and /system/proxy & /function/traffic TCP/UDP/DNS UI panels. - Fix sandbox Playwright MCP browser loopback --proxy-server rewrite and NODE_EXTRA_CA_CERTS override in server/mcpstdio.go. - Strip all SUID/SGID binaries in Dockerfile.sandbox, grant minimal cap_net_raw+ep to nmap/nping/ping with ARTEX_SANDBOX_ALLOW_NET_RAW toggle, and enforce IPv4/IPv6 anti-spoofing in iptables and netstack. - Remove hardcoded Chinese "(全局)" from GET /api/proxy/routes, localize ContainerRoutesTab / NonHTTPTrafficPanel labels, and expose reactive locale/isEn from useLiveTranslation for React Compiler compatibility.
348 lines
18 KiB
TypeScript
348 lines
18 KiB
TypeScript
import { chatUIMessages } from "./chat-ui-messages";
|
||
import { errorMessages } from "./error-messages";
|
||
import { findingMessages } from "./finding-messages";
|
||
import { inlineEditorMessages } from "./inline-editor-messages";
|
||
import { notifyMessages } from "./notify-messages";
|
||
import { overviewMessages } from "./overview-messages";
|
||
import { scheduleMessages } from "./schedule-messages";
|
||
import screenCatalog from "./screen-catalog.json";
|
||
import { settingsMessages } from "./settings-messages";
|
||
import { settingsRuntimeMessages } from "./settings-runtime-messages";
|
||
import { taskMessages } from "./task-messages";
|
||
import { termsMessages } from "./terms";
|
||
|
||
// Keep both languages together so each product message has an explicit translation.
|
||
export const messages = {
|
||
...(screenCatalog as unknown as Record<string, readonly [string, string]>),
|
||
...termsMessages,
|
||
...taskMessages,
|
||
...notifyMessages,
|
||
...findingMessages,
|
||
...inlineEditorMessages,
|
||
...scheduleMessages,
|
||
...chatUIMessages,
|
||
...errorMessages,
|
||
...overviewMessages,
|
||
...settingsMessages,
|
||
...settingsRuntimeMessages,
|
||
"common.cancel": ["取消", "Cancel"],
|
||
"common.retry": ["重试", "Retry"],
|
||
"common.close": ["关闭", "Close"],
|
||
"common.loading": ["加载中…", "Loading…"],
|
||
"common.search": ["搜索", "Search"],
|
||
"common.all": ["全部", "All"],
|
||
"common.other": ["其他", "Other"],
|
||
"common.previous": ["上一页", "Previous page"],
|
||
"common.next": ["下一页", "Next page"],
|
||
"common.version": ["版本", "Version"],
|
||
"meta.title": ["ARTEX — 自主渗透测试控制台", "ARTEX — Autonomous Pentesting Console"],
|
||
"meta.description": ["LLM 驱动的自主渗透测试系统控制台", "An LLM-powered autonomous penetration testing console"],
|
||
"language.label": ["语言", "Language"],
|
||
"language.change": ["切换语言", "Change language"],
|
||
"nav.features": ["功能", "Features"],
|
||
"nav.system": ["系统", "System"],
|
||
"nav.dashboard": ["仪表盘", "Dashboard"],
|
||
"nav.chat": ["对话", "Chat"],
|
||
"nav.tasks": ["任务", "Tasks"],
|
||
"nav.schedules": ["计划任务", "Schedules"],
|
||
"nav.findings": ["发现", "Findings"],
|
||
"nav.traffic": ["流量", "Traffic"],
|
||
"nav.repeater": ["请求重发", "Repeater"],
|
||
"nav.commands": ["工具执行", "Tool executions"],
|
||
"nav.llm-records": ["LLM 录制", "LLM recordings"],
|
||
"nav.assets": ["资产", "Assets"],
|
||
"nav.sync": ["资产同步", "Asset sync"],
|
||
"nav.workspace": ["工作空间", "Workspace"],
|
||
"nav.llm": ["LLM", "LLM"],
|
||
"nav.agents": ["Agent", "Agents"],
|
||
"nav.mcp": ["MCP", "MCP"],
|
||
"nav.skills": ["Skill", "Skills"],
|
||
"nav.tools": ["工具", "Tools"],
|
||
"nav.notify": ["通知推送", "Notifications"],
|
||
"nav.intercept": ["拦截规则", "Interception rules"],
|
||
"nav.asset-intercept": ["资产拦截", "Asset interception"],
|
||
"nav.approvals": ["审批记录", "Approval history"],
|
||
"nav.sandbox": ["沙箱容器", "Sandbox"],
|
||
"nav.proxy": ["代理与出口", "Proxy & Egress"],
|
||
"nav.logs": ["日志", "Logs"],
|
||
"nav.settings": ["系统配置", "Settings"],
|
||
"search.placeholder": ["搜索页面与功能…", "Search pages and features…"],
|
||
"search.empty": ["没有匹配结果", "No results found"],
|
||
"account.changePassword": ["修改密码", "Change password"],
|
||
"account.logout": ["退出登录", "Sign out"],
|
||
"account.currentPassword": ["当前密码", "Current password"],
|
||
"account.newPassword": ["新密码", "New password"],
|
||
"account.confirmNewPassword": ["确认新密码", "Confirm new password"],
|
||
"account.passwordRequired": ["请填写当前密码和新密码", "Enter your current and new passwords"],
|
||
"account.passwordMismatch": ["两次输入的新密码不一致", "The new passwords do not match"],
|
||
"account.passwordChanged": ["密码已修改", "Password changed"],
|
||
"account.changing": ["修改中…", "Changing…"],
|
||
"account.confirmChange": ["确认修改", "Confirm change"],
|
||
"account.usernameFixed": ["用户名固定为", "The username is"],
|
||
"account.tokenNotice": [
|
||
"。需先输入当前密码验证;修改后已签发的登录 token 仍有效直至过期。",
|
||
". Enter your current password to verify your identity. Existing sign-in tokens remain valid until they expire.",
|
||
],
|
||
"account.changeFailed": ["修改失败:{{message}}", "Could not change password: {{message}}"],
|
||
"auth.backendUnavailable": ["无法连接到后端服务", "Unable to connect to the backend service"],
|
||
"auth.agreementRequired": ["请先阅读并同意《使用须知》", "Read and accept the Terms of Use first"],
|
||
"auth.invalidCredentials": ["用户名或密码错误", "Incorrect username or password"],
|
||
"auth.checking": ["正在检查登录状态…", "Checking sign-in status…"],
|
||
"auth.login": ["登录", "Sign in"],
|
||
"auth.welcome": [
|
||
"欢迎回来,请输入密码以继续使用 ARTEX",
|
||
"Welcome back. Enter your password to continue using ARTEX.",
|
||
],
|
||
"auth.username": ["用户名", "Username"],
|
||
"auth.password": ["密码", "Password"],
|
||
"auth.enterPassword": ["请输入密码", "Enter your password"],
|
||
"auth.agreePrefix": ["我已阅读并同意", "I have read and accept the"],
|
||
"auth.termsLink": ["《使用须知》", "Terms of Use"],
|
||
"auth.signingIn": ["登录中...", "Signing in…"],
|
||
"auth.passwordMismatch": ["两次输入的密码不一致", "The passwords do not match"],
|
||
"auth.passwordMin": ["密码长度至少 8 位", "Use at least 8 characters"],
|
||
"auth.initFailed": ["初始化失败", "Setup failed"],
|
||
"auth.statusUnknown": ["无法确认初始化状态", "Unable to determine setup status"],
|
||
"auth.initPassword": ["初始化密码", "Set up your password"],
|
||
"auth.setupUnavailable": [
|
||
"后端或数据库暂时不可用。为避免覆盖实例上已有的密码,初始化入口已临时关闭——请恢复服务后重试。",
|
||
"The backend or database is temporarily unavailable. Setup is disabled to protect any existing password. Restore the service and try again.",
|
||
],
|
||
"auth.setupWelcome": [
|
||
"首次使用 ARTEX,请为账户设置一个登录密码(至少 8 位)",
|
||
"Welcome to ARTEX. Set a sign-in password with at least 8 characters.",
|
||
],
|
||
"auth.minPlaceholder": ["至少 8 位", "At least 8 characters"],
|
||
"auth.confirmPassword": ["确认密码", "Confirm password"],
|
||
"auth.reenterPassword": ["再次输入密码", "Enter your password again"],
|
||
"auth.saving": ["保存中...", "Saving…"],
|
||
"auth.setupAndLogin": ["设置密码并登录", "Set password and sign in"],
|
||
"mention.finding": ["漏洞", "Finding"],
|
||
"mention.asset": ["资产", "Asset"],
|
||
"mention.company": ["企业", "Company"],
|
||
"mention.endpoint": ["接口", "Endpoint"],
|
||
"mention.ip": ["IP", "IP"],
|
||
"mention.app": ["应用", "Application"],
|
||
"mention.root_domain": ["域名", "Root domain"],
|
||
"mention.subdomain": ["子域名", "Subdomain"],
|
||
"mention.service": ["服务", "Service"],
|
||
"mention.messageLabel": ["消息,输入 @ 引用记录", "Message; type @ to reference a record"],
|
||
"mention.chooseRecord": ["选择引用记录", "Choose a record to reference"],
|
||
"mention.chooseType": ["选择引用类型", "Choose a reference type"],
|
||
"mention.searchType": ["搜索{{kind}}", "Search {{kind}}"],
|
||
"mention.allRecords": ["全部记录", "all records"],
|
||
"mention.keyboard": ["↑↓ 选择 · Enter 确认 · Esc 关闭", "↑↓ select · Enter confirm · Esc close"],
|
||
"mention.candidates": ["引用候选", "Reference suggestions"],
|
||
"mention.searching": ["搜索中…", "Searching…"],
|
||
"mention.searchFailed": [
|
||
"搜索失败:{{error}}。请重新输入重试。",
|
||
"Search failed: {{error}}. Edit the query to retry.",
|
||
],
|
||
"mention.empty": ["没有匹配记录,请更换名称、地址或 ID", "No records found. Try another name, address or ID."],
|
||
"mention.loadingMore": ["正在加载更多…", "Loading more…"],
|
||
"mention.retryPage": ["加载失败,点击重试", "Loading failed. Click to retry."],
|
||
"mention.more": ["已显示 {{count}} 条,向下滚动加载更多", "Showing {{count}} records. Scroll down for more."],
|
||
"mention.more_one": ["已显示 {{count}} 条,向下滚动加载更多", "Showing {{count}} record. Scroll down for more."],
|
||
"mention.more_other": ["已显示 {{count}} 条,向下滚动加载更多", "Showing {{count}} records. Scroll down for more."],
|
||
"mention.all": ["已显示全部 {{count}} 条", "Showing all {{count}} records"],
|
||
"mention.all_one": ["已显示全部 {{count}} 条", "Showing {{count}} record"],
|
||
"mention.all_other": ["已显示全部 {{count}} 条", "Showing all {{count}} records"],
|
||
"mention.searchHelp": ["输入名称、地址或 ID 搜索记录", "Search records by name, address or ID"],
|
||
"mention.remove": ["移除引用 {{label}}", "Remove reference {{label}}"],
|
||
"mention.limit": ["发送时读取最新详情 · 最多 10 条", "Latest details are loaded when sent · Up to 10 references"],
|
||
"pagination.perPage": ["条/页", "per page"],
|
||
"pagination.range": ["{{from}}–{{to}} / 共 {{total}} 条", "{{from}}–{{to}} of {{total}} records"],
|
||
"pagination.range_one": ["{{from}}–{{to}} / 共 {{total}} 条", "{{from}}–{{to}} of {{total}} record"],
|
||
"pagination.range_other": ["{{from}}–{{to}} / 共 {{total}} 条", "{{from}}–{{to}} of {{total}} records"],
|
||
"pagination.empty": ["共 0 条", "0 records"],
|
||
"date.select": ["选择日期", "Select date"],
|
||
"date.clear": ["清除日期", "Clear date"],
|
||
"date.placeholder": ["年 / 月 / 日", "Year / Month / Day"],
|
||
"date.unboundedStart": ["开始不限", "No start date"],
|
||
"date.unboundedEnd": ["结束不限", "No end date"],
|
||
"date.filter": ["时间筛选", "Date filter"],
|
||
"date.filterLabel": ["按时间筛选", "Filter by date"],
|
||
"date.filterTitle": ["按发现时间筛选", "Filter by discovery time"],
|
||
"date.filterHelp": ["选择年月日和时分,范围包含起止时刻。", "Choose dates and times. Both endpoints are included."],
|
||
"date.startTime": ["开始时间", "Start time"],
|
||
"date.endTime": ["结束时间", "End time"],
|
||
"date.startDate": ["开始日期", "Start date"],
|
||
"date.endDate": ["结束日期", "End date"],
|
||
"date.startHourMinute": ["开始时分", "Start time"],
|
||
"date.endHourMinute": ["结束时分", "End time"],
|
||
"date.clearFilter": ["清除时间筛选", "Clear date filter"],
|
||
"time.select": ["选择时间", "Select time"],
|
||
"time.hour": ["小时", "Hour"],
|
||
"time.minute": ["分钟", "Minute"],
|
||
"time.hourLabel": ["{{label}} 小时", "{{label}} hour"],
|
||
"time.minuteLabel": ["{{label}} 分钟", "{{label}} minute"],
|
||
"time.clearEnd": ["清除结束时间", "Clear end time"],
|
||
"time.noEnd": ["不设置结束时间", "No end time"],
|
||
"clock.current": ["当前时间", "Current time"],
|
||
"clock.local": ["当前本地时间", "Current local time"],
|
||
"theme.light": ["浅色", "Light"],
|
||
"theme.dark": ["深色", "Dark"],
|
||
"theme.system": ["跟随系统", "System"],
|
||
"theme.cycle": ["当前主题:{{theme}},点击切换主题", "Current theme: {{theme}}. Click to cycle themes."],
|
||
"layout.preferences": ["偏好设置", "Preferences"],
|
||
"layout.description": ["自定义控制台布局与外观。", "Customize your console layout and appearance."],
|
||
"layout.preset": ["主题预设", "Theme preset"],
|
||
"layout.fonts": ["字体", "Fonts"],
|
||
"layout.selectFont": ["选择字体", "Select font"],
|
||
"layout.themeMode": ["主题模式", "Theme mode"],
|
||
"layout.pageLayout": ["页面布局", "Page layout"],
|
||
"layout.centered": ["居中", "Centered"],
|
||
"layout.fullWidth": ["全宽", "Full width"],
|
||
"layout.navbar": ["顶栏行为", "Navbar behavior"],
|
||
"layout.sticky": ["固定", "Sticky"],
|
||
"layout.scroll": ["随页面滚动", "Scroll"],
|
||
"layout.sidebarStyle": ["侧栏样式", "Sidebar style"],
|
||
"layout.inset": ["内嵌", "Inset"],
|
||
"layout.sidebar": ["侧栏", "Sidebar"],
|
||
"layout.floating": ["悬浮", "Floating"],
|
||
"layout.collapse": ["侧栏折叠方式", "Sidebar collapse mode"],
|
||
"layout.icon": ["图标", "Icons"],
|
||
"layout.offcanvas": ["完全收起", "Off-canvas"],
|
||
"layout.restore": ["恢复默认", "Restore defaults"],
|
||
"ui.previousSlide": ["上一张", "Previous slide"],
|
||
"ui.nextSlide": ["下一张", "Next slide"],
|
||
"ui.mobileSidebar": ["移动端侧栏", "Mobile sidebar"],
|
||
"ui.toggleSidebar": ["切换侧栏", "Toggle sidebar"],
|
||
"ui.morePages": ["更多页面", "More pages"],
|
||
"ui.commandTitle": ["搜索页面与功能", "Search pages and features"],
|
||
"ui.commandDescription": ["输入关键词搜索可用页面与功能。", "Type a keyword to search available pages and features."],
|
||
"ui.sortDescending": ["按{{label}}倒序排序", "Sort {{label}} in descending order"],
|
||
"ui.sortActive": [
|
||
"{{label}}当前{{direction}},点击切换排序方向",
|
||
"{{label}} is sorted {{direction}}. Click to reverse the order.",
|
||
],
|
||
"ui.ascending": ["正序", "ascending"],
|
||
"ui.descending": ["倒序", "descending"],
|
||
"llm.maxTokensFieldHint.gemini": [
|
||
"仅 openai 格式可选。Gemini 的字段名固定为 maxOutputTokens。",
|
||
"Only configurable for the openai format. Gemini uses maxOutputTokens.",
|
||
],
|
||
"findingsCleanup.button": ["一键清理", "One-click cleanup"],
|
||
"findingsCleanup.title": ["一键清理历史漏洞", "Clean up historical findings"],
|
||
"findingsCleanup.description": [
|
||
"永久删除所选范围内的漏洞发现记录及其来源探索节点、复测记录和归并成员关系,删除后无法恢复。",
|
||
"Permanently delete matching findings along with their originating exploration nodes, retest records, and case memberships. This action cannot be undone.",
|
||
],
|
||
"findingsCleanup.scopeLabel": ["清理范围", "Cleanup scope"],
|
||
"findingsCleanup.scopeFiltered": ["当前筛选结果({{count}} 条)", "Current filter results ({{count}})"],
|
||
"findingsCleanup.scopeSelected": ["已勾选漏洞({{count}} 条)", "Selected findings ({{count}})"],
|
||
"findingsCleanup.scopeAll": ["全部历史漏洞", "All historical findings"],
|
||
"findingsCleanup.confirm": ["确认清理", "Confirm cleanup"],
|
||
"findingsCleanup.cleaning": ["清理中…", "Cleaning up…"],
|
||
"findingsCleanup.success": ["已清理 {{count}} 条漏洞", "Deleted {{count}} finding(s)"],
|
||
"findingsCleanup.empty": ["没有符合条件的漏洞可清理", "No matching findings to delete"],
|
||
"findingsCleanup.failed": ["清理失败:{{message}}", "Cleanup failed: {{message}}"],
|
||
"findingsAutoMerge.button": ["AI 自动合并", "AI auto-merge"],
|
||
"findingsAutoMerge.running": ["提交中…", "Submitting…"],
|
||
"findingsAutoMerge.started": [
|
||
"已启动 AI 自动合并({{count}} 个任务),将自动判断并完成合并",
|
||
"Started AI auto-merge for {{count}} task(s); AI will judge and merge automatically",
|
||
],
|
||
"findingsAutoMerge.startedWithSkipped": [
|
||
"已启动 {{count}} 个任务的 AI 自动合并,另有 {{skipped}} 个任务正在合并中",
|
||
"Started AI auto-merge for {{count}} task(s); {{skipped}} task(s) already running",
|
||
],
|
||
"findingsAutoMerge.empty": [
|
||
"没有可由 AI 自动合并的漏洞(同一任务需至少 2 条记录)",
|
||
"No findings eligible for AI auto-merge (at least 2 findings per task required)",
|
||
],
|
||
"findingsAutoMerge.failed": ["启动 AI 自动合并失败:{{message}}", "Failed to start AI auto-merge: {{message}}"],
|
||
"traffic.source": ["来源归属", "Source"],
|
||
"traffic.scopeAll": ["全部来源", "All sources"],
|
||
"traffic.scopeTask": ["任务容器", "Task"],
|
||
"traffic.scopeSession": ["对话容器", "Chat"],
|
||
"traffic.ownerPlaceholder": ["归属 ID(任务/对话)…", "Owner ID (task/chat)…"],
|
||
"traffic.containerPlaceholder": ["容器 ID 前缀…", "Container ID…"],
|
||
"traffic.sourceTask": ["任务 #{{id}}", "Task #{{id}}"],
|
||
"traffic.sourceSession": ["对话 {{id}}", "Chat {{id}}"],
|
||
"traffic.sourceHost": ["宿主机", "Host"],
|
||
} satisfies Record<string, readonly [string, string]>;
|
||
|
||
const statuses: Record<string, readonly (readonly [string, string, string])[]> = {
|
||
intent: [
|
||
["open", "待领", "Unclaimed"],
|
||
["running", "执行中", "Running"],
|
||
["paused", "已暂停", "Paused"],
|
||
["done", "已完成", "Completed"],
|
||
["blocked", "执行出错", "Execution error"],
|
||
["exhausted", "预算耗尽", "Budget exhausted"],
|
||
["stopped", "已停止", "Stopped"],
|
||
["deleted", "已删除", "Deleted"],
|
||
],
|
||
task: [
|
||
["created", "已创建", "Created"],
|
||
["queued", "排队中", "Queued"],
|
||
["running", "运行中", "Running"],
|
||
["paused", "已暂停", "Paused"],
|
||
["done", "已完成", "Completed"],
|
||
["failed", "失败", "Failed"],
|
||
["timeout", "已超时", "Timed out"],
|
||
],
|
||
severity: [
|
||
["critical", "严重", "Critical"],
|
||
["high", "高危", "High"],
|
||
["medium", "中危", "Medium"],
|
||
["low", "低危", "Low"],
|
||
],
|
||
finding: [
|
||
["pending", "待处理", "Pending"],
|
||
["in_progress", "处理中", "In progress"],
|
||
["confirmed", "已确认", "Confirmed"],
|
||
["resolved", "已处理", "Resolved"],
|
||
["fixed", "已修复", "Fixed"],
|
||
["false_positive", "误报", "False positive"],
|
||
["ignored", "忽略", "Ignored"],
|
||
["duplicate", "重复", "Duplicate"],
|
||
["risk_accepted", "风险接受", "Risk accepted"],
|
||
],
|
||
engine: [
|
||
["exploring", "探索中", "Exploring"],
|
||
["paused", "已暂停", "Paused"],
|
||
["stalled", "停滞", "Stalled"],
|
||
["idle", "空闲", "Idle"],
|
||
],
|
||
goal: [
|
||
["open", "进行中", "In progress"],
|
||
["met", "已达成", "Met"],
|
||
["abandoned", "已放弃", "Abandoned"],
|
||
],
|
||
audit: [
|
||
["allow", "放行", "Allowed"],
|
||
["block", "拦截", "Blocked"],
|
||
],
|
||
node: [
|
||
["observed", "观测", "Observed"],
|
||
["confirmed", "确认", "Confirmed"],
|
||
["tombstoned", "废弃", "Discarded"],
|
||
],
|
||
delivery: [
|
||
["pending", "待发送", "Pending"],
|
||
["sending", "发送中", "Sending"],
|
||
["sent", "已送达", "Delivered"],
|
||
["failed", "失败", "Failed"],
|
||
["skipped", "已跳过", "Skipped"],
|
||
],
|
||
intelligence: [
|
||
["credential", "凭据", "Credential"],
|
||
["lead", "重要线索", "Lead"],
|
||
["sensitive_data", "敏感数据", "Sensitive data"],
|
||
],
|
||
};
|
||
|
||
export const resources = {
|
||
"zh-CN": { translation: Object.fromEntries(Object.entries(messages).map(([key, pair]) => [key, pair[0]])) },
|
||
en: { translation: Object.fromEntries(Object.entries(messages).map(([key, pair]) => [key, pair[1]])) },
|
||
};
|
||
|
||
for (const [domain, entries] of Object.entries(statuses)) {
|
||
for (const [value, zh, en] of entries) {
|
||
resources["zh-CN"].translation[`status.${domain}.${value}`] = zh;
|
||
resources.en.translation[`status.${domain}.${value}`] = en;
|
||
}
|
||
}
|