Giter VIP home page Giter VIP logo

one-proxy's Introduction

one-proxy logo

One Proxy

✨ 轻松管理你的众多订阅,提供一个固定的订阅地址 ✨

license release docker pull release GoReportCard

程序下载 · 部署教程 · 意见反馈 · 在线演示

功能

为你的众多订阅地址提供一个固定的更新链接,方便你在各个设备上使用,避免切换订阅时要修改一众设备上的配置。

部署

基于 Docker 进行部署

执行:docker run -d --restart always -p 3000:3000 -v /home/ubuntu/data/one-proxy:/data justsong/one-proxy

数据将会保存在宿主机的 /home/ubuntu/data/one-proxy 目录。

手动部署

  1. GitHub Releases 下载可执行文件或者从源码编译:
    git clone https://github.com/songquanpeng/one-proxy.git
    cd one-proxy/web
    npm install
    npm run build
    cd ..
    go mod download
    go build -ldflags "-s -w" -o one-proxy
  2. 运行:
    chmod u+x one-proxy
    ./one-proxy --port 3000 --log-dir ./logs
  3. 访问 http://localhost:3000/ 并登录。初始账号用户名为 root,密码为 123456

更加详细的部署教程参见此处

配置

系统本身开箱即用。

你可以通过设置环境变量或者命令行参数进行配置。

等到系统启动后,使用 root 用户登录系统并做进一步的配置。

环境变量

  1. REDIS_CONN_STRING:设置之后将使用 Redis 作为请求频率限制的存储,而非使用内存存储。
    • 例子:REDIS_CONN_STRING=redis://default:redispw@localhost:49153
  2. SESSION_SECRET:设置之后将使用固定的会话密钥,这样系统重新启动后已登录用户的 cookie 将依旧有效。
    • 例子:SESSION_SECRET=random_string
  3. SQL_DSN:设置之后将使用指定数据库而非 SQLite。
    • 例子:SQL_DSN=root:123456@tcp(localhost:3306)/one-proxy

命令行参数

  1. --port <port_number>: 指定服务器监听的端口号,默认为 3000
    • 例子:--port 3000
  2. --log-dir <log_dir>: 指定日志文件夹,如果没有设置,日志将不会被保存。
    • 例子:--log-dir ./logs
  3. --version: 打印系统版本号并退出。

one-proxy's People

Contributors

songquanpeng 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.