IRC Client Config - adsr/irslackd GitHub Wiki
Have the following values handy before configuring your IRC client.
-
<host>
, the host irslackd is running on,localhost
unless you're running it remotely. -
<port>
, the port irslackd is listening on,6697
by default. -
<ssl-fingerprint>
, the TLS cert fingerprint from step 3 in the README. -
<xoxp-token>
, the Slack API access token from step 5 in the README.
The following preferences can be appended to <xoxp-token>
. For example, to disable reactions and threads, use <xoxp-token> no-reactions no-threads
instead of <xoxp-token>
.
-
no-reactions
disable reactions -
no-threads
disable threads -
debug-chan
join the debug channel+irslackd
at connect time which prints errors -
typing-notifications
send and receive typing notifications viaCTCP TYPING
messages -
presence
monitor user presence changes using voice/devoice (+v/-v
)CHAN MODE
messages
/server add irslackd_workspace <host>/<port>
/set irc.server.irslackd_workspace.ssl on
/set irc.server.irslackd_workspace.ssl_fingerprint <ssl-fingerprint>
/set irc.server.irslackd_workspace.password <xoxp-token>
/connect irslackd_workspace
- Under the 'Networks' section in user settings, click 'Add'.
- In 'Servers of this IRC network' enter:
<host> +<port> <xoxp-token>
- In 'Trusted SSL fingerprints of this IRC network' enter:
<ssl-fingerprint>
- Save
- Connect to ZNC w/your client and enjoy
- Under 'HexCHat' select 'Network List', then 'Add'
- In 'Servers' area enter
<host>/<port>
- Check (enable) 'Use SSL for all the servers on this network'
- Check (enable) 'Accept invalid SSL certificates'
- In 'User name' enter your workspace username
- For 'Login method' select 'Server Password (/PASS command)'
- In 'Password' enter your
<xoxp-token>
- Close
- Connect to irslackd
- Click the '+' (lower left) to "Add Server"
- Under 'General'
- Connection Name: Workspace Name
- Sever Address:
<host>
- Port:
<port>
- Port: check (enable) 'Connect Securely'
- Server Password:
<xoxp-token>
- Under 'Identity'
- Username: enter your workspace username
- Save
- Connect to irslackd
irslackd has experimental support for xoxc-
tokens. These are tokens that are only valid when coupled with auth cookies. The advantage of xoxc-
tokens over xoxp-
tokens is that they should work even if irslackd is not approved in your Slack workspace. In other words, they should work everywhere.
To use an xoxc-
token, configure your IRC client to use this for the password:
<xoxc-token>|<base64-cookie>
Read on to learn how to find these values.
First browse to the target workspace and login. Now load up Chrome DevTools (or equivalent) and click on the Network tab. Look for Slack API requests (XHR), for example conversations.history
:
You will find <xoxc-token>
in a request field called token
. It should look something like the following:
xoxc-000000000000-000000000000-000000000000-000000000x000xx0x00x0x00xx0xx0000x0xx0xx0x000x0000000x00xx00x0xx
Next, copy the value of the Cookie
request header verbatim. Each of the field values should be URL-encoded. (If you're unfamiliar, there should be some percent signs (%
) in the strings.) Avoid using Chrome's "Copy value" function which appears to apply URL-decoding. The situation is similar in Firefox, except the value is also displayed with URL-decoding, so you'll have to manually URL-encode the fields. A web site like www.urlencoder.org may help. The final value should look something like the following:
b=.0xxxx0x0xxxxxxxxxxx0000x0; d-s=0000000000; d=x00xxXXXXX0XxX0xxxxxx%0XxXxXX0XxXxXX%0XxXXX000XXXXXXXx0xx0xx0XxXxxxxx00x0xxxxxxx%0XXXx00XxxxX0xXxXXxxxXXx0xx%0XXXX0xXxXxxxXXx%0XXXXxxX0xxX0xxXxXXXX0X0X%0XXxxX0xxXXxx0XX0XxXx0XXXXx0XxXxXxXxXXxx0Xx%0X; lc=0000000000; x=0xxxx0x0xxxxxxxxxxx0000x0.0000000000
(I have not narrowed down which cookie fields are actually required but it does not seem to hurt to use all of them.)
Now base64 the cookie to get <base64-cookie>
:
$ echo -n 'b=.0xxxx0x0xxxxxxxxxxx0000x0; d-s=0000000000; d=x00xxXXXXX0XxX0xxxxxx%0XxXxXX0XxXxXX%0XxXXX000XXXXXXXx0xx0xx0XxXxxxxx00x0xxxxxxx%0XXXx00XxxxX0xXxXXxxxXXx0xx%0XXXX0xXxXxxxXXx%0XXXXxxX0xxX0xxXxXXXX0X0X%0XXxxX0xxXXxx0XX0XxXx0XXXXx0XxXxXxXxXXxx0Xx%0X; lc=0000000000; x=0xxxx0x0xxxxxxxxxxx0000x0.0000000000' | base64 -w0
Yj0uMHh4eHgweDB4eHh4eHh4eHh4eDAwMDB4MDsgZC1zPTAwMDAwMDAwMDA7IGQ9eDAweHhYWFhYWDBYeFgweHh4eHh4JTBYeFh4WFgwWHhYeFhYJTBYeFhYWDAwMFhYWFhYWFh4MHh4MHh4MFh4WHh4eHh4MDB4MHh4eHh4eHglMFhYWHgwMFh4eHhYMHhYeFhYeHh4WFh4MHh4JTBYWFhYMHhYeFh4eHhYWHglMFhYWFh4eFgweHhYMHh4WHhYWFhYMFgwWCUwWFh4eFgweHhYWHh4MFhYMFh4WHgwWFhYWHgwWHhYeFh4WHhYWHh4MFh4JTBYOyBsYz0wMDAwMDAwMDAwOyB4PTB4eHh4MHgweHh4eHh4eHh4eHgwMDAweDAuMDAwMDAwMDAwMA==
So the final value of <xoxc-token>|<base64-cookie>
is:
xoxc-000000000000-000000000000-000000000000-000000000x000xx0x00x0x00xx0xx0000x0xx0xx0x000x0000000x00xx00x0xx|Yj0uMHh4eHgweDB4eHh4eHh4eHh4eDAwMDB4MDsgZC1zPTAwMDAwMDAwMDA7IGQ9eDAweHhYWFhYWDBYeFgweHh4eHh4JTBYeFh4WFgwWHhYeFhYJTBYeFhYWDAwMFhYWFhYWFh4MHh4MHh4MFh4WHh4eHh4MDB4MHh4eHh4eHglMFhYWHgwMFh4eHhYMHhYeFhYeHh4WFh4MHh4JTBYWFhYMHhYeFh4eHhYWHglMFhYWFh4eFgweHhYMHh4WHhYWFhYMFgwWCUwWFh4eFgweHhYWHh4MFhYMFh4WHgwWFhYWHgwWHhYeFh4WHhYWHh4MFh4JTBYOyBsYz0wMDAwMDAwMDAwOyB4PTB4eHh4MHgweHh4eHh4eHh4eHgwMDAweDAuMDAwMDAwMDAwMA==
Use this value (instead of <xoxp-token>
) for the irslackd server password in your IRC client and it should work.