This is my documentation of my first try building the ADCH++ hub software. The result is a private, register-only ADC Hub with encrypted connections. Before you proceed I recommend reading the basic and expert user guide which are very well written.
I’ve used version 2.8 from sourceforge which you can grab from here:
Download the adch++ source from sourceforge and extract:
cd /tmp wget adch++ <source-url> tar xfv adchpp_2.8.0_source.tar.gz cd adchpp_2.8.0_source/
Now we need to install the build tools. I’ve accepted all the vendor changes for python and readline-devel packages on OpenSuse 11.4. On 12.1 I was able to install them directly.
zypper in swig scons gcc-c++ libstdc++-devel python readline-devel openssl-devel
Compile adch++ now through:
Create a new user account for runnning the hub service because root should not do that.
mkdir /home/adchpp mkdir /home/adchpp/bin/ useradd -r -s /sbin/nologin -d /home/adchpp adchpp chown -R adchpp:users adchpp/ # make the config directory accessible chown -R adchpp:users /etc/adchpp/
Copy binaries, scripts and config files
mkdir /home/adchpp/bin/ cp build/release-default/bin/* /home/adchpp/bin/ mkdir /etc/adchpp mkdir /etc/adchpp/scripts cp -rf plugins/Script/examples/* /etc/adchpp/scripts/ cp -rf etc/* /etc/adchpp/
The hub could be started now, but we wanted encrypted connections which need some more configuration.
cd /etc/adchpp # Make the line endings unix style dos2unix Script.xml dos2unix adchpp.xml # Create certificates for encrypted connections mkdir certs cd certs/ openssl genrsa -out privkey.pem 2048 openssl req -new -x509 -key privkey.pem -out cacert.pem -days 1095 openssl dhparam -outform PEM -out dhparam.pem 1024
Enable TLS connections
Insert the following snippet into the right config section.
<Server Port="2780" TLS="1" Certificate="/etc/adchpp/certs/cacert.pem" PrivateKey="/etc/adchpp/certs/privkey.pem" TrustedPath="/etc/adchpp/certs/trusted/" DHParams="/etc/adchpp/certs/dhparam.pem" />
Get the scripts working. I have added the json, autil and aio.lua to the list. The Script.xml should look like this then:
<?xml version="1.0" encoding="utf-8" standalone="yes"?> <!--Ensure that you load the scripts in this order so that they work correctly.--> <ScriptPlugin> <Engine language="lua"> <Script>/etc/adchpp/scripts/json.lua</Script> <Script>/etc/adchpp/scripts/aio.lua</Script> <Script>/etc/adchpp/scripts/autil.lua</Script> <Script>/etc/adchpp/scripts/access.lua</Script> <Script>/etc/adchpp/scripts/access.bans.lua</Script> <Script>/etc/adchpp/scripts/access.guard.lua</Script> <Script>/etc/adchpp/scripts/access.op.lua</Script> <Script>/etc/adchpp/scripts/access.bot.lua</Script> <Script>/etc/adchpp/scripts/motd.lua</Script> <Script>/etc/adchpp/scripts/history.lua</Script> </Engine> </ScriptPlugin>
Start the hub under our new adchpp user
sudo -u adchpp /home/adchpp/bin/adchppd
Starting..Processing HubName Processing Description Processing Log Processing LogFile Processing MaxCommandSize Processing BufferSize Processing MaxBufferSize Processing OverflowTimeout Processing LogTimeout . 2.8.0 (r0) Release running, press ctrl-c to exit...
Looking good. Now we should be able to connect with dc++ to our server using adcs://ip:port. If something is not working or you are not able to execute any commands you should have a look into the log file in /etc/adchpp/logs/
The following steps are allready well documented in the basic user guide. I’ve listed them here only for the sake of completeness.
How to get the operator status
To make yourself the OP type the following into the dc++ chat.
+regme <password> [20:58] You're now successfuly registered with the Password: <password>
Then stop the hub and edit the users.txt in your /etc/adchpp/ directory and set your user level to 10.
Start the hub again and you will see that your the boss now.
How to limit access to registered users only
+cfg maxusers 0
How to register new users
+regnick <nick> <password> <level>
Now your hub is up and running and you can send out some invites. Have fun 🙂