freenode / jbnc Goto Github PK
View Code? Open in Web Editor NEWIRC Bouncer with no registration/setup required written in nodejs with support for separate client buffers and always-on.
License: MIT License
IRC Bouncer with no registration/setup required written in nodejs with support for separate client buffers and always-on.
License: MIT License
Confirmed
from webchat (webirc) -> jbnc (webirc) -> server | jbnc isn't getting the right IP address that the webirc client is forwarding, maybe it's just taking the connection thats connected to it?
can we get JBNC to listen for a webirc command and if its pass matches what its suppose to forward to the server (from jbnc.com), accept the IP its given, hash it and forward that IP to the ircd?
webchat ips all get the same localhost ip and hash of that localip, but clients connecting directly to j.bnc 9998 passwordhere/x get their right ip's forwarded
forwarded / hashed
it should be webchat (webirc command) -> jbnc (convert webirc ipa/hostname from webchat to hash) -> webirc command -> ircd
Why the reconnection is not done with irc-framework ?
older bugs dont crash though, but /joining #x:x or anything with a : in it causes jbnc to act differently; won't send your JOIN when you connect/join - still forwards you messages though
[REQUEST] For binding to certain IP addresses on multi-homed boxes. Currently listens on all available IP addresses
1609615417 # Serious problem (uncaughtException) - this should not happen but the JBNC is still running. TypeError: Cannot read property 'replace' of undefined
at TLSSocket. (/home/debian/node/jbnc/bouncer.js:1054:51)
at TLSSocket.emit (events.js:315:20)
at addChunk (_stream_readable.js:295:12)
at readableAddChunk (_stream_readable.js:271:9)
at TLSSocket.Readable.push (_stream_readable.js:212:10)
at TLSWrap.onStreamRead (internal/stream_base_commons.js:186:23)
I warn that there is this bug. I don't prefer to correct this error myself, I'm afraid of breaking other things.
Line error replace undefined: https://github.com/toc-irc/jbnc/blob/master/bouncer.js#L1054
it works fine in weechat, but if i use Xchat or irssi, it doesnt display things to their windows, everything goes to the status window in raw format. (poison did a temporary work around, not sure what exactly but creates a timestamp issue with offline msgs using the work around which is better then not working in the other clients), i believed it also work in thelounge properly besides weechat but can't remember for sure
https://irc.dns.live enter a name/pass and connect
status window shows dozens of:
17:21 []
17:21 []
17:22 []
17:22 []
17:23 []
17:23 []
17:24 []
17:24 []
17:25 []
17:25 []
17:26 []
17:26 []
17:27 []
17:27 []
<PONG :1590610386048.jbnc
<JOIN #bitcoin/6:6)!
:mrinfinity![email protected] JOIN #bitcoin/6:6)!
:irc.t60group.org MODE #bitcoin/6:6)! +Cnst
:irc.t60group.org 353 mrinfinity @ #bitcoin/6:6)! :@MrInfinity![email protected]
/home/ircd/jbnc/bouncer.js:1097
this.channels[_channel].userhosts.push(_names[x].trim().split("!")[1]);
^
TypeError: Cannot read property 'push' of undefined
at Socket. (/home/ircd/jbnc/bouncer.js:1097:53)
at Socket.emit (events.js:315:20)
at addChunk (_stream_readable.js:302:12)
at readableAddChunk (_stream_readable.js:278:9)
at Socket.Readable.push (_stream_readable.js:217:10)
at TCP.onStreamRead (internal/stream_base_commons.js:186:23
https://kiwiirc.com/nextclient/ connected to irc.dns.live +9998 with password: shanetest
webirc is set in both ircd hybrid conf (ircd.conf) and jbnc.conf
messages come in twice
and hostname for client is name!hash(fromkiwi)@localhost
jbnc.conf:
{
"mode":"gateway",
"bouncerPassword":"",
"serverPort":"6667",
"server":"127.0.0.1",
"webircPassword":"",
"bouncerPort":8888,
"bouncerAdmin":"",
"bouncerTimeout":1209600,
"debug":false
}
/home/ircd/jbnc
Finally there is a real problem with the away as indicated on #47
I've been investigating this for several weeks.
In reality there was this anti flood problem on the away side IRC server with unrealircd.conf, but there is still another bug, here is how to reproduce it (in production mode, it has not been tested):
problem line 593 : https://github.com/toc-irc/jbnc/blob/master/bouncer.js#L593
I've noticed a problem for a week or two.
From time to time he does not go /away.
Currently I don't see how to fix this.
Here are the symptoms:
in mIRC in every channel I see:
12:12pm * mrinfinity sets mode:
in Webchat I see:
12:12 *** mrinfinity (mrinfinity@291fe5) has joined the channel
12:12 *** Channel mode is +
12:12 *** The topic is: <#netops> NETWORK ops channel for IRCops that lead their communities. Paving a decentralized foundation for the * | sysadmin doc: https://docs.google.com/document/d/1m6rZE5zMQkjJVksgAyb67WgNgYIb01H5f-cGnaqoPb0/edit?usp=sharing
12:12 *** Topic set by mrinfinity on 15 April 2020, 21:32:58
12:12 *** Channel mode is +nst
Node the channel mode is + line
https://github.com/toc-irc/jbnc/blob/master/bouncer.js#L355
Between line 354 and 355 I added this:
case 'CHANNELS':
for (key in connections[this.hash].channels) {
if (connections[this.hash].channels.hasOwnProperty(key)) {
this.write(":*jbnc NOTICE * :Salon actif: "+connections[this.hash].channels[key].name+"\n");
}
}
this.write(":*jbnc NOTICE * :Fin des salons actifs\n");
break;
Then to reproduce the undefined bug you have to do this manipulation:
:*jbnc NOTICE * :Salon actif: #15-25ans
:*jbnc NOTICE * :Salon actif: #adultes
:*jbnc NOTICE * :Salon actif: undefined
:*jbnc NOTICE * :Fin des salons actifs
How to solve this problem at the level of JBNC?
The bug occurs here:
https://github.com/toc-irc/jbnc/blob/master/bouncer.js#L1134
or elsewhere.
Just playing around with our new server, and when I typed just /join
I crashed my entire setup. I'll look into submitting a PR for this tomorrow morning - getting a bit too late here to figure out how to stop this. I'm guessing this will be related to the other issues w/ jbnc crashing due to channel names so hopefully this can be fixed relatively across the board.
/home/ircd/thelounge/src/models/network.js:455
name = name.toLowerCase();
^
TypeError: Cannot read property 'toLowerCase' of undefined
at Network.getChannel (/home/ircd/thelounge/src/models/network.js:455:14)
at IrcClient.<anonymous> (/home/ircd/thelounge/src/plugins/irc-events/join.js:11:22)
at IrcClient.emit (/home/ircd/thelounge/node_modules/eventemitter3/index.js:129:35)
at /home/ircd/thelounge/node_modules/irc-framework/src/client.js:223:24
at next (/home/ircd/thelounge/node_modules/middleware-handler/index.js:42:18)
at MiddlewareHandler.handle (/home/ircd/thelounge/node_modules/middleware-handler/index.js:64:3)
at IrcCommandHandler.<anonymous> (/home/ircd/thelounge/node_modules/irc-framework/src/client.js:217:38)
at IrcCommandHandler.emit (/home/ircd/thelounge/node_modules/eventemitter3/index.js:130:35)
at IrcCommandHandler.emit (/home/ircd/thelounge/node_modules/irc-framework/src/commands/handler.js:90:27)
at Array.JOIN (/home/ircd/thelounge/node_modules/irc-framework/src/commands/handlers/channel.js:191:17)
Error: read ECONNRESET
at TCP.onStreamRead (internal/stream_base_commons.js:207:27) {
errno: -104,
code: 'ECONNRESET',
syscall: 'read'
}
2 errors detected in November 2020 on the current Jbnc version
Error 1:
TypeError: Cannot read property 'indexOf' of undefined
at TLSSocket. (/home/debian/node/jbnc/bouncer.js:1007:90)
at TLSSocket.emit (events.js:315:20)
at addChunk (_stream_readable.js:295:12)
at readableAddChunk (_stream_readable.js:271:9)
at TLSSocket.Readable.push (_stream_readable.js:212:10)
at TLSWrap.onStreamRead (internal/stream_base_commons.js:186:23)
Line 1007 : https://github.com/toc-irc/jbnc/blob/master/bouncer.js#L1007
if(_mode_target[_mode_count]!=this.nick && curchan.aov.indexOf(_this_target)<0 && this.opmode) {
Errror 2 :
Another error on line 982
TypeError: Cannot read property 'indexOf' of undefined
at TLSSocket. (/home/debian/node/jbnc/bouncer.js:982:90)
Line 982 : https://github.com/toc-irc/jbnc/blob/master/bouncer.js#L982
if(_mode_target[_mode_count]!=this.nick && curchan.aop.indexOf(_this_target)<0 && this.opmode) {
I don't even know how to fix it actually
<MODE #music
:irc.t60group.org 324 mrinfinity #music +ntl 99
:irc.t60group.org 329 mrinfinity #music 1590542373
PING :1590610609091.jbnc
<PONG :1590610609091.jbnc
<PART #music
PING :1590610619094.jbnc
<PONG :1590610619094.jbnc
:hacktioneer![email protected] PRIVMSG #handshake-live :hs1quw3cv4a5qdtfeaqxs0xx3c87hcr5hmwkc0ehef REVEALED a BID of 10 HNS ($1.44) for barnaul
:hacktioneer![email protected] PRIVMSG #handshake-live :hs1q6t9f2nquqquvm07s7zwpgljfeyzt0en79n5apx REVEALED a BID of 1 HNS ($0.14) for barnaul
:hacktioneer![email protected] PRIVMSG #handshake-live :hs1qk5ntrketn3lc99fw0mrnah7ksrdlaycd45mpxd REVEALED a BID of 0 HNS ($0.00) for barnaul
:hacktioneer![email protected] PRIVMSG #handshake-live :hs1qkynuh97epg29hflhefms2tt3yhdfcvp6x76e33 REVEALED a BID of 5.00499 HNS ($0.72) for barnaul
<MODE #music
:irc.t60group.org 324 mrinfinity #music +ntl
/home/ircd/jbnc/bouncer.js:889
curchan.limit=_mode_target[_mode_count];
^
TypeError: Cannot set property 'limit' of undefined
at Socket. (/home/ircd/jbnc/bouncer.js:889:40)
at Socket.emit (events.js:315:20)
at addChunk (_stream_readable.js:302:12)
at readableAddChunk (_stream_readable.js:278:9)
at Socket.Readable.push (_stream_readable.js:217:10)
at TCP.onStreamRead (internal/stream_base_commons.js:186:23)
my irc client sees:
-> irc.t60group.org MODE #music
<- :irc.t60group.org 324 mrinfinity #music +ntl 99
<- :irc.t60group.org 329 mrinfinity #music 1590542373
when I'm in the channel and /mode normally
add autohash feature in webirc so jbnc can pass a secure hash of a hostname/ip-address to a server for total anonymity
so instead of !@some-ip.ip-t.country.isp.com
md5 of some-ip.ip-t.country.isp.com = 50f96456b50f5154835588baedce1581
sha256 is pretty long
Hi
I just noticed that I had several users who put the "/" character in their password. This one is not accepted in JBNC
df9260cxxxxxxxxxxxxxxxxxxxx||PassWord//irc.site.com:+6697||df9xxxxxxxxxxxxxxxecxxxxxxx/mobile/mozart
Just imagine that the password is: PassWord/
Should we change the args "/" in JBNC to put another character? If so which one should I put?
Here is the "undefined" error in the second line:
[20:59:23] <-Monitor-> {[nickUserjbnc]} NAMES #jeuxvideos
[20:59:23] <-Monitor-> {[nickUserjbnc]} NAMES undefined
[20:59:23] <-Monitor-> {[nickUserjbnc]} NAMES #quebec
[21:03:32] <-Monitor-> {[nickUserjbnc]} AWAY away
A channel was improperly removed from an array or something.
There is no error log in the console.
I could not solve.
Hi
I tested Jbnc today, it is super and fast and very light.
However, the correct timestamps for messages with "message-tags" are missing. Can you add it?
if(lines[n].trim().indexOf("multi-prefix")>=0) {
this.write("CAP REQ :multi-prefix\n");
}
if(lines[n].trim().indexOf("message-tags")>=0) {
this.write("CAP REQ :message-tags\n");
}
if(lines[n].trim().indexOf("userhost-in-names")>=0) {
this.write("CAP REQ :userhost-in-names\n");
this.userhostInNames=true;
}
I tried to add but does not work, there is a crash, at the line
this.channels[_channel].userhosts.push(_names[x].trim().split("!")[1]);
^
TypeError: Cannot read property 'push' of undefined
Salutations
:MRNFN80!~MRNFN80@jbnc/f52876 JOIN #t:tt
<MODE #t:tt
:irc.t60group.org MODE #t:tt +Cnst
:irc.t60group.org 353 MRNFN80 @ #t:tt :@MRNFN80!~MRNFN80@jbnc/f52876
/home/mrinfinity/jbnc/bouncer.js:1097
this.channels[_channel].userhosts.push(_names[x].trim().split("!")[1]);
^
TypeError: Cannot read property 'push' of undefined
at Socket. (/home/mrinfinity/jbnc/bouncer.js:1097:53)
at Socket.emit (events.js:315:20)
at addChunk (_stream_readable.js:302:12)
at readableAddChunk (_stream_readable.js:278:9)
at Socket.Readable.push (_stream_readable.js:217:10)
at TCP.onStreamRead (internal/stream_base_commons.js:186:23)
sorry just creating issues as i try to fix them ;/
Reload tls certificates from file system when HUP signal received.
[FEAT REQUEST] auto-op/voice clients when they're opped/voiced, remove when they're deopped/devoice
so if anybody / somebody ops, halfops, or voices somebody it adds their *!ident@fullhostname to auto-op
if somebody deoped / devoices / dehalfops them then any masks involving that target usser is removed for that mode
If you try to connect and your nickname and altnickname are taken, but don't /nick to-something-else, IRCD sends you a registration timeout, but upon connecting you reconnect to a jbnc session of the first nick trying to connect with (even if it was taken) with no connection from jbnc->server. As listed below. Also if you get klined and try to reconnect (auto or not), you connect back to a jbnc session which isn't connected to the ircd (because it can't) - maybe treat same way as being /killed (unsure)
(Cannot send commands) only /jbnc
Hi
On JBNC there is all this currently:
if(data[1]=="CAP") {
if(data[3] && data[3]=='LS') {
if(lines[n].trim().indexOf("cap-notify")>=0) {
this.write("CAP REQ :cap-notify\n");
}
if(lines[n].trim().indexOf("away-notify")>=0) {
this.write("CAP REQ :away-notify\n");
}
if(lines[n].trim().indexOf("invite-notify")>=0) {
this.write("CAP REQ :invite-notify\n");
}
if(lines[n].trim().indexOf("extended-join")>=0) {
this.write("CAP REQ :extended-join\n");
}
if(lines[n].trim().indexOf("userhost-in-names")>=0) {
this.write("CAP REQ :userhost-in-names\n");
this.userhostInNames=true;
}
if(lines[n].trim().indexOf("multi-prefix")>=0) {
this.write("CAP REQ :multi-prefix\n");
}
if(lines[n].trim().indexOf("account-notify")>=0) {
this.write("CAP REQ :account-notify\n");
}
if(lines[n].trim().indexOf("message-tags")>=0) {
this.write("CAP REQ :message-tags\n");
this.messagetags=true;
}
if(lines[n].trim().indexOf("account-tag")>=0) {
this.write("CAP REQ :account-tag\n");
}
if(this.messagetags && lines[n].trim().indexOf("server-time")>=0) {
this.write("CAP REQ :server-time\n");
}
if(lines[n].trim().indexOf("sasl")>=0) {
this.write("CAP REQ :sasl\n");
this.sasl=true;
}
if (!this.sasl)
this.write("CAP END\n");
}
else if(this.sasl && data[3] && data[3]=='ACK') {
if(lines[n].trim().indexOf("sasl")>=0) {
this.write("AUTHENTICATE :PLAIN\n");
}
}
else {
if (!this.sasl)
this.write("CAP END\n");
}
continue;
}
I found a problem here:
https://github.com/kiwiirc/irc-framework/blob/469cbe7b2129ddae0328a7efe91eb218257e98ff/src/commands/handlers/channel.js#L218
handler.network.cap.isEnabled('extended-join')
this line always returns "false"
even for this one (the line 226):
data.gecos = command.params[gecos_idx] || '';
which can be tested for debug with:
data.gecos = command.params[gecos_idx]+" - test:"+handler.network.cap.isEnabled('sasl') || '';
it returns false all the time, when it should return true
It should be noted that jbnc recognizes well that it is connected by sasl, and it also detects the raws of the "extended-join" but on ircframework it always detects false for the "isEnabled", the problem could come from where ? Jbnc or irc-framework?
Something must be missing but i don't know where
also on you can remove the "if" https://github.com/kiwiirc/irc-framework/blob/469cbe7b2129ddae0328a7efe91eb218257e98ff/src/commands/handlers/channel.js#L218 like this:
//if (handler.network.cap.isEnabled('extended-join')) {
data.account = command.params[1] === '*' ? false : command.params[1];
gecos_idx = 2;
//}
and there the "data.gecos" works well, it is displayed correctly, the problem comes from the "handler.network.cap.isEnabled" which detects no active cap
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.