From 41452f92691fd2fa66aa317e7e143a1145b599ce Mon Sep 17 00:00:00 2001 From: Gaojianli Date: Wed, 6 Nov 2024 20:50:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=85=8D=E7=BD=AE=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webui/src/api/model/config.ts | 1 + webui/src/api/model/profile.ts | 1 - .../settings/components/config/components/btn.vue | 12 ++++++++++++ .../views/settings/components/config/locale/en-US.ts | 5 +++++ .../views/settings/components/config/locale/zh-CN.ts | 5 +++++ .../settings/components/profile/components/btn.vue | 12 ------------ .../settings/components/profile/locale/en-US.ts | 8 +------- .../settings/components/profile/locale/zh-CN.ts | 9 +-------- 8 files changed, 25 insertions(+), 28 deletions(-) diff --git a/webui/src/api/model/config.ts b/webui/src/api/model/config.ts index 06d94f0313..87ea662797 100644 --- a/webui/src/api/model/config.ts +++ b/webui/src/api/model/config.ts @@ -41,6 +41,7 @@ export interface Btn { app_id: string app_secret: string config_url: string + allow_script_execute: boolean } export interface BanlistInvoker { diff --git a/webui/src/api/model/profile.ts b/webui/src/api/model/profile.ts index 1b1bee561a..c43a0cc936 100644 --- a/webui/src/api/model/profile.ts +++ b/webui/src/api/model/profile.ts @@ -91,7 +91,6 @@ export interface AutoRangeBan { export interface Btn { enabled: boolean ban_duration: BanDuration - allow_script_execute: boolean } export interface MultiDialingBlocker { diff --git a/webui/src/views/settings/components/config/components/btn.vue b/webui/src/views/settings/components/config/components/btn.vue index bf374b30e1..31f6790923 100644 --- a/webui/src/views/settings/components/config/components/btn.vue +++ b/webui/src/views/settings/components/config/components/btn.vue @@ -28,6 +28,18 @@ + + + + diff --git a/webui/src/views/settings/components/config/locale/en-US.ts b/webui/src/views/settings/components/config/locale/en-US.ts index 9850abee81..002a05e536 100644 --- a/webui/src/views/settings/components/config/locale/en-US.ts +++ b/webui/src/views/settings/components/config/locale/en-US.ts @@ -49,6 +49,11 @@ export default { 'All peers connected to torrents (Including: IP, Port, PeerID, UserAgent, Peer Protocol, Flags, Uploaded, Downloaded, UploadRate, DownloadRate, PeerProgress, YourProgress and Downloader Name)', 'page.settings.tab.config.btn.enableSubmit.modal.content3': 'Are you sure you want to enable submit?', + 'page.settings.tab.config.btn.allowScript': 'Allow BTN server push scripts', + 'page.settings.tab.config.btn.allowScript.warning': + 'Warning, this means that the remote server can execute any code on your device, please enable with caution!', + 'page.settings.tab.config.btn.allowScript.tips': + 'This option will allow BTN server push scripts to your device, this may increase the accuracy of the ban', 'page.settings.tab.config.ipDatabase.title': 'IP Database', 'page.settings.tab.config.ipDatabase.autoUpdate': 'Enable auto update', diff --git a/webui/src/views/settings/components/config/locale/zh-CN.ts b/webui/src/views/settings/components/config/locale/zh-CN.ts index 22d6fd4b1a..e2847b050c 100644 --- a/webui/src/views/settings/components/config/locale/zh-CN.ts +++ b/webui/src/views/settings/components/config/locale/zh-CN.ts @@ -48,6 +48,11 @@ export default { 'page.settings.tab.config.btn.enableSubmit.modal.content2': '您的 Torrent 列表(包括:Torrent 种子摘要的二次不可逆哈希和 Torrent 大小),连接到您的 Torrent 的所有 Peers (包括:IP地址、端口号、PeerID、UserAgent(ClientName),Peer协议,Peer总下载量,Peer总上传量,Peer瞬时上传速度,Peer瞬时下载速度,Peer下载进度,以及您的下载器名称)', 'page.settings.tab.config.btn.enableSubmit.modal.content3': '确定要开启提交吗?', + 'page.settings.tab.config.btn.allowScript': '允许 BTN 服务器下发脚本', + 'page.settings.tab.config.btn.allowScript.warning': + '警告,这意味着远程服务器可以在你的设备上执行任意代码,请谨慎开启', + 'page.settings.tab.config.btn.allowScript.tips': + '打开此选项后将允许 PeerBanHelper 接收并执行来自 BTN 服务器的动态脚本,这有助于提高反吸血精确度和反吸血效果。', 'page.settings.tab.config.ipDatabase.title': 'IP 数据库', 'page.settings.tab.config.ipDatabase.autoUpdate': '启用自动更新', diff --git a/webui/src/views/settings/components/profile/components/btn.vue b/webui/src/views/settings/components/profile/components/btn.vue index d3841773f5..159dd14ad1 100644 --- a/webui/src/views/settings/components/profile/components/btn.vue +++ b/webui/src/views/settings/components/profile/components/btn.vue @@ -21,18 +21,6 @@ ={{ formatMilliseconds(model.ban_duration) }} - - - -