Coder Social home page Coder Social logo

catbox's Introduction

catbox

Build Status Go Report Card

catbox is an IRC server with a focus on being small and understandable. The goal is security.

Features

  • Server to server linking
  • IRC operators
  • Private (WHOIS shows no channels, LIST isn't supported)
  • Flood protection
  • K: line style connection banning
  • TLS

catbox implements enough of RFC 1459 to be recognisable as IRC and be minimally functional. I likely won't add much more and don't intend it to be complete. If I don't think something is required it likely won't be here.

Installation

  1. Download catbox from the Releases tab on GitHub, or build from source (go build).
  2. Configure catbox through config files. There are example configs in the conf directory. All settings are optional and have defaults.
  3. Run it, e.g. ./catbox -conf catbox.conf. You might run it via systemd via a service such as:
[Service]
ExecStart=/home/ircd/catbox/catbox -conf /home/ircd/catbox/catbox.conf
Restart=always

[Install]
WantedBy=default.target

Configuration

catbox.conf

Global server settings.

opers.conf

IRC operators.

servers.conf

The servers to link with.

users.conf

Privileges and hostname spoofs for users.

The only privilege right now is flood exemption.

TLS

A setup for a network might look like this:

  • Give each server a certificate with 2 SANs: Its own hostname, e.g. server1.example.com, and the network hostname, e.g. irc.example.com.
  • Set up irc.example.com with DNS round-robin listing each server's IP.
  • List each server by its own hostname in servers.conf.

Clients connect to the network hostname and verify against it. Servers connect to each other by server hostname and verify against it.

Why the name?

My domain name is summercat.com, cats love boxes, and a tribute to ircd-ratbox, the IRC daemon I used in the past.

Logo

catbox logo (c) 2017 Bee

catbox's People

Contributors

horgh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

catbox's Issues

I'd like to add I2P support, use catbox as an embedded IRC server/package, and make LIST behavior configurable. Should I upstream or should I fork?

I'm interested in making it very easy for small organizations to set up reasonably resilient chat networks inside of I2P(we're a peer-to-peer anonymizing network in case you're not familiar, https://geti2p.net is our homepage) by setting up IRC servers and linking them together, server-to-server, using I2P hostnames instead of normal hostnames.

One effect of catbox's understandable design was that it was very simple for me to discern how to make it easy to configure catbox to set up it's own I2P connections for both from IRC clients and Server-to-Server links automatically using I2P Addresshelper links to configure human-readable hostnames, and the Simple Anonymous Messaging API to set up listeners and dial connections. I have a branch over here where I have added support: https://github.com/eyedeekay/catbox/tree/i2p already.

In that branch, I have also moved main to cmd/catbox/catbox.go and turned the code in the root of the repo into a package, package catbox in order to make it possible to treat catbox as a package from another application. I want this so that I can build a bridge between catbox and Java with the JNI and tie the lifetime of the catbox to the lifetime of an I2P router using an I2P Plugin. This would require being able to build catbox as an importable package.

I'd also make the behavior of the LIST command configurable, with the default remaining to not list rooms. I have not added this capability in a branch yet, I wanted to see how hard it would be to port it to I2P first.

However, your README indicates that you don't want to complicate things and I wonder if I'm beginning to push the limits of what you want to do with catbox. Is my use case too odd or obscure for your vision? If so, my intention is to(respectfully) fork and credit you for the original work, it's really just extraordinarily well suited to the I have in mind.

Use of closed connection after QUIT

After client closed connection i see this... warning?

2023/10/21 15:11:34 Client 0 127.0.0.1:40376: Read problem: error reading: read tcp 127.0.0.1:6667->127.0.0.1:40376: use of closed network connection
2023/10/21 15:11:34 Client 0 127.0.0.1:40376: Reader shutting down.
2023/10/21 15:11:34 Client 0 127.0.0.1:40376: Writer shutting down.

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.