# appnet.link-controller

> AppNet.link protocol controller service for node.js

Latest version **4.1.2** (published 2020-05-12) · 0 weekly downloads

## Install

```sh
npm install appnet.link-controller
pnpm add appnet.link-controller
yarn add appnet.link-controller
bun add appnet.link-controller
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 4.1.2 |
| Published | 2020-05-12 |
| First published | 2020-05-09 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.8.0 |
| Dependencies | 14 |
| Unpacked size | 449.3 KB |
| Known vulnerabilities | 0 (+11 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Tom Zhou |
| Maintainers | iwebpp |

## Links

- npm: https://www.npmjs.com/package/appnet.link-controller
- Repository: https://github.com/InstantWebP2P/appnet.link-controller
- Homepage: https://github.com/InstantWebP2P/appnet.link-controller#readme
- Issues: https://github.com/InstantWebP2P/appnet.link-controller/issues
- npm.io page: https://npm.io/package/appnet.link-controller

## Dependencies (14)

- [uuid](https://npm.io/package/uuid.md) 8.0.0
- [wspp](https://npm.io/package/wspp.md) latest
- [debug](https://npm.io/package/debug.md) 4.1.0
- [lodash](https://npm.io/package/lodash.md) 4.17.5
- [connect](https://npm.io/package/connect.md) 3.7.0
- [neo4jv1](https://npm.io/package/neo4jv1.md) 1.1.6
- [siphash](https://npm.io/package/siphash.md) 1.1.0
- [ipaddr.js](https://npm.io/package/ipaddr.js.md) 1.9.1
- [geoip-lite](https://npm.io/package/geoip-lite.md) 1.4.1
- [msgpack-js](https://npm.io/package/msgpack-js.md) 0.3.0
- [appnet.link](https://npm.io/package/appnet.link.md) latest
- [httpp-proxy](https://npm.io/package/httpp-proxy.md) latest
- [ssl-root-cas](https://npm.io/package/ssl-root-cas.md) 1.3.1
- [connect-httpp](https://npm.io/package/connect-httpp.md) latest

## Recent versions

- 4.1.2 (latest) — 2020-05-12
- 4.1.1 — 2020-05-09
- 4.1.0 — 2020-05-09

## README

# appnet.link-controller
AppNet.Link controller serivices to support [AppNet.link protocol](https://github.com/InstantWebP2P/appnet.link)


### Prerequest

* Build Neo4j 2.1.8 on Linux with Docker, then start Neo4j services

      ./neo4jpkg

* Copy Neo4j packages out of Docker image to local

      ./neo4jpkg cp -rf /tmp/*.tar* .

 
### Install

* appnet.link-controller depends on node-httpp, please build it from repo [node-httpp](https://github.com/InstantWebP2P/node-httpp.git)

* clone this repo and install dependency modules

      npm i

* generate SSL certs once for your own Domain Name, like

    ` ./tools/genSrvKey.bash 51dese.com `

* start controller services

    ` ~/node-httpp/node ./bin/srv.js `

* now ready to serve [appnet.link client](https://github.com/InstantWebP2P/appnet.link)


#### Install on Linux with Docker

* Build node-httpp docker images, refer to [node-httpp](https://github.com/InstantWebP2P/node-httpp)

* Clone this repo

* Install dependency modules

      ./appbld npm i
      
* Generate SSL certs once for your own Domain Name, like

      ./appbld ./tools/genSrvKey.bash 51dese.com
      
* Packaging and start services
      
      ./apppkg 

      Start services ...
      name-server-0 listen on udp port 51686
      name-server-1 listen on udp port 51868
      agent-server listen on udp port 51866
      httpp proxy-server listen on udp port 51688
      http proxy-server listen on tcp port 51688

* Testing service if start successfully

      ./apppkg node tests/connection.js 
  
      node tests/connection.js ...
      connecting to alternative name-server successfully
      connecting to primary name-server successfully


### Code structure

```js

* sdp.js                 - Session Desription implementation
* stun.js                - STUN protcol implementation
* turn.js                - TURN protocl implementation
* db/sdp.js.             - Session data model persistent in GraphDB
* vurl.js.               - Virtual URL implementation

* appnet.link-server.js    - AppNet.link protocol controller implementation
* appnet.link-server-v2.js - AppNet.link protocol controller V2 implementation using SecureWebsocket and NaclCert

* ssl.js                 - SSL/RSA certs generate utils
* demos/                 - demos
* ca-certs               - your own Root CA certs
* certs                  - dynamical generated SSL/RSA certs for connections
* routepath.js           - pure JS tracerouter implementation using UDP/TTL probe. TBD

```
    
### More demos:

    Look on demos/


### TODO:

* User authentication
* Domain authorization
* Improve documents, Protocol Spec, RFC draft


### Support us

* Welcome contributing on document, codes, tests and issues


### License

(The MIT License)

Copyright (c) 2012-present Tom Zhou(appnet.link@gmail.com)

---
_Source: https://npm.io/package/appnet.link-controller · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
