Giter Site home page Giter Site logo

deeplx-local's Introduction

deeplx-local

用于提供给沉浸式翻译的在本地运行 deeplx 的工具。

通过并发请求存在url.txt内的 deeplx 的翻译接口,来获取低延迟、可用的url。

初步实现了负载均衡,延迟越低响应越快的接口会被优先使用。

一键启动

docker run -itd -p 8080:62155 neccen/deeplx-local:latest

翻译地址:http://localhost:8080/translate

可选参数

  • 360_api_keyquake360的api_key,可用于每日自动爬取更多的翻译接口。(有每日免费次数)
  • hunter_api_key鹰图的api_key,可用于每日自动爬取更多的翻译接口。(有每日免费次数)
  • 群友提到的fofa不想加,不送免费额度啊,本来想用Cl0udG0d/Fofa-hack: 非付费会员,fofa数据采集工具偷个懒,发现不传自己的auth会有20条搜索的限制,懒得整了

使用方法

1. Docker 运行

极简命令:

会自动使用我内置的爬取的deeplx翻译接口

docker run -itd -p 62155:62155 neccen/deeplx-local:latest

完整命令:

docker run -itd -p 62155:62155 -v /url.txt文件目录:/usr/local/bin/url.txt -e 360_api_key="xxxxx" neccen/deeplx-local:latest

2. Docker Compose 运行

version: '3.8'
services:
  deeplx:
    image: neccen/deeplx-local:latest
    ports:
      - "62155:62155"
    volumes:
      - /url.txt文件目录:/usr/local/bin/url.txt  # 本地url.txt文件目录,删除此行则使用内置的已经爬取的deeplx翻译接口
    environment:
      - 360_api_key=xxxxx  # 可选
      - hunter_api_key=xxxxx  # 可选
    container_name: deeplx
    restart: unless-stopped

3. 本地运行

  1. 在Release中下载对应平台的二进制文件。
  2. 在可执行文件的目录下,新建url.txt, 填入url.txt内的 deeplx 的翻译接口,可以只填ip:port,也可以填写完整的url。
  3. 启动程序,翻译地址为 http://localhost:62155/translate

4. Windows后台运行

  1. 在Release中下载windows-xxx标识的发行版,如windows-v0.1.2
  2. 解压打开.exe文件后,会自动在后台启动,托盘可以看到服务图标2fa59a5c188a7e02041948d7b6918e83.png
  3. 注意防火墙可能会提示是否允许联网,点击是
  4. 不想使用需要关闭时,点击图标,点击quit即可
  5. 沉浸式翻译地址为http://localhost:62155/translate

Bob翻译插件

看到有人提问Bob如何用上此翻译,我手撸了一个, 配套的Bob翻译插件请看 ycvk/deeplx-local-bobplugin: 用于自建deeplx服务的bob翻译插件

deeplx-local's People

Contributors

vank3f3 avatar ycvk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.