Chancel's blog

190 字 1 分钟阅读

自建服务汇总

  • system

反向代理加速

https://agent.chancel.me

用于解决国内网络访问 GitHub、Debian 等站点不稳定问题。将原域名拼接到 agent.chancel.me 路径后即可使用。

目前支持的加速域名(含所有子域名):

  • proxy.golang.org
  • *.debian.org
  • github.com / *.github.com
  • python.org / *.python.org
  • githubusercontent.com / *.githubusercontent.com
  • secure.gravatar.com
  • objects.githubusercontent.com
  • downloads.openwrt.org

示例:

  • 原始链接:https://raw.githubusercontent.com/aristocratos/btop/main/CMakeLists.txt
  • 加速后:https://agent.chancel.me/raw.githubusercontent.com/aristocratos/btop/main/CMakeLists.txt

PlantUML 服务

https://plantuml.chancel.me

自建 PlantUML 渲染服务,用于将 PlantUML 语法图表代码转换为图片。

文件存储 API

https://api.chancel.me/api/file/

上传使用 POST,下载使用 GET

# 上传文件
curl -X POST -F "file=@/path/to/myfile.txt" https://api.chancel.me/api/file/myfile

# 成功返回
{
    "success": true,
    "message": "文件已存储",
    "data": {
        "key": "myfile",
        "file_info": {
            "filename": "myfile.txt",
            "mimetype": "application/octet-stream",
            "size": 5147,
            "original_size": 5147,
            "compressed": true,
            "compressed_size": 742,
            "compression_ratio": "14.42%"
        }
    }
}

# 下载文件
curl -O -J https://api.chancel.me/api/file/myfile

IP 查询 API

https://api.chancel.me/api/ip

GET 请求,返回调用者的公网 IP。

# 请求
curl https://api.chancel.me/api/ip

# 返回
{
  "status": 1,
  "msg": "Query success",
  "data": {
      "ip": "8.8.8.8"
  },
  "version":"V1.0.0"
}