{"_id":"@danhuang-ixia/wstun_reverse_jwt","_rev":"1-291a2a8844fc3c36026d2895358b4910","name":"@danhuang-ixia/wstun_reverse_jwt","dist-tags":{"latest":"1.2.1"},"versions":{"1.2.0":{"name":"@danhuang-ixia/wstun_reverse_jwt","version":"1.2.0","description":"Fork of @mdslab/wstun to add jwt client authentication to reverse tunnels","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","postinstall":"./scripts/postinst"},"dependencies":{"websocket":"<=1.0.28","optimist":"<=0.6.1","node-uuid":"<=1.4.7","under_score":"<=0.1.0","log4js":"<=1.1.1","jsonwebtoken":"<=8.5.1"},"repository":{},"keywords":["tunnel","reverse","WebSocket"],"author":{"name":"Danny Huang","email":"danny.huang@keysight.com"},"contributors":[],"license":"Apache-2.0","homepage":"","bin":{"wstun":"./bin/wstun.js"},"directories":{"doc":"docs","lib":"lib"},"gitHead":"27bf0ed6012220d0c1a91a1ea744f86f3a5041c4","_id":"@danhuang-ixia/wstun_reverse_jwt@1.2.0","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"danhuang-ixia","email":"danny.huang@keysight.com"},"dist":{"integrity":"sha512-M9D8xWa8whwAM2IsAW+FZBlPnLL54q8pga8vaiyCbJPB3fx8G5r3wzVRRL18RmzOgkavsVN5skdlK7IzGtyfTA==","shasum":"01ed8d9d99b0c89f577624038ee929902a084a0e","tarball":"https://registry.npmjs.org/@danhuang-ixia/wstun_reverse_jwt/-/wstun_reverse_jwt-1.2.0.tgz","fileCount":18,"unpackedSize":54630,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqMdopOVaFNencY8/+h4XD/69j1HZZmsfxP+UmLkwxZwIge7wlpqNGJ3L3KAXWczk4EsSRV6OzbQEbxS8pJHs5DpM="}]},"maintainers":[{"name":"danhuang-ixia","email":"danny.huang@keysight.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/wstun_reverse_jwt_1.2.0_1691523384224_0.9544739241742313"},"_hasShrinkwrap":false},"1.2.1":{"name":"@danhuang-ixia/wstun_reverse_jwt","version":"1.2.1","description":"Fork of @mdslab/wstun to add jwt client authentication to reverse tunnels","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1","postinstall":"./scripts/postinst"},"dependencies":{"websocket":"<=1.0.28","optimist":"<=0.6.1","node-uuid":"<=1.4.7","under_score":"<=0.1.0","log4js":"<=1.1.1","jsonwebtoken":"<=8.5.1"},"repository":{},"keywords":["tunnel","reverse","WebSocket"],"author":{"name":"Danny Huang","email":"danny.huang@keysight.com"},"contributors":[],"license":"Apache-2.0","homepage":"","bin":{"wstun":"./bin/wstun.js"},"directories":{"doc":"docs","lib":"lib"},"gitHead":"ef137e8782c4c22a2da877da5157bb100dfdeed6","_id":"@danhuang-ixia/wstun_reverse_jwt@1.2.1","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"danhuang-ixia","email":"danny.huang@keysight.com"},"dist":{"integrity":"sha512-NCTYDW67CMHpHTNlHDlY9s9E/EL3vcT4vNYzGdrKOpJYtQjFdXl3eriUb4Oe6oTqxnZgMlIPnuVpyazobJPjwA==","shasum":"fc4f11b09e4d76273aaa55dd016ea90c58ce72cc","tarball":"https://registry.npmjs.org/@danhuang-ixia/wstun_reverse_jwt/-/wstun_reverse_jwt-1.2.1.tgz","fileCount":18,"unpackedSize":54640,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/1W+TCrn5trt7o8mwxd058ys0uWtMC28cgX6kzGtA2wIgC0cJiIbz8NIi6AH0nHRaIzSXVM7JbJyJefbs/kiV+xU="}]},"maintainers":[{"name":"danhuang-ixia","email":"danny.huang@keysight.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/wstun_reverse_jwt_1.2.1_1692044459108_0.06394573422549965"},"_hasShrinkwrap":false}},"time":{"created":"2023-08-08T19:36:24.097Z","1.2.0":"2023-08-08T19:36:24.486Z","modified":"2023-08-14T20:20:59.715Z","1.2.1":"2023-08-14T20:20:59.516Z"},"maintainers":[{"name":"danhuang-ixia","email":"danny.huang@keysight.com"}],"description":"Fork of @mdslab/wstun to add jwt client authentication to reverse tunnels","keywords":["tunnel","reverse","WebSocket"],"repository":{},"contributors":[],"author":{"name":"Danny Huang","email":"danny.huang@keysight.com"},"license":"Apache-2.0","readme":"# WSTUN - Tunnels and Reverse Tunnels over WebSocket for Node.js\n\n[![npm version](https://badge.fury.io/js/%40mdslab%2Fwstun.svg)](https://badge.fury.io/js/%40mdslab%2Fwstun)\n\n## Overview\n\nA set of Node.js tools to establish TCP tunnels (or TCP reverse tunnels) over WebSocket connections for circumventing the problem of directly connect to hosts behind a strict firewall or without public IP. It also supports WebSocket Secure (wss) connections.\n\n## Installation\n```\nnpm install @mdslab/wstun\n```\n\n## Usage (from a Node.js application)\n\n### Instantiation of a tunnel server \n```JavaScript\nvar wstun = require(\"@mdslab/wstun\");\n\n// without security\nserver = new wstun.server();\n\n// or with security (<PRIVATE-KEY-PATH> and <PUBLIC-KEY-PATH> are the paths of the private and public keys in .pem formats)\nserver = new wstun.server({ssl:true, key:\"<PRIVATE-KEY-PATH>\", cert:\"<PUBLIC-KEY-PATH>\"});\n\n//start the server (<PORT> is the listening port)\nserver.start(<PORT>)\n```\n\n### Implementation of a tunnel client\n```JavaScript\nvar wstun = require(\"@mdslab/wstun\");\n\nclient = new wstun.client();\n\n// without security\nwstunHost = 'ws://wstunServerIP:wstunPort';\n\n// or with security \nwstunHost = 'wss://wstunServerIP:wstunPort';\n\n// <localPort> is the port on the localhost on which the tunneled service will be reachable\n// <remoteHost>:<remotePort> is the endpoint of the service to be tunneled\nclient.start(<localPort>, wstunHost, '<remoteHost>:<remotePort>');\n```\n\n### Instantiation of a reverse tunnel server\n```JavaScript\nvar wstun = require(\"@mdslab/wstun\");\n\n// without security\nreverse_server = new wstun.server_reverse();\n\n// or with security (<PRIVATE-KEY-PATH> and <PUBLIC-KEY-PATH> are the paths of the private and public keys in .pem formats)\nreverse_server = new wstun.server_reverse({ssl:true, key:\"<PRIVATE-KEY-PATH>\", cert:\"<PUBLIC-KEY-PATH>\"});\n\n//start the server (<PORT> is the listening port)\nreverse_server.start(<PORT>);\n\n``` \n### Implementation of a reverse tunnel client\n```JavaScript   \nvar wstun = require(\"reverse-wstunnel\");\n\nreverse_client = new wstun.client_reverse();\n\n// without security\nwstunHost = 'ws://wstunServerIP:wstunPort';\n\n// or with security \nwstunHost = 'wss://wstunServerIP:wstunPort';\n\n// <publicPort> is the port on the reverse tunnel server on which the tunneled service will be reachable\n// <remoteHost>:<remotePort> is the endpoint of the service to be reverse tunneled\nreverse_client.start(<publicPort>, wstunHost, '<remoteHost>:<remotePort>');\n```\n\n## Usage (from command line)\nA command line tool (wstun.js) is also available in the bin directory.\n\nExamples about how to run a tunnel server:\n```\n//without security\n./wstun.js -s 8080\n\n//with security\n./wstun.js -s 8080 --ssl=true --key=\"<PRIVATE-KEY-PATH>\" --cert=\"<PUBLIC-KEY-PATH>\"\n```\nExamples about how to run a tunnel client:\n```\n//without security\n./wstun.js -t 33:2.2.2.2:33 ws://wstunServerIP:8080 \n\n//with security\n./wstun.js -t 33:2.2.2.2:33 wss://wstunServerIP:8080\n```\nIn both examples, connections to localhost:33 on the client will be tunneled to 2.2.2.2:33 through the Websocket connection with the server. Note that the decision about the final destination of the tunnel is up to the client. Alternatively, it is possible to lock the final destination of the tunnel on the server side. \n\nExamples about how to run a tunnel server locking the final tunnel destination: \n```\n//without security \n./wstun.js -s 8080 -t 2.2.2.2:33\n\n//with security\n./wstun.js -s 8080 -t 2.2.2.2:33 --ssl=true --key=\"<PRIVATE-KEY-PATH>\" --cert=\"<PUBLIC-KEY-PATH>\"\n```\nExamples about how to run a tunnel client when the final tunnel destination has been locked by the server:\n```\n//without security\n./wstun.js -t 33 ws://wstunServerIP:8080 \n\n//with security\n./wstun.js -t 33 wss://wstunServerIP:8080\n```\n\nExamples about how to run a reverse tunnel server:\n```\n//without security\n./wstun.js -r -s 8080\n\n//with security\n./wstun.js -r -s 8080 --ssl=true --key=\"<PRIVATE-KEY-PATH>\" --cert=\"<PUBLIC-KEY-PATH>\"\n```\nExamples about how to run a reverse tunnel client:\n```\n//without security\n./wstun.js -r6666:2.2.2.2:33 ws://server:8080\n\n//with security \n./wstun.js -r6666:2.2.2.2:33 wss://server:8080\n```\nIn the above examples, the client asks the server to open a TCP server on port 6666 and all connections on this port are tunneled to the client that is directely connected to 2.2.2.2:33.\n\n\n## Logging system\nWSTUN uses Log4js library to manage its logs in /var/log/wstun/\n","readmeFilename":"readme.md"}