Git Product home page Git Product logo

mata's Introduction

Mata

监控服务器自动切换解析工具

使用tcp协议监控指定服务器,当服务器状态发生改变借助CloudFlare API进行改变解析,并支持Telegram通知

示例场景

A服务器访问速度快但是不带防御,B服务器带防御但是访问速度慢(或是不带防御,当回退到B服务器时自动开启CloudFlare CDN)

使用Mata对A服务器进行监控,当无法连通A服务器时,将自动把解析切换为B服务器,当A服务器恢复时,也会自动切换回A服务器

使用教程

准备工作

获取Cloudflare Zone API Token

https://dash.cloudflare.com/profile/api-tokens

路径:Create Token -> Edit zone DNS

获取域名Zone ID

打开域名控制台,右侧底部如图所示

image

参数说明

ApiKey

CloudFlare Zone API Token

ZoneID

CloudFlare ZoneID

BotToken

Telegram bot api token
当服务器状态改变时发送通知,不启用保持为空即可

ChatID

Telegram ChatID

当服务器状态改变时发送通知,不启用保持为空即可

Corn

监控间隔,单位 秒

Mata

Main为当服务器正常时的解析,Then为当服务器离线时的解析

proxied为是否启用CloudFlare CDN

Target

需要监控的服务器,采用TCP监控,需带上端口号

服务器运行

下载系统对应的编译包,将mata.sample.json改名为mata.json并运行

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.