Giter Site home page Giter Site logo

nodebb-plugin-camo's People

Contributors

amargon avatar bdharrington7 avatar gitter-badger avatar lenovouser avatar xseba360 avatar yariplus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nodebb-plugin-camo's Issues

Camo server not loading at all?

nodebb-plugin-camo version: 1.5.1
NodeBB version: 1.14.2 (28970b030d21a9e839804b0c40e0ed1c520502ac)
Node.js version: 12.16.2

Hi @yariplus, I noticed that in recent versions of NBB, this plugin doesn't seem to start. There's nothing in the logs, normally I'd see:

(This was on NodeBB v1.14.0-5)

2020-07-20T16:11:46.578Z [5567/1815] - ^[[32minfo^[[39m: NodeBB is now listening on: 0.0.0.0:5567
2020-07-20T16:11:46.581Z [5567/1815] - ^[[32minfo^[[39m: [CamoProxy]: SSL-Proxy running on 8082 with node:v12.16.2 pid:2170 version:2.3.0.

Then I upgraded to NBB 1.14.2, and the log would just stop at:

2020-07-20T16:23:38.156Z [5567/4989] - ^[[32minfo^[[39m: Enabling 'trust proxy'
2020-07-20T16:23:38.159Z [5567/4989] - ^[[32minfo^[[39m: NodeBB is now listening on: 0.0.0.0:5567

I've tried uninstalling and reinstalling through the ACP, but I get the same result.

camo proxy dies when NBB is reloaded, EADDRINUSE error

Hi, I just noticed that this plugin will crash out when NodeBB is reloaded.

[cluster] Reloading...

3/9 15:54 [21142] - �[32minfo�[39m: [Camo]: Starting CamoProxy...
3/9 15:54 [21142] - �[32minfo�[39m: [CamoProxy]: SSL-Proxy running on 8082 with pid:21357 version:2.3.0.

3/9 15:54 [21142] - �[33mwarn�[39m: [CamoProxy]: events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE :::8082
    at Object.exports._errnoException (util.js:870:11)
    at exports._exceptionWithHostPort (util.js:893:20)
    at Server._listen2 (net.js:1236:14)
...

3/9 15:54 [21142] - �[32minfo�[39m: [Camo]: CamoProxy is dead.

Don't rely on external CDNs

Your plugin appears to be loading javascript contents at runtime from cdn.jsdelivr.net.

This is very bad because:

  • external CDNs can go down
  • external CDNs can get hacked: modules included at runtime from external CDNs won't go through proper cryptographic checks or at least someone verifying the downloaded code hasn't been tampered with if the CDN was hacked or compromised
  • external CDNs can get overloaded and lead to surprising hidden slowdowns that can be challenging to track down

.. and most importantly, because this dependency is not obvious and therefore shouldn't be there. There is no easy way to find out which sort of plethora of CDNs NodeBB and its plugins depends on for proper operation, so if a big forum hoster uses a CDN of their own for NodeBB they can get huge reliability issues even if they take care that their own CDN remains available. Also since you appear to have included this in the plugin settings this will break the admin area, which is not exactly a good area to break. Therefore, the only reliable way is to package things properly at install/packaging time, instead of loading stuff from external sources at runtime.

Edit: a small note: this only happens for me on the plugins settings page for your plugin. If it's not actually originating from your plugin I apologize for the rant, but it's not easy to see where the require.js call actually originates from. (another reason why the world would be better off if people stopped randomly pulling in things from external CDNs)

Add test scripts

I don't really know how to do this, but it's something I want for all my plugins eventually.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.