npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

remocon

v0.29.0

Published

remote-signal server and client.

Downloads

55

Readme

remocon ( remote-signal console )

NOTICE

The package name has been changed to iosignal-cli. Please use the new library name.

new github: iosignal-cli

new npmjs: iosignal-cli

supports

Windows, Mac, and Linux.

install

Linux, Mac and shell

$ sudo npm install -g remocon
# global install.

windows as root permission

$ npm install -g remocon
# global install.

remote-signal server

$ remote-server # or  use 'remocons'  alias
# start server with default option.
# default. open port 7777 with WebSocket. 


$ remote-server -l 5555 
# you can specify listen port number

remote-signal client

$ remote # or remocon alias
# connect to localhost:7777 with websocket.

# use -c to define websocket url and port number.
$ remote -c wss://websocket_server_url:port
$ remote -c ws://localhost:7777

# support ws or wss(TLS).

remote-signal commands

  • subscribe('tag')
  • publish('tag', message )
  • signal('tag', message ) // same with publish
  • not ready whole document.

tutorial

signaling

  • multi-cast: publish/subscribe channel_name
  • uni-cast: use cid(communication id)
  1. start server
$ remote-server
# or same alias
$ remocons 
  1. start client A.
$ remote
Connecting to ws://localhost:7777
ready:  cid: ?c3Nr 
# connected and receive client cid.
# CID(Communicaion Id of the remote client.)

> .subscribe channel_name  
# subscribe some channel
  1. start client B.
$ remote
Connecting to ws://localhost:7777
ready:  cid: ?rr75
> 
# connected and received cid.

# multicast.
> .signal channel_name some_message   

# unicast to A.
> .signal ?c3Nr@ direct_message  
# IMPORTANT. 
# unicast signal tag must include '@' charactor.  tag = 'cid' + @

authentication

type1. auth data from file.

  • for personal use only
  • raw plain password string. (Not Hashed)
  • each device have 4 values: deviceId, deviceKey, deviceCId, level
  • you can find sample auth_file.mjs and auth_file.json in root folder.
$ remote-server -d auth_file.json
   or
$ remote-server -d auth_file.mjs

auth_file.json structure

  • deviceId string size limit: 8 charactors.
  • No passphrase string limit. (It will be digested 32bytes with sha256.)
  • CID string size limit: current 20 chars. can be changed.
  • JSON file does not support comment.
[
  ["id","key","cid",0],
  ["did2","did2key","did2-cid",0],
  ["uno3","uno3-key","uno3-cid",1]
]

auth_file.mjs

  • support comments.
// *.mjs file support comments.
export const authInfo = [
  // device id, key, communication id, level:Number(0~255)
  ["did","passowrd","cid",0],  
  ["device1","device1_key","device1_cid",0],
  ["root","root-key","root-cid",255],  // default admin_root level is 255
  ["uno","uno-key","uno",1]
]

type2. auth data from Redis(or other DataBase)

  • Recommended
  • you can find source and examples here.
    • remote-siganl "/src/auth/"
    • remocon "/test_auth_redis/"

Before running the server, you need to make sure that your Redis server is up and running and that you have registered your device credentials. A simple credentials enrollment example is included in the source above.

start server with local redis-auth-system

$ remote-server -r   //  redis://localhost:6379

auth client

  1. start auth server.
  2. connect and login
$ remote
ready:  cid: ?YXDr
> .login uno3 uno3-key
try manual login:  uno3
> >> QUOTA_LEVEL :  1
current quota: {"signalSize":255,"publishCounter":10,"trafficRate":100000}
ready:  cid: uno3-cid
 
# now device have (pre-registered) CID.

Support for both web browsers and Arduino

Specifying two types of ports

RemoteSignal uses websockets for web browser peer connections. If you want to use an Arduino connection, you must specify the use of the CongSocket port using the -L option.

The -l option specifies the Websocket port, and the -L option specifies the CongSocket port for the Arduino.


$ remote-server -l 7777 -L 8888
# -l option for WebSocket port
# -L option for CongSocket port ( Arduino connection)