soju

package module
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2024 License: AGPL-3.0 Imports: 51 Imported by: 0

README

soju

builds.sr.ht status

soju is a user-friendly IRC bouncer. soju connects to upstream IRC servers on behalf of the user to provide extra functionality. soju supports many features such as multiple users, numerous IRCv3 extensions, chat history playback and detached channels. It is well-suited for both small and large deployments.

Usage

Building and installing

Dependencies:

  • Go
  • BSD or GNU make
  • a C89 compiler (optional, for SQLite)
  • scdoc (optional, for man pages)

For end users, a Makefile is provided:

make
sudo make install

For development, you can use go run ./cmd/soju as usual.

To link with the system libsqlite3, set GOFLAGS="-tags=libsqlite3". To disable SQLite support, set GOFLAGS="-tags=nosqlite". To use an alternative SQLite library that does not require CGO, set GOFLAGS="-tags=moderncsqlite". To build with PAM authentication support, set GOFLAGS="-tags=pam".

Contributing

Send patches on the mailing list or on GitHub, report bugs on the issue tracker. Discuss in #soju on Libera Chat.

License

AGPLv3, see LICENSE.

Copyright (C) 2020 The soju Contributors

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRetryListener added in v0.5.0

func NewRetryListener(ln net.Listener) net.Listener

Types

type Config added in v0.3.0

type Config struct {
	Hostname                  string
	Title                     string
	MsgStoreDriver            string
	MsgStorePath              string
	HTTPOrigins               []string
	HTTPIngress               string
	AcceptProxyIPs            config.IPSet
	MaxUserNetworks           int
	MOTD                      string
	UpstreamUserIPs           []*net.IPNet
	DisableInactiveUsersDelay time.Duration
	EnableUsersOnAuth         bool
	Auth                      auth.Authenticator
	FileUploader              fileupload.Uploader
}

type Logger

type Logger interface {
	Printf(format string, v ...interface{})
	Debugf(format string, v ...interface{})
}

func NewLogger added in v0.4.0

func NewLogger(out io.Writer, debug bool) Logger

type Server

type Server struct {
	Logger          Logger
	Identd          *identd.Identd        // can be nil
	MetricsRegistry prometheus.Registerer // can be nil
	// contains filtered or unexported fields
}

func NewServer

func NewServer(db database.Database) *Server

func (*Server) Config added in v0.3.0

func (s *Server) Config() *Config

func (*Server) Handle added in v0.6.0

func (s *Server) Handle(ic ircConn)

func (*Server) HandleAdmin added in v0.6.0

func (s *Server) HandleAdmin(ic ircConn)

func (*Server) Serve

func (s *Server) Serve(ln net.Listener, handler func(ircConn)) error

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, req *http.Request)

func (*Server) SetConfig added in v0.3.0

func (s *Server) SetConfig(cfg *Config)

func (*Server) Shutdown

func (s *Server) Shutdown()

func (*Server) Start

func (s *Server) Start() error

func (*Server) Stats added in v0.3.0

func (s *Server) Stats() *ServerStats

type ServerStats added in v0.3.0

type ServerStats struct {
	Users       int
	Downstreams int64
	Upstreams   int64
}

type UserUpdateFunc added in v0.6.0

type UserUpdateFunc func(record *database.User) error

Directories

Path Synopsis
cmd
contrib
Package identd implements an Identification Protocol server.
Package identd implements an Identification Protocol server.
Package xirc contains an extended IRC library.
Package xirc contains an extended IRC library.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL