...

Monday, June 4, 2007

Bip: Multiclient Logging IRC Proxy

Program Website: http://bip.berlios.de/

IRC proxies assist an IRC user by handling connections to real IRC servers for the IRC user. This allows an IRC proxy offer a rich set of features to the IRC user, such as: maintaining your connection to servers and specific channels; replay of last 500 or so lines said per channel on reconnect to the proxy; accepting DCC file transfers when user is offline; adjusting your away status if you are connected or not. There are a few fun script functions a few IRC proxies offer to compensate for using an IRC proxy like filling out Nickserv information automatically on behalf of the IRC user. Sometimes IRC clients configured to handle Nickserv services for the user have trouble registering your handle when using an IRC proxy; once your client registers your handle through an IRC proxy any new connections to the IRC proxy with a client set up to handle Nickserv registrations will result in repeat registrations which bog down server facilities and fill your IRC logs with "you're a dummy" remarks.

One of the main things that drew me to Bip was the multi-client proxy support. This allows me to have multiply IRC clients connected to the same IRC session. I am hardwire at work just as much as I am hardwire at home, What I type or read at work is the same as what is being displayed on the IRC client running at home. Its a wonderful function that gets rid of a ton of issues I have had with other clients that disconnected already connected IRC clients in favor of a new connection. Those lead to a lot of trouble.

Getting started with Bip:

Download the source and compile bip according to its installation instructions listed on the project website, or just use apt.

apt-get install bip

Bip is best configured as a service on a server or workstation, it should be started from the runlevel system under your default runlevel. Under Debian and Ubuntu a symlink is installed as /etc/rc2.d/S20bip pointing to the service shell script at /etc/init.d/bip, however the service will not be run until a valid configuration file is made and the service defaults file for bip has been updated:

/etc/default/bip:
ENABLED=1

Before you edit /etc/bip.conf you should generate a few encrypted passwords using /usr/bin/bipmkpw:

bogomip:~# /usr/bin/bipmkpw
Password: sexypants
645e2a150281ab00dd0be608f88c9e4b70aca3e8

Now I can use the ciphered version of the phrase "sexypants" in my /etc/bip.conf to control access to the IRC proxy. Time to set up a simple bip.conf, all changes to the default bip.conf are in bold. For space reasons commenting has been removed:

/etc/bip.conf:
ip = "0.0.0.0";

port = 7778;


client_side_ssl = false;


log_level = 3;

pid_file="/var/run/bip/bip.pid";

log_root = "/var/log/bip/";

#log_format = "%n/%Y-%m/%c.%d.log";

#log_sync_interval = 5;

backlog = true; # enable backlog
backlog_lines = 100; # number of lines in backlog, 0 means no limit
always_backlog = true; # backlog even lines already backlogged

#blreset_on_talk = false;

network {
name = "freenode";
server { host = "irc.freenode.net"; port = 6667; };
};

network {
name = "oftc";
server { host = "irc.oftc.net"; port = 6667; };
};

user {
name = "hardwire";
password = "
645e2a150281ab00dd0be608f88c9e4b70aca3e8";

ssl_check_mode = "none";

# ssl_check_store = "/home/bip`debian/.bip/trustedcerts.txt";

default_nick = "hardwire";

default_user = "bip";
default_realname = "Shane R. Spencer";

connection {
name = "freenode"; # used by bip only
network = "freenode"; # which ircnet to connect to

#user = "otheruser";

#realname = "otheruser";
#password = "serverpassword";

#away_nick = "bip`away";
#follow_nick = true;
#ignore_first_nick = true;
on_connect_send = "PRIVMSG NickServ :IDENTIFY mynickservpassword";

channel { name = "#tacobeam"; };

#channel {

#name = "#elite_UnDeRgR0uNd";
#key = "sikour";
#};
};

connection {
name = "oftc"; # used by bip only
network = "oftc"; # which ircnet to connect to

#away_nick = "bip`away";
#follow_nick = true;
#ignore_first_nick = true;
#on_connect_send = "PRIVMSG NickServ :IDENTIFY nspassword";

channel { name = "#bip"; };
};
};

That is a a very simple configuration example based on my personal preferences, not a lot is changed and it is run as a service. Connecting to the Bip IRC proxy from an IRC client is simple and straightforward. Aim your client to the servername and port of your IRC proxy and set the server password using the following schema user:pass:server, an example of this using the above paramters would be hardwire:sexypants:freenode.

Have fun, enjoy, click on my Google ads or die a horrible death.

4 comments:

ifj. Tarnay Kálmán said...

Where did you find that it can accept DCC file transfers when user is offline?
I can't find it anywhere...

Arnaud Cornet said...

BIP does not support DCC

Zitune said...

Do you know how to set the status to away when the last client disconnect from bip ?

whardier said...

I thuoght BIP accepted DCC, my mistake.

Zitune in bip.conf there is a setting for what nick to use when away. I've not tested it. Check out the example bip.conf that comes with the software.