dircproxy: Frequently Asked Questions ------------------------------------- Questions ========= 1. Introduction 1.1 What is dircproxy? 1.2 Where can I get dircproxy? 1.3 Are there any mailing lists? 1.4 Is there a dircproxy IRC channel? 1.5 How do I report bugs? 1.6 Is there an anonymous CVS server? 1.7 How do I add a question to the FAQ? 2. Installation 2.1 How do I compile and install dircproxy? 2.2 I get "couldn't find your xxx() function" from configure 2.3 Compilation fails with "xxx.h: No such file or directory" 2.4 Compilation fails with "undefined reference to `xxx'" 2.5 What does --enable-debug do? 2.6 Is dircproxy supported on Windows 2000? 3. Usage 3.1 What are configuration classes? 3.2 Can dircproxy be used as an "open proxy"? 3.3 Where in the config file do I put my nickname? 3.4 Can dircproxy be run from inetd? 3.5 dircproxy won't start and says I need to define connection classes, how do I do this? 3.6 I started dircproxy, but it hasn't connected to any servers yet, what have I done wrong? 3.7 dircproxy will not accept my password, I know its right as its exactly what I typed into the configuration file. 3.8 How do I get a running dircproxy to reread its configuration file? 3.9 How do I detach from dircproxy? 3.10 How can I get dircproxy to disconnect from the server? 3.11 Can I connect multiple clients to the same running session? 3.12 Can one dircproxy connection class be used to connect to multiple servers? 3.13 Why doesn't dircproxy ever keep my nickname? 3.14 Can I get dircproxy to automatically connect to the server without connecting at least once? 3.15 Does dircproxy support user scripts to extend it? 3.16 Does dircproxy provide auto-op or auto-voice support? 4. Logging 4.1 Why does dircproxy by default log channels while I'm attached? 4.2 How do I log everything and keep it for my own reference in years to come? 4.3 Why does the permanent copy contain text from all the clients dircproxy is proxying? 4.4 How do I log private messages to individual files? 4.5 How do I log outgoing private messages? 5. DCC Proxying 5.1 Why would I want dircproxy to proxy DCC requests as well? 5.2 What's "DCC over ssh" and how do I use it? 5.3 Does text I type before dircproxy tells me the remote peer has connected ever reach them? 5.4 Why doesn't dircproxy support DCC RESUME? 6. Advanced Use 6.1 How do I change what username is presented on IRC? Answers ======= 1.1 What is dircproxy? dircproxy is an IRC proxy server designed for people who use IRC from lots of different workstations or clients, but wish to remain connected and see what they missed while they were away. You connect to IRC through dircproxy, and it keeps you connected to the server, even after you detach your client from it. While you're detached, it logs channel and private messages as well as important events, and when you re-attach it'll let you know what you missed. This can be used to give you roughly the same functionality as using ircII and screen together, except you can use whatever IRC client you like, including X ones! 1.2 Where can I get dircproxy? The dircproxy home page was at http://www.dircproxy.net/. As of July 10, 2004, the best way to get the current version of dircproxy is through the Debian archives. 1.3 Are there any mailing lists? Information on mailing lists was at http://www.dircproxy.net/lists.html 1.4 Is there a dircproxy IRC channel? Yes, on the OpenProjects IRC network (irc.openprojects.net) called #dircproxy. I can usually be found with the nickname Keybuk. 1.5 How do I report bugs? Use the Debian BTS. 1.6 Is there an anonymous CVS server? Information on the former CVS server was at http://www.dircproxy.net/cvs.html 1.7 How do I add a question to the FAQ? E-mail me at alex@pennace.org and I'll see if its suitable for inclusion. 2.1 How do I compile and install dircproxy? Read the INSTALL file in the dircproxy distribution. 2.2 I get "couldn't find your xxx() function" from configure dircproxy makes very few requirements on your system, and your libc. The only things it does require are TCP/IP support through the socket() function, DNS resolver support through the gethostbyname() function and encryption support through the crypt() function. The 'configure' program checks a few likely locations for these functions and if it can't find them will generate the appropriate warning. For example: checking for crypt... no checking for crypt in -lcrypt... no configure: warning: couldn't find your crypt() function If you know which library these functions are located in, you can pass the LDFLAGS shell variable to tell it. For example, if you know your crypt() function is in the libdes.so (example only!) library, you can do this: $ LDFLAGS=-ldes ./configure ... Then let me know what type of system you have and what you did, so I can make future versions of dircproxy detect this case automatically. If you can't find these functions, you'll need to chat to your local sysadmin or UNIX guru and get them to upgrade your libc to something a little more up to date. 2.3 Compilation fails with "xxx.h: No such file or directory" This most likely means that a system header file that dircproxy needs wasn't found on your system. It can also mean that the dircproxy source isn't complete. Find out which directory that header file is on your system, and pass that to the 'configure' program using the CFLAGS shell variable like this: $ CFLAGS=-I/path/to/directory ./configure ... If you can't find it, you'll need to find out what your system's equivalent is, then let me know all about it so I can enable future versions of dircproxy to support your system fully. If there is no equivalent you'll need to get your sysadmin or UNIX guru to upgrade your libc to something more up to date. 2.4 Compilation fails with "undefined reference to `xxx'" This means that a system function dircproxy uses wasn't found on your system. You'll need to find out in which library on your system that function is. Then if for example its in libmisc.so pass that using the LDFLAGS shall variable to 'configure' like this: $ LDFLAGS=-lmisc ./configure ... If you're system doesn't have that function, you'll need to get your sysadmin or local UNIX guru to upgrade your libc to something a little more up to date. 2.5 What does --enable-debug do? Its used primarily by myself to debug dircproxy, it can also be used by anyone else who wants to help out debugging it. One main difference is that dircproxy will not switch to the background, but will stay in the foreground and write a lot of strange information (including a record of all text received from the client and server) to the console. This reverses the meaning of the -D parameter. It also causes dircproxy to use its built-in versions of strdup() sprintf() and vsprintf() instead of any that might exist in your libc. Finally it switches on a lot of expensive memory debugging code that records every malloc(), realloc() and free(), notes what C file and line it occurred in and pads the memory with random junk to detect most buffer overruns. On termination you will see a memory report (hopefully saying "0 bytes in use"), you can also send a USR1 signal to dircproxy to see how much memory it thinks its using, and a USR2 signal to see exactly what is in its memory and where it was allocated. This slows down dircproxy a lot and makes it inconvenient to use. However, for people wanting to do dircproxy code work its invaluable. 2.6 Is dircproxy supported on Windows 2000? No, it is not supported and never will be supported. Get a real operating system(tm) :o) However, I've heard it works just fine. 3.1 What are configuration classes? A configuration class defines a possible client/server proxied connection. Basically you define a connection class, setting a password and server to connect to, then when you connect to dircproxy and give your password for the first time, it automatically connects you to a server. This connection class is then assigned to your proxy session and cannot be used by anyone else until you cause dircproxy to disconnect from the server (see 3.10). When you reconnect, all you need to do is supply the password again. dircproxy then sees that your connection class is already in use and simply attaches you to that. This means you don't need to specify any "one time passwords", or magic connection or reconnection commands etc. dircproxy can be used by simply telling your IRC client to supply a "server password" when it connects. Everything else is automatic. 3.2 Can dircproxy be used as an "open proxy"? Yes, only if each user knows the password. dircproxy does NOT support password-less proxy sessions, if you do that you'll just annoy the IRC operators and get yourself banned from the IRC network. Open IRC proxies are a BAD THING and lead to abuse of the IRC network. You may however use dircproxy as a proxy for many users who know the password. This can be accomplished by running it from inetd (one of the few reasons to do this). Set it up as described in README.inetd, and set up a single connection class with the appropriate password etc. By default, dircproxy will not remain attached to the server when each client quits, they'll need to explicitly do a /DIRCPROXY PERSIST to do that. 3.3 Where in the config file do I put my nickname? You don't. dircproxy doesn't connect to the IRC server until you connect to it. This means it can pick up the nickname from the one your IRC client sends. All you need to tell dircproxy is what server you want to connect to. The rest of the information such as your nickname, user name and full name etc are taken from your IRC client when it first connects to it. 3.4 Can dircproxy be run from inetd? Yes. See the README.inetd file in the dircproxy distribution. 3.5 dircproxy won't start and says I need to define connection classes, how do I do this? You need to create a configuration file. Best way is to get the example one in the conf subdirectory of the dircproxy (or if its just installed on a machine you are using, the /usr/local/share/dircproxy directory), copy it to your home directory, call it .dircproxyrc and make sure it has no more than 0600 permissions (-rw-------). Then edit this file, its very well documented. The configuration classes are defined right at the bottom. 3.6 I started dircproxy, but it hasn't connected to any servers yet, what have I done wrong? Nothing, dircproxy won't connect to the server until you connect an IRC client to it. 3.7 dircproxy will not accept my password, I know its right as it's exactly what I typed into the configuration file. dircproxy requires that IRC client passwords in the configuration file are encrypted so that anyone managing to read the file off the disk can't get the password and use your dircproxy session. Encrypt them using your systems crypt(3) function or by using the dircproxy-crypt(1) utility included with the dircproxy source. 3.8 How do I get a running dircproxy to reread its configuration file? Send it a hang-up (HUP) signal. The process ID can be obtained using the 'ps' command, and then signal sent using the 'kill' command. On BSD-like machines, this can be done like this: $ ps aux | grep dircproxy user 7410 0.0... $ kill -HUP 7410 Or on a SysV-like machine, like this: % ps -ef | grep dircproxy user 7410 388... $ kill -HUP 7410 Note that certain configuration options do not take effect until you reconnect to a server, or detach from dircproxy. 3.9 How do I detach from dircproxy? Close your IRC client, probably by typing /QUIT. You don't need tell dircproxy you're detaching, it can guess that by your connection to it closing. The exception to this is if you're running dircproxy from inetd, if this is the case you'll need to do a /DIRCPROXY PERSIST before you close to tell it that you want to reconnect later. dircproxy will tell you what port number to reconnect at. 3.10 How can I get dircproxy to disconnect from the server? Using the /DIRCPROXY QUIT command. You can specify an optional quit message if you like, for example. > /DIRCPROXY QUIT Right, four weeks in the sun, here I come! 3.11 Can I connect multiple clients to the same running session? No. After all, which one do you listen to? It could all get very schizophrenic with two people typing under the same nickname from different computers. 3.12 Can one dircproxy connection class be used to connect to multiple servers? No. It might sound fairly simple to implement at first, tracking channels is fairly easy, its tracking nicknames thats the problem. 3.13 Why doesn't dircproxy ever keep my nickname? First of all, check you've *not* got the following in your configuration file. nick_keep no "yes" is the default, so if this option isn't set, then it will be used. dircproxy will attempt to keep whatever nickname your client last set using the NICK command. This means that if you connect a client while dircproxy's attempting to restore your nickname, and your client reacts to the server messages (as most "clever" clients do) than dircproxy will accept the new nickname and stop guarding the old one. If it never restores your nickname when left without a client connected, it may be that the server believes dircproxy is changing it's nickname "too fast" or "too many times". The default is to attempt to restore the nickname once per minute. You can adjust this by changing the 'NICK_GUARD_TIME' #define in src/dircproxy.h. 3.14 Can I get dircproxy to automatically connect to the server without connecting at least once? No. dircproxy was never written to connect to an IRC server without seeing an IRC client first. 3.15 Does dircproxy support user scripts to extend it? No. dircproxy is intended purely as an IRC proxy. Scripting support would make it too much like a bot, if you want that kind of thing then a bot would serve you much better. Go download eggdrop, and get yourself K-Lined from your IRC server. :o) 3.16 Does dircproxy provide auto-op or auto-voice support? No, again this functionality would be better supplied by a bot. Chris Crowther has writtne a patch to provide this kind of support using dircproxy. This isn't an official patch, however it is available from: http://www.shad0w.org.uk/code/ 4.1 Why does dircproxy by default log channels while I'm attached? dircproxy was originally designed to give roughly the same functionality as using ircII and screen, but allowing you to use X clients (which can't be screen'd). This means it tries to give you a "full screen" of text when you reattach, so if you've only just disconnected, a full screen includes that which happened before you disconnected. Its actually quite useful when you think about it: Argh, I think my computer's about to crash? Hi there :) My name is X. -dircproxy- You disconnected Do you want to go out for a drink sometime? -dircproxy- You connected Hi X, sure :) You might not have seen your dream date's name :) Its also handy for reference. You can always switch it off though by setting this in the config file: chan_log_always no 4.2 How do I log everything and keep it for my own reference in years to come? Create a directory for dircproxy to store the logs in, and then tell dircproxy to store a "permanent copy" in that directory like this: chan_log_copydir /path/to/directory other_log_copydir /path/to/directory 4.3 Why does the permanent copy contain text from all the clients dircproxy is proxying? Because you've set the directory name globally for all connection classes in the configuration file. Because dircproxy doesn't use the logs itself, its not a security risk or anything to be able to do this, and if each person is on a different channel, its quite a handy thing to do. If you don't want it to do this, define the 'chan_log_copydir' and 'other_log_copydir' inside each connection class instead of the global level, like this: connection { : chan_log_copydir /path/to/directory other_log_copydir /path/to/directory : } connection { : chan_log_copydir /path/to/directory2 other_log_copydir /path/to/directory2 : } 4.4 How do I log private messages to individual files? Use the 'privmsg-log.pl' script in the contrib directory of the dircproxy source as a filter as an 'other_log_program'. You'll need to edit the script to set the directory to store these private message log files, and need to add the following to your dircproxy configuration file: other_log_program "/usr/local/share/dircproxy/privmsg-log.pl" 4.5 How do I log outgoing private messages? You can't, there's no way for dircproxy to replay them for you (every client I tested ignored them). 5.1 Why would I want dircproxy to proxy DCC requests as well? DCC proxying means that all DCC requests get proxied through dircproxy just like your normal IRC requests. This means your real IP address is just as hidden as it is on IRC. Also if you're running dircproxy on your NAT firewall so you can actually get on IRC, you'll be able to do DCCs to as it will be proxying them between the two networks for you. 5.2 What's "DCC over ssh" and how do I use it? For a complete description, including how to do it, see the README.dcc-via-ssh file in the dircproxy distribution. Simply its a way of doing DCCs over ssh tunnels to get around any firewalls that might be in the way that would normally prevent even the most determined proxy from allowing DCCs. 5.3 Does text I type before dircproxy tells me the remote peer has connected ever reach them? Yes, its simply queued until the remote side connects, then is sent to them. 5.4 Why doesn't dircproxy support DCC RESUME? The DCC RESUME protocol is an mIRC extension to the standard, and is documented at: http://www.mirc.co.uk/help/dccresum.txt dircproxy does not support this protocol, therefore you cannot resume DCC transfers if you are using dircproxy. DCC RESUME support will *never* be implemented in dircproxy, the reason for this is as follows. Ordinary DCC SENDs are offered by the sender sending a DCC SEND message to the receiver containing a ip address and port number. The receiver accepts the offer by connecting to it. [ sender ] --(1) DCC SEND--> [ receiver ] <---(2) accept--- When proxied through dircproxy, dircproxy accepts the offer itself, then makes a new offer to the receiver. This means that dircproxy has already usually received a fair portion of the file before the receiver accepts dircproxy's own offer. This greatly increases the speed of transfers. [ sender ] --(1) DCC SEND--> [ proxy ] --(3) DCC SEND--> [ receiver ] <---(2) accept--- <---(4) accept--- If the DCC RESUME protocol is used, the receiver indicates it wishes to do so by sending a DCC RESUME message to the sender instead of connecting to it, the connect is only done after a DCC ACCEPT is received from the sender. [ sender ] --(1) DCC SEND--> [ receiver ] <-(2) DCC RESUME- -(3) DCC ACCEPT-> <---(4) accept--- Of course, with dircproxy proxying, this is too late, it's already accepted the sender's offer and is receiving the file from the beginning. Ryan Tolboom has written a patch to enable DCC RESUME for files that dircproxy has captured, this is available from: http://www-ec.njit.edu/~rxt1077/dircproxy-resume/ 6.1 How do I change what username is presented on IRC? The obvious answer is to run dircproxy under that username, but that doesn't help if you're proxying for multiple people. Another option is to use one of the many fake ident daemons to return a false answer for you. There's also a third option, which is available to those running dircproxy as root (either as a daemon or from inetd). You can use the 'switch_user' configuration file directive. This ensures that the connection to the server appears as from whatever local username you give it (by seteuid()ing to that briefly) while the dircproxy process remains as root. Copyright (C) 2002 Scott James Remnant . All Rights Reserved.