JSPM

remote-ws-wol

0.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q18549F
  • License MIT

To start the PC, for example, smartphone. Remote switch to Wake on LAN to a PC via WebSocket.

Package Exports

  • remote-ws-wol

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (remote-ws-wol) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

remote-ws-wol

To start the PC, for example, smartphone. Remote switch to Wake on LAN to a PC via WebSocket.

@see スマホでPC起動するリモコンをWebSocket+WOLで作ってみた http://ngw.jp/~tato/wp/?p=3826


Install

$ cd ./YourDir
$ npm i remote-ws-wol

Server Setting

var rww = require('remote-ws-wol');

//Argument samples for rww. rwwの引数設定サンプル
//   引数はwebに公開される場所には置かないように注意しましょう
//   Argument is let's be careful not place such as in a location that can be published to the web

//WebSocketサーバーの設定
var WebSocketServer = '192.168.1.22';
var WebSocketServerPort = 8503;

//起こしたいマシンのIPとMacアドレスを調べて下記を書き換えてください
var WakeUpLists = {
   '192.168.1.4': 'xx:xx:xx:xx:xx:xx'
  ,'192.168.1.5': 'xx:xx:xx:xx:xx:xx'
};

//※必要ならIPやキーワードやSSL接続などで安全を確保すること

//接続を許可するIPアドレス
var allowIPLists = [
   '*' //'*'は全部許可
];

//命令実行を許可するキーワード
var allowKeyword = "*";//'*'は全部許可

//WakeUpしたら最大1分で接続を切る
var timeout = 1000*60;

//実行
var ws = rww.conn( WebSocketServer, WebSocketServerPort, WakeUpLists, allowIPLists, allowKeyword, timeout );


License

MIT