Skip to content

TTB-Network/python-openbmclapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenBMCLAPI for Python v4

Python-OpenBMCLAPI v4 的发布!

简体中文 | English

GitHub Issues or Pull Requests GitHub Issues or Pull Requests GitHub License GitHub Release GitHub Tag Docker Pulls Crowdin GitHub Repo stars CodeQL Create tagged release

赞助

✨ 基于 OpenBMCLAPI 的 Python 实现。

🎨 跨系统跨架构。这得益于 Python 强大的语言功能。

Docker 支持。通过 Docker 更加快捷地部署 python-openbmclapi (更支持一键跑路)

简介

本项目是 OpenBMCLAPI 的 Python 版本,OpenBMCLAPI 是通过分布式集群帮助 BMCLAPI 进行文件分发、加速中国大陆 Minecraft 下载的公益项目。

如果你想加入 OpenBMCLAPI,可以寻找 bangbang93 获取 CLUSTER_IDCLUSTER_SECRET

贡献

如果你有能力,你可以向我们的仓库提交 Pull Request 或 Issue。

如果你想帮助我们进行多语言翻译,请前往 Crowdin

在贡献之前,请先阅读我们的贡献准则

鸣谢

LiterMC/go-openbmclapi

bangbang93/openbmclapi

SALTWOOD/CSharp-OpenBMCLAPI

快速开始

  1. 安装依赖
pip install -r requirements.txt
  1. 首次运行脚本生成配置文件
advanced:
  access_log: false
  debug: false
  host: ''
  locale: zh_cn
cert:
  cert: null
  dir: .ssl
  key: null
web:
  port: 6543
  proxy: false
  public_port: 6543
  1. 修改配置文件(例子)
advanced:
  access_log: false
  debug: false
  host: ''
  locale: zh_cn
cert:
  cert: null
  dir: .ssl
  key: null
web:
  port: 6543
  proxy: false
  public_port: 6543
clusters:
  - id: # 670... 
    secret: # <你的节点密钥>
  # 需要增加多个节点如下
  # - id: # 670...
  #   secret: # <你的节点密钥>
storages:
  # local
  - name: bmclapi # 存储名字
    type: local 
    path: /bmclapi
    weight: 1
  # alist
  - name: alist
    type: alist
    path: /path/to/your/alist
    endpoint: http://127.0.0.1:5244
    username: admin
    password: password
    weight: 1
  # alist 下的 WebDav
  - name: alist-webdav
    type: webdav
    path: /path/to/your/alist
    endpoint: http://127.0.0.1:5244/dav
    username: admin
    password: password
    weight: 1
  # s3
  - name: s3
    type: s3
    path: /path/to/your/s3
    endpoint: https://s3.amazonaws.com
    access_key: <你的access_key>
    secret_key: <你的secret_key>
    bucket: <你的bucket>
    weight: 1
    # 可选
    # 例子 
    # custom_s3_host: bmclapi-files.ttb-network.top
    # public_endpoint: https://s3.ttb-network.top
  1. 开始 for Windows
python main.py
  1. 开始 for Docker
docker run -d --restart=always -p 6543:6543 -v /path/to/your/config.yaml:opt/python-openbmclapi/config/config.yaml -v /path/to/your/bmclapi:opt/python-openbmclapi/bmclapi --name python-openbmclapi atianxiua/python-openbmclapi:latest

TODO

  • 文档
  • 面板