fix: backport passkey and topup security patches
This commit is contained in:
@@ -830,7 +830,12 @@ export const getLogsColumns = ({
|
||||
),
|
||||
dataIndex: 'ip',
|
||||
render: (text, record, index) => {
|
||||
return (record.type === 2 || record.type === 5) && text ? (
|
||||
const showIp =
|
||||
(record.type === 2 ||
|
||||
record.type === 5 ||
|
||||
(isAdminUser && record.type === 1)) &&
|
||||
text;
|
||||
return showIp ? (
|
||||
<Tooltip content={text}>
|
||||
<span>
|
||||
<Tag
|
||||
|
||||
37
web/src/hooks/usage-logs/useUsageLogsData.jsx
vendored
37
web/src/hooks/usage-logs/useUsageLogsData.jsx
vendored
@@ -665,13 +665,13 @@ export const useLogsData = () => {
|
||||
),
|
||||
});
|
||||
}
|
||||
if (isAdminUser && logs[i].type !== 6) {
|
||||
if (isAdminUser && logs[i].type !== 6 && logs[i].type !== 1) {
|
||||
expandDataLocal.push({
|
||||
key: t('请求转换'),
|
||||
value: requestConversionDisplayValue(other?.request_conversion),
|
||||
});
|
||||
}
|
||||
if (isAdminUser && logs[i].type !== 6) {
|
||||
if (isAdminUser && logs[i].type !== 6 && logs[i].type !== 1) {
|
||||
let localCountMode = '';
|
||||
if (other?.admin_info?.local_count_tokens) {
|
||||
localCountMode = t('本地计费');
|
||||
@@ -683,6 +683,39 @@ export const useLogsData = () => {
|
||||
value: localCountMode,
|
||||
});
|
||||
}
|
||||
if (isAdminUser && logs[i].type === 1 && other?.admin_info) {
|
||||
const adminInfo = other.admin_info;
|
||||
if (adminInfo.payment_method) {
|
||||
expandDataLocal.push({
|
||||
key: t('订单支付方式'),
|
||||
value: adminInfo.payment_method,
|
||||
});
|
||||
}
|
||||
if (adminInfo.callback_payment_method) {
|
||||
expandDataLocal.push({
|
||||
key: t('回调支付方式'),
|
||||
value: adminInfo.callback_payment_method,
|
||||
});
|
||||
}
|
||||
if (adminInfo.caller_ip) {
|
||||
expandDataLocal.push({
|
||||
key: t('回调调用者IP'),
|
||||
value: adminInfo.caller_ip,
|
||||
});
|
||||
}
|
||||
if (adminInfo.server_ip) {
|
||||
expandDataLocal.push({
|
||||
key: t('服务器IP'),
|
||||
value: adminInfo.server_ip,
|
||||
});
|
||||
}
|
||||
if (adminInfo.version) {
|
||||
expandDataLocal.push({
|
||||
key: t('系统版本'),
|
||||
value: adminInfo.version,
|
||||
});
|
||||
}
|
||||
}
|
||||
expandDatesLocal[logs[i].key] = expandDataLocal;
|
||||
}
|
||||
|
||||
|
||||
19
web/src/i18n/locales/en.json
vendored
19
web/src/i18n/locales/en.json
vendored
@@ -570,6 +570,18 @@
|
||||
"先填写配置,再自动填充 OAuth 端点,能显著减少手工输入": "Fill in configuration first, then auto-fill OAuth endpoints to significantly reduce manual input",
|
||||
"先搜索,再一键复制字段名或填入当前规则。字段名为系统内部路径,可直接用于路径 / 来源 / 目标。": "Search first, then copy field names or fill into the current rule with one click. Field names are internal system paths that can be used directly for path / source / target.",
|
||||
"免责声明:仅限个人使用,请勿分发或共享任何凭证。该渠道存在前置条件与使用门槛,请在充分了解流程与风险后使用,并遵守 OpenAI 的相关条款与政策。相关凭证与配置仅限接入 Codex CLI 使用,不适用于其他客户端、平台或渠道。": "Disclaimer: Personal use only. Do not distribute or share any credentials. This channel has prerequisites and requires prior setup; use only if you understand the flow and risks, and comply with OpenAI’s terms and policies. Credentials and configuration are for Codex CLI integration only, and are not intended for any other client, platform, or channel.",
|
||||
"该类型用于兼容上游把 OpenAI 官方兼容入口放在 /openai 的第三方站点。这里填写上游给官方 OpenAI 客户端或 Codex CLI 使用的 Base URL,例如:https://api.univibe.cc/openai;下游客户端仍然使用你自己的 New API 地址加 /v1。": "This type is for third-party upstreams that expose the OpenAI official-compatible entrypoint under /openai. Fill in the upstream Base URL used by the official OpenAI client or Codex CLI, for example: https://api.univibe.cc/openai. Downstream clients should still use your own New API address plus /v1.",
|
||||
"上游 OpenAI / Codex Base URL": "Upstream OpenAI / Codex Base URL",
|
||||
"请输入上游提供给官方 OpenAI 客户端或 Codex CLI 使用的 Base URL,例如:https://api.univibe.cc/openai": "Enter the upstream Base URL used by the official OpenAI client or Codex CLI, for example: https://api.univibe.cc/openai",
|
||||
"此类型会把下游的 /v1/* 请求自动映射到上游的 /openai/*。这里不要填写 /v1,保持上游原始 Base URL 即可。": "This type automatically maps downstream /v1/* requests to upstream /openai/*. Do not append /v1 here; keep the original upstream Base URL.",
|
||||
"该类型用于兼容 Claude Code 或 Anthropic 网关类上游。这里填写上游提供的 Anthropic Base URL,例如:https://gateway.example.com/anthropic;转发时会保持 Anthropic 的 /v1/messages 路径,但按网关常见要求使用 Bearer 认证。": "This type is for Claude Code or Anthropic gateway upstreams. Fill in the upstream Anthropic Base URL, for example: https://gateway.example.com/anthropic. Requests keep Anthropic's /v1/messages path while using Bearer authentication for gateway compatibility.",
|
||||
"上游 Claude Code / Anthropic Base URL": "Upstream Claude Code / Anthropic Base URL",
|
||||
"请输入上游提供给 Claude Code 使用的 Anthropic Base URL,例如:https://gateway.example.com/anthropic": "Enter the upstream Anthropic Base URL used by Claude Code, for example: https://gateway.example.com/anthropic",
|
||||
"此类型保持 Anthropic 官方请求路径,不自动补 /v1 到 Base URL;这里直接填写上游原始 Base URL 即可。": "This type keeps Anthropic's official request path and does not append /v1 to the Base URL automatically. Enter the raw upstream Base URL directly.",
|
||||
"该类型用于兼容 Gemini OpenAI 兼容入口。这里填写上游给 Gemini CLI 或 OpenAI 兼容 SDK 使用的 Base URL,例如:https://generativelanguage.googleapis.com/v1beta/openai;下游客户端仍然使用你自己的 New API 地址加 /v1。": "This type is for Gemini OpenAI-compatible upstreams. Fill in the Base URL used by Gemini CLI or OpenAI-compatible SDKs, for example: https://generativelanguage.googleapis.com/v1beta/openai. Downstream clients should still use your own New API address plus /v1.",
|
||||
"上游 Gemini OpenAI Compat Base URL": "Upstream Gemini OpenAI Compat Base URL",
|
||||
"请输入 Gemini OpenAI 兼容 Base URL,例如:https://generativelanguage.googleapis.com/v1beta/openai": "Enter the Gemini OpenAI-compatible Base URL, for example: https://generativelanguage.googleapis.com/v1beta/openai",
|
||||
"此类型会把下游的 /v1/* 请求自动映射到上游的 /v1beta/openai/*。这里不要再额外填写 /v1。": "This type automatically maps downstream /v1/* requests to upstream /v1beta/openai/*. Do not append /v1 again here.",
|
||||
"兑换人ID": "Redeemer ID",
|
||||
"兑换成功!": "Redemption successful!",
|
||||
"兑换码充值": "Redemption code recharge",
|
||||
@@ -3339,6 +3351,11 @@
|
||||
"输出价格:{{symbol}}{{price}} / 1M tokens": "Output Price: {{symbol}}{{price}} / 1M tokens",
|
||||
"输出价格:{{symbol}}{{total}} / 1M tokens": "Output Price: {{symbol}}{{total}} / 1M tokens",
|
||||
"例如:gpt-4.1-nano,regex:^claude-.*$,regex:^sora-.*$": "Example: gpt-4.1-nano,regex:^claude-.*$,regex:^sora-.*$",
|
||||
"支持精确匹配;使用 regex: 开头可按正则匹配。": "Supports exact matching. Use a regex: prefix for regex matching."
|
||||
"支持精确匹配;使用 regex: 开头可按正则匹配。": "Supports exact matching. Use a regex: prefix for regex matching.",
|
||||
"订单支付方式": "Order payment method",
|
||||
"回调支付方式": "Callback payment method",
|
||||
"回调调用者IP": "Callback caller IP",
|
||||
"服务器IP": "Server IP",
|
||||
"系统版本": "System version"
|
||||
}
|
||||
}
|
||||
|
||||
19
web/src/i18n/locales/zh-CN.json
vendored
19
web/src/i18n/locales/zh-CN.json
vendored
@@ -153,6 +153,18 @@
|
||||
"SSRF防护详细说明": "SSRF防护可防止恶意用户利用您的服务器访问内网资源。您可以配置受信任域名/IP的白名单,并限制允许的端口。适用于文件下载、Webhook回调和通知功能。",
|
||||
"store 字段用于授权 OpenAI 存储请求数据以评估和优化产品。默认关闭,开启后可能导致 Codex 无法正常使用": "store 字段用于授权 OpenAI 存储请求数据以评估和优化产品。默认关闭,开启后可能导致 Codex 无法正常使用",
|
||||
"免责声明:仅限个人使用,请勿分发或共享任何凭证。该渠道存在前置条件与使用门槛,请在充分了解流程与风险后使用,并遵守 OpenAI 的相关条款与政策。相关凭证与配置仅限接入 Codex CLI 使用,不适用于其他客户端、平台或渠道。": "免责声明:仅限个人使用,请勿分发或共享任何凭证。该渠道存在前置条件与使用门槛,请在充分了解流程与风险后使用,并遵守 OpenAI 的相关条款与政策。相关凭证与配置仅限接入 Codex CLI 使用,不适用于其他客户端、平台或渠道。",
|
||||
"该类型用于兼容上游把 OpenAI 官方兼容入口放在 /openai 的第三方站点。这里填写上游给官方 OpenAI 客户端或 Codex CLI 使用的 Base URL,例如:https://api.univibe.cc/openai;下游客户端仍然使用你自己的 New API 地址加 /v1。": "该类型用于兼容上游把 OpenAI 官方兼容入口放在 /openai 的第三方站点。这里填写上游给官方 OpenAI 客户端或 Codex CLI 使用的 Base URL,例如:https://api.univibe.cc/openai;下游客户端仍然使用你自己的 New API 地址加 /v1。",
|
||||
"上游 OpenAI / Codex Base URL": "上游 OpenAI / Codex Base URL",
|
||||
"请输入上游提供给官方 OpenAI 客户端或 Codex CLI 使用的 Base URL,例如:https://api.univibe.cc/openai": "请输入上游提供给官方 OpenAI 客户端或 Codex CLI 使用的 Base URL,例如:https://api.univibe.cc/openai",
|
||||
"此类型会把下游的 /v1/* 请求自动映射到上游的 /openai/*。这里不要填写 /v1,保持上游原始 Base URL 即可。": "此类型会把下游的 /v1/* 请求自动映射到上游的 /openai/*。这里不要填写 /v1,保持上游原始 Base URL 即可。",
|
||||
"该类型用于兼容 Claude Code 或 Anthropic 网关类上游。这里填写上游提供的 Anthropic Base URL,例如:https://gateway.example.com/anthropic;转发时会保持 Anthropic 的 /v1/messages 路径,但按网关常见要求使用 Bearer 认证。": "该类型用于兼容 Claude Code 或 Anthropic 网关类上游。这里填写上游提供的 Anthropic Base URL,例如:https://gateway.example.com/anthropic;转发时会保持 Anthropic 的 /v1/messages 路径,但按网关常见要求使用 Bearer 认证。",
|
||||
"上游 Claude Code / Anthropic Base URL": "上游 Claude Code / Anthropic Base URL",
|
||||
"请输入上游提供给 Claude Code 使用的 Anthropic Base URL,例如:https://gateway.example.com/anthropic": "请输入上游提供给 Claude Code 使用的 Anthropic Base URL,例如:https://gateway.example.com/anthropic",
|
||||
"此类型保持 Anthropic 官方请求路径,不自动补 /v1 到 Base URL;这里直接填写上游原始 Base URL 即可。": "此类型保持 Anthropic 官方请求路径,不自动补 /v1 到 Base URL;这里直接填写上游原始 Base URL 即可。",
|
||||
"该类型用于兼容 Gemini OpenAI 兼容入口。这里填写上游给 Gemini CLI 或 OpenAI 兼容 SDK 使用的 Base URL,例如:https://generativelanguage.googleapis.com/v1beta/openai;下游客户端仍然使用你自己的 New API 地址加 /v1。": "该类型用于兼容 Gemini OpenAI 兼容入口。这里填写上游给 Gemini CLI 或 OpenAI 兼容 SDK 使用的 Base URL,例如:https://generativelanguage.googleapis.com/v1beta/openai;下游客户端仍然使用你自己的 New API 地址加 /v1。",
|
||||
"上游 Gemini OpenAI Compat Base URL": "上游 Gemini OpenAI Compat Base URL",
|
||||
"请输入 Gemini OpenAI 兼容 Base URL,例如:https://generativelanguage.googleapis.com/v1beta/openai": "请输入 Gemini OpenAI 兼容 Base URL,例如:https://generativelanguage.googleapis.com/v1beta/openai",
|
||||
"此类型会把下游的 /v1/* 请求自动映射到上游的 /v1beta/openai/*。这里不要再额外填写 /v1。": "此类型会把下游的 /v1/* 请求自动映射到上游的 /v1beta/openai/*。这里不要再额外填写 /v1。",
|
||||
"Stripe 设置": "Stripe 设置",
|
||||
"Telegram": "Telegram",
|
||||
"Telegram Bot Token": "Telegram Bot Token",
|
||||
@@ -2956,6 +2968,11 @@
|
||||
"输入价格:{{symbol}}{{price}} / 1M tokens": "输入价格:{{symbol}}{{price}} / 1M tokens",
|
||||
"输出价格 {{symbol}}{{price}} / 1M tokens": "输出价格 {{symbol}}{{price}} / 1M tokens",
|
||||
"输出价格:{{symbol}}{{price}} / 1M tokens": "输出价格:{{symbol}}{{price}} / 1M tokens",
|
||||
"输出价格:{{symbol}}{{total}} / 1M tokens": "输出价格:{{symbol}}{{total}} / 1M tokens"
|
||||
"输出价格:{{symbol}}{{total}} / 1M tokens": "输出价格:{{symbol}}{{total}} / 1M tokens",
|
||||
"订单支付方式": "订单支付方式",
|
||||
"回调支付方式": "回调支付方式",
|
||||
"回调调用者IP": "回调调用者IP",
|
||||
"服务器IP": "服务器IP",
|
||||
"系统版本": "系统版本"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user