Code Monkey home page Code Monkey logo

kiss-proxy's Introduction

KISS-PROXY

基于 cloudflare workers 的简单接口代理,可用于 KISS Translator 翻译服务。

1、准备

  • 一个 cloudflare(https://www.cloudflare.com/) 帐号
  • 一个可以访问的域名(需要域名是因为默认的 *.workers.dev 无法访问)

2、部署

git clone https://github.com/fishjar/kiss-proxy.git
cd kiss-proxy
yarn install
yarn deploy

3、设置自定义域名

  • 登录 cloudflare
  • 找到刚才部署的 worker
    • 触发器 > 添加自定义域

4、最终接口地址

  • 谷歌翻译: https://<设置的域名地址>/gt
  • OpenAI: https://<设置的域名地址>/openai

5、添加更多代理

找到源代码,修改这一段:

const sites = {
  "/gt": {
    method: "GET",
    url: "https://translate.googleapis.com/translate_a/single",
  },
  "/openai": {
    method: "POST",
    url: "https://api.openai.com/v1/chat/completions",
  },
};

然后重新部署:

yarn deploy

kiss-proxy's People

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.