diff --git a/README.md b/README.md index 4cab154..03e8dfc 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,9 @@ Windows & Node.js 1. Install [node.js](https://nodejs.org) 2. Open _Node.js_ 2. Run the command `npm install -g telebit` +2. Copy the example conifg to your user folder `.config/telebit/telebit.yml` (such as `/Users/John/.config/telebit/telebit.yml`) +2. Change the edaim address +2. Run `telebit daemon --config /Users/John/.config/telebit/telebit.yml` **Note**: Use node.js v8.x or v10.x @@ -184,6 +187,11 @@ telebit tcp /module/path # handle all tcp with a node module telebit tcp none 6565 # remove tcp handler from external port 6565 telebit tcp 5050 6565 # forward external port 6565 to local 5050 telebit tcp /module/path 6565 # handle external port 6565 with a node module + +telebit ssh disable # disable ssh access +telebit ssh 22 # port-forward all ssh connections to port 22 + +telebit save # save http and tcp configuration changes ``` ### Using SSH diff --git a/examples/telebit.yml b/examples/telebit.full.yml similarity index 85% rename from examples/telebit.yml rename to examples/telebit.full.yml index 4ff8ac0..b64d689 100644 --- a/examples/telebit.yml +++ b/examples/telebit.full.yml @@ -2,8 +2,8 @@ email: 'jon@example.com' # must be valid (for certificate recovery and se agree_tos: true # agree to the Telebit, Greenlock, and Let's Encrypt TOSes community_member: true # receive infrequent relevant updates telemetry: true # contribute to project telemetric data -relay: wss://telebit.cloud # Which Telebit Relay to use -secret: '' # Shared Secret with Telebit Relay for authorization +relay: telebit.cloud # Which Telebit Relay to use +#secret: '' # Shared Secret with Telebit Relay for authorization #token: '' # Token created by Telebit Relay for authorization ssh_auto: 22 # forward ssh-looking packets, from any connection, to port 22 servernames: # hostnames that direct to the Telebit Relay admin console diff --git a/examples/telebit.minimal.yml b/examples/telebit.minimal.yml new file mode 100644 index 0000000..2e22ea4 --- /dev/null +++ b/examples/telebit.minimal.yml @@ -0,0 +1,7 @@ +email: 'jon@example.com' # must be valid (for certificate recovery and security alerts) +agree_tos: true # agree to the Telebit, Greenlock, and Let's Encrypt TOSes +community_member: true # receive infrequent relevant updates +telemetry: true # contribute to project telemetric data +relay: telebit.cloud # Which Telebit Relay to use +#secret: '' # Shared Secret with Telebit Relay for authorization +#token: '' # Token created by Telebit Relay for authorization diff --git a/lib/sorting-hat.js b/lib/sorting-hat.js index 35bf2f1..82c0b0f 100644 --- a/lib/sorting-hat.js +++ b/lib/sorting-hat.js @@ -217,8 +217,8 @@ module.exports.assign = function (state, tun, cb) { handler = require(path.join(localshare, handlerpath)); console.info("Handling '" + handle + ":" + id + "' with '" + handlerpath + "'"); } catch(e2) { - console.error("Failed to load '" + handlerpath + "':", e1.message); - console.error("Failed to load '" + path.join(localshare, handlerpath) + "':", e2.message); + console.error("Failed to require('" + handlerpath + "'):", e1.message); + console.error("Failed to require('" + path.join(localshare, handlerpath) + "'):", e2.message); console.warn("Using default handler for '" + handle + ":" + id + "'"); echoTcp(cb); } @@ -271,8 +271,8 @@ module.exports.assign = function (state, tun, cb) { handler = require(path.join(localshare, handlerpath)); console.info("Handling '" + handle + ":" + id + "' with '" + handlerpath + "'"); } catch(e2) { - console.error("Failed to load '" + handlerpath + "':", e1.message); - console.error("Failed to load '" + path.join(localshare, handlerpath) + "':", e2.message); + console.error("Failed to require('" + handlerpath + "'):", e1.message); + console.error("Failed to require('" + path.join(localshare, handlerpath) + "'):", e2.message); console.warn("Using default handler for '" + handle + ":" + id + "'"); handler = null; // fallthru