Closed slava-vishnyakov closed 6 years ago
@slava-vishnyakov - this is similar to #19 by @jfowl, but provides a different way to solve the need (host filtering). I intended to merge #19, but I haven't gotten to that yet because the code changes looked larger than they actually are due to converting tabs to spaces. After reading both, I'm more aligned to your approach.
Side note: I know that my choice of using tabs is totally not aligned with standard Node coding practices... )
Oops, right, haven't noticed tabs :)
Converted my code to tabs to have the same code style.
Yeah, it's totally minor decision - whatever works is good :)
I totally agree with @brozeph, @slava-vishnyakov's approach is way more elegant! Since I was just re-opening the project on my workstation today (due to the Telegram blocking in Russia), I would love to see his changes merged asap.
@jfowl @slava-vishnyakov - I have a few spare moments today to look at this again. I'll merge, touch a few things up to prepare a release and push shortly.
@brozeph Awesome 👍 Thanks!
This adds a
allow_connection
function to options, you can return true or false on whether you want to allow the connection to go through or not.Thanks for the awesome app!