Menu

Tree [7172be] master /
 History

HTTPS access


File Date Author Commit
 natural 2016-12-09 Alejandro Linarez Rangel Alejandro Linarez Rangel [7172be] Added NFileOpen
 node_modules 2016-12-09 Alejandro Linarez Rangel Alejandro Linarez Rangel [7172be] Added NFileOpen
 private 2016-12-09 Alejandro Linarez Rangel Alejandro Linarez Rangel [7172be] Added NFileOpen
 public 2016-12-09 Alejandro Linarez Rangel Alejandro Linarez Rangel [b2c249] Added user screen
 servercore 2016-12-09 Alejandro Linarez Rangel Alejandro Linarez Rangel [7172be] Added NFileOpen
 .gitignore 2016-08-15 Alejandro Linarez Rangel Alejandro Linarez Rangel [82b3e3] Change gitignore
 LICENSE 2016-11-29 Alejandro Linarez Rangel Alejandro Linarez Rangel [5bf543] Added Readme
 README.md 2016-12-06 Alejandro Linarez Rangel Alejandro Linarez Rangel [b09930] Fixed bug in the combobox widget
 index.js 2016-12-09 Alejandro Linarez Rangel Alejandro Linarez Rangel [b2c249] Added user screen
 package.json 2016-12-01 Alejandro Linarez Rangel Alejandro Linarez Rangel [680d55] Now uses serve-favicon instead of link tags

Read Me

Node Natural - Remote Web Desktop for embed systems

Note: This program is in development, some features can not be implemented

Node Natural (for differenciating with CNatural, the version written in C)
is a remote web desktop for embed systems written using JavaScript and NodeJS.

It's API provides you a simple way for design remote control apps, you can
have a secure, bidirectional comunication with the server using
socket.io and authentication with JSON tokens. Nothing in the
system uses eval or the DOM innerHTML-like functions, it runs using
CSP (Content Security Policy) and multiples users can use the system
at the same time.

Changing language

  • Open the natural/config.json JSON file with a text editor
  • Go to the last line
  • Where is "locale": "es" replace "es" with the selected language

For now, Natural only supports es for spanish and en for english.

Adding new languages

Go to the file private/pure/locale.js and copy any of the existing languages
(are inside the JSON-like JavaScript map, identified with it's codename es or en)
and edit the inner messages:

var PureLocaleStrings = {
    ...
    ...

    "my-awesome-lang": {
        ...
        ...

        "closesession": "My close-session button message"

        ...
        ...
    }

    ...
    ...
};

If your desktop environment is not Pure, edit your DE locale.js file instead.

You can send the new language as a pull request.

How It Works

Start

The server needs to run as a superuser, but the connected users will not have
any of the permissions of the server because the server handles each user
in base of it system permissions.

sudo npm start
# or
su root -c "npm start"

Security

When a user tries to connect, the server reads the file /etc/passwd and
/etc/shadow (without decrypt them) and if the user exists and the
password matches, generates a unique authentication token.

The token have the form:

SHA256.Crypt(iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiissssseeeeettttttttttttttt)

Where:

  • i is a generated user ID.
  • s and e are random bytes.
  • t is a timestamp.

One copy of the token it's saved on the server and one copy is sended to
the client. At each request, the client needs to send the token via
socket.io: if the two tokens matches: the user can made the request.

All of this work it's realized on the server, the client have a pseudocode
like:

global token = ""

function receive_token(socket)
{
    socket.on("token", function(tk)
    {
        token = tk;
    });
}

function made_request(socket, request, arguments)
{
    socket.emit("client", {
        "request": request,
        "params": arguments,
        "token": global token
    });
}

FrontEnd

The frontend uses Generation.

HTTPS

The server not have HTTPS activated by default, but you can enable it
with the NodeJS HTTPS builtin library.

Contributing

Natural requires new APIs, applications and some other features, if you are
interesed in contributing with Natural, add your feature (or correct something),
made a pull request and add your name in the contributors section of this
file.

Author and contributors

  • Alejandro Linarez Rangel @alinarezrangel

Add your name here with after doing a contribution

License

Node Natural (or Natural, for short) is licensed under the Apache 2.0
license. See the LICENSE file.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.