GithubHelp home page GithubHelp logo

rcontf / srcds-logs Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 33 KB

Wrapper around srcds udp log streams for node

Home Page: https://jsr.io/@c43721/srcds-log-receiver

License: MIT License

TypeScript 100.00%
csgo log-receivers rcon srcds tf2

srcds-logs's Introduction

srcds-logs

Wrapper around Source Dedicated Server UDP log streams for node.

Set Up

Your server must have logs enabled. To do so, run log on in your server console or through RCON. In order to receieve messages, you must also add a log address using logaddress_add command to add the URL or IP of your server's receiver. To delete a destination, use logaddress_del.

You can always list existing addresses using logaddress_list.

Installation

See https://jsr.io/@c43721/srcds-log-receiver for more details.

Usage

You can define a receiver and listen to messages published to the UDP stream.

import { LogReceiver } from "@c43721/srcds-log-receiver";

const receiver = new LogReceiver({
  address: "0.0.0.0",
  port: 9871,
});

console.log("Log receiver running.. ");

receiver.on("event", (message) => console.log(message));

Security

In order to make this as extendable as possible, there is no built in security. However, you can mitigate this by using sv_logsecret and checking for the password in the packet. Otherwise, you can use the Socket information to determine what IPs sent the message.

Examples

For more examples, see documentation or the examples folder.

Contributing

If there's a feature or bug, please raise a github issue first alongside your PR (if you're kind enough to make a PR.)

License

Distributed under the MIT License. See LICENSE for more information.

srcds-logs's People

Contributors

c43721 avatar

Stargazers

 avatar

Watchers

 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.