Skip to content

lkeme/BiliveKeepHeart

Repository files navigation

Bilibili Heartbeat Server

Introduction

Stargazers over time


Special Notice

  • The following statement replaces the name "bilibili-pcheartbeat" with "this project".

  • Any code included in the projects released by this repository is intended for testing and educational purposes only. It is prohibited to use this code for commercial purposes, and its legality, accuracy, completeness, and effectiveness cannot be guaranteed. Please make your own judgments based on the circumstances.

  • Any user who directly or indirectly uses or disseminates any code from this project, regardless of whether such use complies with the laws of their country or region, or the country or region where such use or dissemination occurs, shall not hold ppscn and/or any other contributors to the code repository responsible for any consequences arising from such actions (including but not limited to privacy breaches).

  • If any entity or individual believes that the code in this project may infringe upon their rights, they should notify us promptly and provide proof of identity and ownership. Upon receiving verification files, we will delete the relevant code.

  • Privacy Statement: **This project will not collect any of your personal data!


Demo

Example OR Documentation

Example OR Documentation

Quick Start

  1. Clone or download this repository

  2. Install CN-Nodejs or EN-Nodejs

  3. Use npm to install packages

> npm install
  1. Start-up
# cli
default port 3000
> node app.js 

custom port 1-65535
> node app.js -p 5200
> node app.js --port 5201
# pm2
cp ecosystem.config.js.example  ecosystem.config.js
npm install -g pm2
pm2 start ecosystem.config.js

API

Use POST method to access API, and the return data is in JSON format

/enc

Url

http://127.0.0.1:3000/enc

Headers

  • Content-type: application/json

Param

{
  "t": {
    "id": [1, 199, 0, 123456],
    "device": "[\"device\",\"device\"]",
    "ets": "ets",
    "benchmark": "secret_key",
    "time": "heartbeat_interval",
    "ts": "ts",
    "ua": "ua"
  },
  "r": [2, 5, 1, 4]
}

Return

  • Success
{
  "code": 0,
  "s": "be02e0ac4248ff3e59bea681258319bec489db3b5766eb0d40ce25516889c6df2bb8383c16d8a9bbb3ced7283388fb4df89718430064564bfaf6be246b983910",
  "message": "success"
}
  • Error 1
{
  "code": -1,
  "s": "",
  "message": "HTTP 405 Method Not Allowed"
}
  • Error 2
{
  "code": -2,
  "s": "",
  "message": "The request is missing a required parameter."
}
  • Error 3
{
"code": -2,
"s": "",
"message": "other errors msg"
}

Disclaimer

The project is for study and technical communication only, do not use it for illegal purposes!

I don"t take any responsibility if legal dispute occurs.

License

GPL v3

Copyright (c) 2018-2021 bilibili-pcheartbeat.

About

bilibili-pcheartbeat

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published