{"id":49499994,"url":"https://github.com/ycvk/deeplx-local","last_synced_at":"2026-05-01T12:06:09.497Z","repository":{"id":234719872,"uuid":"789417525","full_name":"ycvk/deeplx-local","owner":"ycvk","description":"自建deeplx服务","archived":false,"fork":false,"pushed_at":"2025-11-22T10:20:48.000Z","size":16057,"stargazers_count":221,"open_issues_count":2,"forks_count":25,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-11-22T12:14:15.214Z","etag":null,"topics":["deepl"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ycvk.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-04-20T13:45:52.000Z","updated_at":"2025-11-22T10:20:48.000Z","dependencies_parsed_at":"2024-04-27T15:26:19.303Z","dependency_job_id":"5029cb5a-2e5d-4d32-973f-661cfcabb40d","html_url":"https://github.com/ycvk/deeplx-local","commit_stats":null,"previous_names":["ycvk/deeplx-local"],"tags_count":34,"template":false,"template_full_name":null,"purl":"pkg:github/ycvk/deeplx-local","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycvk%2Fdeeplx-local","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycvk%2Fdeeplx-local/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycvk%2Fdeeplx-local/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycvk%2Fdeeplx-local/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ycvk","download_url":"https://codeload.github.com/ycvk/deeplx-local/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ycvk%2Fdeeplx-local/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32495982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deepl"],"created_at":"2026-05-01T12:06:07.306Z","updated_at":"2026-05-01T12:06:09.481Z","avatar_url":"https://github.com/ycvk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## deeplx-local\n\n用于提供给沉浸式翻译的在本地运行 deeplx 的工具。\n\n通过并发请求存在`url.txt`内的 deeplx 的翻译接口，来获取低延迟、可用的url。\n\n翻译超大文本时，会自动做拆分并行翻译合并处理。\n\n### 一键启动\n`docker run --pull=always -itd -p 8080:62155 neccen/deeplx-local:latest`\n\n\n**翻译地址：**`http://localhost:8080/translate`\n\n\n添加 `route`环境变量可修改默认翻译地址, 如：\n\n`docker run --pull=always -itd -p 8080:62155 -e route=abc neccen/deeplx-local:latest`\n\n翻译地址为`http://localhost:8080/abc`\n\n### 可选参数\n- `route`：默认为`/translate`，可自定义翻译地址。比如设置为 `abc`，则翻译地址为 `http://localhost:8080/abc`\n- `360_api_key`：[quake360](https://quake.360.net/quake/#/personal?tab=message)的api_key，可用于每日自动爬取更多的翻译接口。（有每日免费次数）\n- `hunter_api_key`：[鹰图](https://hunter.qianxin.com/home/myInfo)的api_key，可用于每日自动爬取更多的翻译接口。(有每日免费次数)\n- 提到的`fofa`不想加，不送免费额度，本来想用[Cl0udG0d/Fofa-hack: 非付费会员，fofa数据采集工具](https://github.com/Cl0udG0d/Fofa-hack)偷个懒，发现不传自己的auth会有20条搜索的限制，不整了\n\n### 使用方法\n\n#### 1. Docker 运行\n##### 极简命令:\n**会自动使用我内置的爬取的deeplx翻译接口**\n\n\n\n`docker run -itd -p 8080:62155 neccen/deeplx-local:latest`\n\n翻译地址为 `http://localhost:8080/translate`\n\n##### 完整命令:\n\n`docker run -itd -p 8080:62155 -v /url.txt文件目录:/usr/local/bin/url.txt -e route xxx -e 360_api_key=\"xxxxx\" neccen/deeplx-local:latest`\n\n\n#### 2. Docker Compose 运行\n```yaml\nversion: '3.8'\nservices:\n  deeplx:\n    image: neccen/deeplx-local:latest\n    ports:\n      - \"62155:62155\"\n    volumes:\n      - /url.txt文件目录:/usr/local/bin/url.txt  # 本地url.txt文件目录,删除此行则使用内置的已经爬取的deeplx翻译接口\n    environment:\n      - route=xxx  # 可选 默认为 /translate\n      - 360_api_key=xxxxx  # 可选\n      - hunter_api_key=xxxxx  # 可选\n    container_name: deeplx\n    restart: unless-stopped\n```\n\n#### 3. 本地运行\n1. 在Release中下载对应平台的二进制文件。\n2. 在可执行文件的目录下，新建`url.txt`, 填入`url.txt`内的 deeplx 的翻译接口，可以只填`ip:port`，也可以填写完整的url。\n3. 启动程序，翻译地址为 `http://localhost:62155/translate`\n\n#### 4. Windows后台运行\n1. 在Release中下载`windows-xxx`标识的发行版，如[windows-v0.1.2](https://github.com/ycvk/deeplx-local/releases/tag/windows-v0.1.2)\n2. 解压打开`.exe`文件后，会自动在后台启动，托盘可以看到服务图标![2fa59a5c188a7e02041948d7b6918e83.png](https://i.mji.rip/2024/05/08/2fa59a5c188a7e02041948d7b6918e83.png)\n3. **注意防火墙可能会提示是否允许联网**，点击是\n4. 不想使用需要关闭时，点击图标，点击`quit`即可\n5. 沉浸式翻译地址为`http://localhost:62155/translate`\n\n\n### Bob翻译插件\n看到有人提问Bob如何用上此翻译，我手撸了一个，\n配套的Bob翻译插件请看 [ycvk/deeplx-local-bobplugin: 用于自建deeplx服务的bob翻译插件](https://github.com/ycvk/deeplx-local-bobplugin)\n\n### 自行抓取url方法\n\n目前网络上的自建deepl服务有很多，我列举几个开源项目：\n- [OwO-Network/DeepLX: DeepL Free API (No TOKEN required)](https://github.com/OwO-Network/DeepLX)\n- [xiaozhou26/deeplx-pro](https://github.com/xiaozhou26/deeplx-pro/tree/main)\n- [ifyour/deeplx-for-cloudflare: 🔥 Deploy DeepLX on Cloudflare](https://github.com/ifyour/deeplx-for-cloudflare)\n\n1. 分析前者的代码可以发现，它暴露了一个根路径的 `get` 接口，返回固定的响应：\n```json\n{ \n  \"code\": 200, \n  \"message\": \"DeepL Free API, Developed by sjlleo and missuo. Go to /translate with POST. http://github.com/OwO-Network/DeepLX\"\n}\n```\n以此可以通过各种测绘工具通过这个特征去抓取使用此服务搭建的翻译接口。\n\n以fofa搜索为例，搜索框输入：\n```\nbody='{\"code\":200,\"message\":\"DeepL Free API, Developed by sjlleo and missuo. Go to /translate with POST. http://github.com/OwO-Network/DeepLX\"}'\n```\n原项目代码如下：\n\nhttps://github.com/OwO-Network/DeepLX/blob/93a3204eab4366b467ac6e2672b0f6186d435837/main.go#L78-L83\n\n2. 同理，分析后者的代码可以发现，它同样暴露了一个根路径的 `get` 接口，返回固定的响应：\n```\nWelcome to deeplx-pro\n```\n以此可以通过各种测绘工具通过这个特征去抓取使用此服务搭建的翻译接口。\n\n以quake搜索为例，搜索框输入：\n```\nresponse:\"Welcome to deeplx-pro\"\n```\n原项目代码如下：\n\nhttps://github.com/xiaozhou26/deeplx-pro/blob/70fc070b21d14b136c69ac172a8e060fc547ed9b/server.js#L11-L13\n\n\n3. 也一样\n```\n{\n\"code\": 200,\n\"message\": \"Free translation API, Use POST method to access /translate.\"\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fycvk%2Fdeeplx-local","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fycvk%2Fdeeplx-local","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fycvk%2Fdeeplx-local/lists"}