Giter Club home page Giter Club logo

stopmybills's Introduction

stopMyBills

自动关闭按流量计费业务,防止一夜之间倾家荡产。
只需配置各服务商的ApiKey,设置最小余额,定时运行此脚本,一旦余额低于设定值,脚本将关闭支持的所有按量计费服务,保护你的资产,并支持发送通知。

支持的服务

  • 腾讯云 qcloud tencentcloud
    • 余额检测
    • CDN日流量检测
    • 停止CDN
  • 阿里云 aliyun alibabacloud
    • 余额检测
    • 停止CDN

支持的通知方式

  • Server酱 微信提醒

运行环境

  • 任意服务器或者电脑
  • 支持命令行的虚拟主机
  • 腾讯云函数(SCF)

配置方式

  1. 使用composer安装依赖
  2. 新建.env文件或配置环境变量。
#提供商,目前支持TencentCloud或Aliyun
XYBILL_<name>=TencentCloud 
#Secret ID
XYBILL_<name>_providerCreds_ak= 
#Secret Key
XYBILL_<name>_providerCreds_sk= 
#最小余额
XYBILL_<name>_minAmount=5 
#回调通知,对应下方配置,多个逗号分隔
XYBILL_<name>_callback=<callback_name>
#日志详细度
LOG_LEVEL=INFO

#配置腾讯CDM日流量上限:
XYBILL_<name>=TencentCloudCDNFlow
#Secret ID
XYBILL_<name>_providerCreds_ak= 
#Secret Key
XYBILL_<name>_providerCreds_sk= 
#最大日流量,MiB
XYBILL_<name>_maxAmount=10240 #10GiB

#Server酱微信通知 回调配置
XYCB_<callback_name>=ServerChan
XYCB_<callback_name>_sckey=#你的sckey

云服务权限

  • 如使用子账号,腾讯云需要启用QcloudCDNFullAccessQCloudFinanceFullAccess策略。
  • 如使用子账号,阿里云需要启用AliyunCDNFullAccessAliyunBSSFullAccess策略。

stopmybills's People

Contributors

xytoki avatar

Watchers

James Cloos 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.