Skip to content
Snippets Groups Projects
Commit ad64ec3c authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Merge branch 'mrc_ssl' into 'master'

Add ssl support for server to server connections.

See merge request !443
parents bc10c82c 40d5e4c6
No related branches found
No related tags found
2 merge requests!455Update branch with changes from master,!443Add ssl support for server to server connections.
......@@ -8,3 +8,7 @@ motd = true
banners = true
[aliases]
[client]
;change this to true if you want show the nick list on connect.
show_nicks=false
......@@ -18,18 +18,22 @@ js.time_limit=0;
var input_state = 'chat';
var show_nicks = false;
var f = new File(js.startup_dir + 'mrc-client.ini');
f.open('r');
const settings = {
root: f.iniGetObject(),
startup: f.iniGetObject('startup'),
aliases: f.iniGetObject('aliases') || {}
aliases: f.iniGetObject('aliases'),
client: f.iniGetObject('client') || {}
};
f.close();
f = undefined;
log(LOG_DEBUG,"settings is " + settings.client.show_nicks);
var show_nicks = (settings.client.show_nicks === true) ? true : false;
const NICK_COLOURS = [
'\x01h\x01r',
'\x01h\x01g',
......
server = mrc.bottomlessabyss.net
port = 5000
;use port 5001 if you want SSL and uncomment ssl=true
;port = 5001
;ssl=true
timeout = 10
ping_interval = 60
reconnect_delay = 30
......
......@@ -25,6 +25,9 @@ const system_info = f.iniGetObject('info') || {};
f.close();
f = undefined;
if (!settings.ssl)
settings.ssl=false;
const PROTOCOL_VERSION = '1.3.0';
const MAX_LINE = 256;
const FROM_SITE = system.qwk_id.toLowerCase();
......@@ -152,13 +155,21 @@ function client_send(message, username) {
});
}
function mrc_connect(host, port) {
function mrc_connect(host, port, ssl) {
if (time() - last_connect < settings.reconnect_delay) return false;
last_connect = time();
const sock = new Socket();
sock.nonblocking = true;
log(LOG_INFO, 'Connecting to ' + host + ':' + port);
if (!sock.connect(host, port, settings.timeout)) return false;
if (ssl)
sock.ssl_session=true;
if (ssl && port !== 5001)
log(LOG_INFO, "If SSL is true then you probably want port 5001");
if (!ssl && port !== 5000)
log(LOG_INFO, "You probably want port 5000 if not using SSL");
const platform = format(
'SYNCHRONET/%s_%s/%s',
system.platform, system.architecture, PROTOCOL_VERSION
......@@ -242,7 +253,7 @@ function main() {
yield();
if (!mrc_sock || !mrc_sock.is_connected) {
mrc_sock = mrc_connect(settings.server, settings.port);
mrc_sock = mrc_connect(settings.server, settings.port, settings.ssl);
continue;
}
mswait(10);
......
......@@ -4,7 +4,9 @@ echicken -at- bbs.electronicchicken.com
1) Quick Start
2) Client -> Server -> Server
3) Customization
4) Support
4) MRC Stats
5) SSL Support
6) Support
1) Quick Start
......@@ -76,6 +78,9 @@ mrc-client.ini:
have a good reason for changing it.
- The values in the [startup] section determine which room the client joins
on startup, and whether the Message of the Day and banners are displayed.
- Change show_nicks in the [client] section to always display the nick list
when connecting to the MRC server.
4) MRC Stats
......@@ -96,7 +101,22 @@ rename it "chat_sec.js", in order to add M as a valid menu option for
Multi-Relay Chat.
4) Support
5) SSL Support
If you would like connections between your server and the MRC server to be
secure, you can enable SSL as follows:
edit mrc-connector.ini and make these changes in the upper global section:
change port from 5000 to 5001
add ssl=true
Then recycle services with touch /sbbs/ctrl/services.recycle or use your windows
control panel. Client to local server connections are not yet encrypted but that
shouldn't be difficult. Once connected to MRC you can type /BBSES and you should
see "Yes" next to your BBS in the SSL column.
6) Support
- Post a message to 'echicken' in the Synchronet Sysops area on DOVE-Net
- Find me on irc.synchro.net in #synchronet
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment