Browse Source

update windows instructions and error message

pull/8/head
AJ ONeal 6 years ago
parent
commit
b03717c312
  1. 8
      README.md
  2. 4
      examples/telebit.full.yml
  3. 7
      examples/telebit.minimal.yml
  4. 8
      lib/sorting-hat.js

8
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

4
examples/telebit.yml → 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

7
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

8
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

Loading…
Cancel
Save