Mirror of Malvager's Janus fork

Wazakindjes be860a6b3a Added n0te about services m0dule etc 1 year ago
c-src 5509c3cf9b Updated some shit 1 year ago
doc 5509c3cf9b Updated some shit 1 year ago
extras 5509c3cf9b Updated some shit 1 year ago
src b188f6ed13 @smo_sent to keep track of sent SMOs to prevent duplicates lol 1 year ago
.gitignore 8f0e2cc942 Ignore SSL shit 1 year ago
LICENSE 5509c3cf9b Updated some shit 1 year ago
README.md be860a6b3a Added n0te about services m0dule etc 1 year ago
configure 5509c3cf9b Updated some shit 1 year ago
janus 32977ec085 Changed version, also moved out of alpha/beta to RC =]] 1 year ago
janus.conf.example d2b0660a36 Made netmap configurable =] 1 year ago


Malvager Note

This is a fork of a fork of Janus. =] Current: https://gitgud.malvager.net/Wazakindjes/Janus Forked from: https://github.com/asterIRC/doge-janus Original: https://github.com/danieldg/janus

I've kept the documentation from doge-janus (sections prefixed with DOGE:) as well as the original dev's docs (all the way down, also with a few notes added). ;3


  • Support for newer UnrealIRCd's (the one with UID etc, generally v4+)
  • Network tag position is now configurable with tagpos (so like choosing between MyNet/user and user/MyNet)
  • Fixed some issues regarding comparing uninitialised variables or comparing strings using a numeric operator
  • The subroutine homenet was undefined for channels, that can't be healthy =]
  • Prevented Janus from relaying MLOCK fights across all links (refer to issue #13)
  • Related: The homenet (actually the relevant Janus module) will undo the channel modes +s, +O and +i if set from other networks (or vice versa), this is also not relayed to other netw0rks
  • Janus used to output an empty line every few seconds but this is now configurable with flush (and suppressed by default, as this avoids clearing out a screen/tmux buffer)
  • May or may not have fixed Ratbox getting desynced from Unreal 3 upon linking, it's much harder to reproduce than it was before anyways ;3
  • Stabilised tagall 0, as in no m0ar nick collision kills at link-time (refer to issue #22)
  • Related: Tricked Unreal 3 into using UIDs to prevent these same nick collisions (issue #30 yo)
  • Display full network map (that is, leaves behind a Janus linked network; issue #28 lol)
  • Added a bunch of important info for various IRCds and services (see below)

Important notes:

There are some things to take into consideration when attempting Janus links.

Unreal 3: Is officially deprecated as of 1 January 2017, so you should move to Unreal 4 asap. There will be no more security patches so this has the potential to fuck up an entire composite network.

InspIRCd: Doesn't support UnrealIRCd's +q channel mode by default (channel owner etc). Wanting to link with Unreal requires loading m_chanprotect.so on the InspIRCd side as it defines +a and +q (just so it doesn't shit itself, it doesn't prepend signs for them). Otherwise it will cause netsplits, fucking constantly even if set to autoconnect. =] Janus also seems to require that InspIRCd loads m_chgident.so or it will croak about risking desync.

Ratbox: This shit requires you to recompile every time you want to change the max nickname length. I think by default it's something like 9, while UnrealIRCd supports a 30-char nick iirc. So before compiling Ratbox the first time, be sure to pass --with-nicklen=30 to ./configure yo. If you don't and someone with a longer nick joins, Unreal will continue to drop the link until Janus is killed (nick collision etc). For ratbox-services you're gonna have to pass -with-nicklen=30 --with-userreglen=30. If you don't then other IRCds will bitch about a Protocol violation: User changing nick to an invalid UID and split from Janus.

Unreal (any version): Tends to get desynced if the server timestamps are off. Y'all better agree on using a certain NTP server to make sure the system time isn't off by more than a few seconds.

Unreal v4+ only: Since version 3.4.something (some alpha version, not even downloadable anymore) Unreal started using UID (like TS6-based IRCds) for nick introductions between servers, instead of just NICK (not to mention the flags specified in PROTOCTL are way different). Because of this, you will have to specify type Unreal4 in the Janus link blocks. Failure to do so will cause massive netsplits, as Unreal4 doesn't recognise any of the hubbed users and kills each and every one of them (including remote services).

In general: If you specify tagall 1 Janus will always append a separation tag plus the link's name to the nicknames. If tagall 0 is used then Janus will only tag colliding nicks. If you use longass link names this might exceed the IRCd nicklen limit so keep that in mind. Also, be sure to have matching lengths for nicklen, userlen, hostlen and topiclen on all IRCds. Ratbox and I think InspIRCd too have a smaller topic length than Unreal, so at some point Janus may override the longer one with a shorter one. =]

Untrusted networks/Session limits: Setting untrusted 1 in a link block causes the "user is connecting from $ip" thing to be hidden entirely, and the "session" IP will be set to for all hubbed users (including services). Services have no origin so they always present themselves with an IP To avoid hitting session limits I changed this so it assigns the next IP from a range, so you can have about 16777216 (minus 3 actually) users. Keep in mind that untrusted has no effect on the raw nick in whoises as that's handled by the IRCd, not Janus. So on InspIRCd for example, it's Wazakindjes!Gottem@ and everyone will be able to see that. I guess this mostly applies to Unreal as I couldn't find anything related to session limits in the Ratbox(-services)/InspIRCd/Atheme configs. Also, refer to issues #23 and #25.

Multiple IRC services: If each subnetwork have their own services with conflicting MLOCKs (mode locks), that may result in a DoS/fuckload of mode changes. If NetA has MLOCK +s while NetB has -s, this will result in NetB unsetting it and NetA re-setting in a permanent loop. To circumvent this for common sensitive modes (+s, +O and +i) you are required to set homenet in the config. If one of these modes is changed on a non-home network server, Janus will re-set them without propagating any of this to other links. In case of an MLOCK at work, this will still cause massive spam, but only on the misconfigured non-home server. =] Also, refer to issue #13.

Pls halp w/ Janus

I guess you could get your ass on irc.malvager.net +6697 #janus if you need any help setting that shit up. If you haven't read above notes then you should do so now.

DOGE: What changes did you make?

In short? Most of the annoying messages have been disabled. The Controller bot and its features have been made more configurable from the conf file. A few features like custom (branded) domain names for the Janus bots, forced network tagging, colour code stripping and oper sharing level have been added in. The conf file also have been modified a bit to give a better working example and several notes have been added in to avoid confusion.

Notable Changes: There is only one InspIRCd module and one TS6 module. This was done for simplicity and you should be able to link to all modern versions of InspIRCd (1.2+ & 2.0+) as well as all the TS6 based IRCds like Ratbox, Charybdis and Elemental-IRCd without any problems. Another minor change with the TS6 module is that you do not need the ircd variable anymore since the Charybdis features are enabled by default.

DOGE: Quick start:

Run ./configure to check module dependencies and compile multiplex. If you get ssl-gnutls errors then run ./configure nossl instead.

See the example configuration for a description of what is needed there. After editing the configuration start janus by running ./janus

Note: Look in the /doc directory for more help regarding Janus and its parts.

Very original documentation

Linking modes:

Janus supports two main linking modes. The normal (and default) mode is called link and links individual channels. This is suitable for sharing a few related channels between networks, without needing to share services, network opers, or other unrelated channels.

The second mode is called bridge mode, and functions as a more transparent bridge, intended to be used between different IRCds on the same logical network. Many of the commands and modules do not apply to this mode, and will not work.

Available modules:

  • Modules::Ban Allows per-network bans of specific expressions matching users. Causes an auto-kickban when the user joins a remote channel.

  • Modules::BanSet Faster ban implementation for large ban lists (hundreds) by using exact matches rather than a linear search of regular expressions.

  • Modules::Claim Prevents opers and other network's services from changing modes in a shared channel if that channel has been claimed by certain network(s)

  • Modules::Global Send a global message to all channels or all users on the network. This module should be used lightly, as it's very annoying to ClientBot Networks. If you're a large network, Janus may attempt to notice non-existant users in the event of a desync.

  • Modules::KeepMode Stores the modes of a channel and restores them on a relink. Useful if you use "setmode" to change mode not available on the home network's ircd.

  • Modules::Qline Caches G-, Z-, and Q-lines for all networks, and optionally applies them to incoming nicks. This module must be loaded when janus starts to cache all lines; if loaded while running, it will only cache new lines, or will learn of all lines on the next netsplit.

  • Modules::Services (Malv: RECOMMENDED) Prevents communcation to and from remote services, and prevents services kills from being translated into kicks unless they are repeated.

  • Modules::Signals Rehashes the janus server on reciept of a SIGHUP.

  • Modules::Spamfilter (EXPERIMENTAL) Kills users sending a message matching a hardcoded regular expression. It is planned to replace this with a proper word-based filter in the future.

  • Modules::Vanish (Malv: OBSOLETED/REMOVED) Similar to ban, but makes the user invisible to the banning network rather than kicking them. This is clearly going to cause an apparent desync, including people talking to ghosts.

  • Modules::WhoisFilter Filters the /whois notification sent for remote nicks. These notices can be an annoyance because opers may not even be able to see a nick that can /whois them, and are often not interested in the activity of users not on their network.

If you make changes to any of the modules in Janus, in order to comply with the license, you must either load the SHOWSOURCE command or update the URL in the ABOUT command to one that contains the modified source.