I
I
Ivan_korolev2015-07-02 03:08:25
Node.js
Ivan_korolev, 2015-07-02 03:08:25

Is it possible in node.js to encrypt the source code?

I thought about how realistic it is to write enterprise applications on node.js
The task is not to secure the application. And in order not to impoverish the developer due to the availability of his source code.
Here's what first came to mind:
1. Write the most valuable in the form of modules under node.js in C ++;
2. Write a converter that converts the source code into a non-human form - it tries to fit everything into one line, give random names to variables and functions, and other difficulties.
How else can you make life difficult for third-party developers?
I found this interesting thing:
jxcore.com/docs/jxcore-feature-packaging-code-prot...

Answer the question

In order to leave comments, you need to log in

5 answer(s)
Y
Yuri Puzynya, 2015-07-03
@3y3

Well, I can offer you an approximate way.
1. We write a C++ addon that will encrypt and decrypt js files with a given key.
2. Add a new extension to require.extensions. For example encjs:

var decrypt = require('my_addon').decryptor('private-key');
require.extensions['encjs'] = function (m, filename) {
    m._compile(decrypt(filename), filename);
};

We develop an application in js, we give encjs to end users.

T
Timur Shemsedinov, 2015-07-02
@MarcusAurelius

In order for the application to be supported only by you, there is a much more reliable way, come up with as many abstractions as possible and use more patterns, and even better - make your own framework, this is the most reliable, and let someone figure it out.

I
index0h, 2015-07-02
@index0h

This is silly. There was an article on Habré Your code is of no interest to anyone , alas, this is true. Those who want to get it at any cost will come to the DC with a warrant to search your servers.
The value is not in the code, but in the tasks that it solves in a specific project, a specific infrastructure, a specific company. As an example: I think almost everyone has a copy of the projects with which he worked. Of course, there are exceptions, but in 99% of cases this code remains only a small reference in the style of "hmm, I've already solved such a problem somewhere .. I'll see how .." get - it's just a thought that needs to be written down in the context of a new project.
Don't worry, write your first 100k lines - you will understand that this makes no sense))

D
D', 2015-07-02
@Denormalization

1) And nullify all the convenience of developing on nodejs
2) jsbeautifier and all the work - zilch.
Why invent problems for yourself and look for ways to bypass them? What kind of self-torture is that?

A
Alexander Taratin, 2015-07-02
@Taraflex

And what then is the point of using nodejs if the source cannot be changed?
Take vibed.org

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question