yariplus / nodebb-plugin-camo Goto Github PK
View Code? Open in Web Editor NEWRoute NodeBB images through camo
License: MIT License
Route NodeBB images through camo
License: MIT License
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.
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.
We are already in a node environment.
Is there any reason we wouldn't want to just fork() a camo server as an option?
Your plugin appears to be loading javascript contents at runtime from cdn.jsdelivr.net
.
This is very bad because:
.. 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)
Proxying an image that is already https doesn't actually work. I have no clue why.
Has many issues with running in NodeBB 1.5 or higher versions of node.
I don't really know how to do this, but it's something I want for all my plugins eventually.
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.