From f94e01917ef454793b18b86b03f2caab86c99518 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 15 Jun 2018 06:09:46 +0000 Subject: [PATCH 1/2] update example config --- examples/{telebitd.yml => telebit-relay.yml} | 2 ++ 1 file changed, 2 insertions(+) rename examples/{telebitd.yml => telebit-relay.yml} (95%) diff --git a/examples/telebitd.yml b/examples/telebit-relay.yml similarity index 95% rename from examples/telebitd.yml rename to examples/telebit-relay.yml index 239d017..74e83d6 100644 --- a/examples/telebitd.yml +++ b/examples/telebit-relay.yml @@ -2,6 +2,8 @@ email: 'jon@example.com' # must be valid (for certificate recovery and sec 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 +webmin_domain: example.com +shared_domain: xm.pl servernames: # hostnames that direct to the Telebit Relay admin console - telebit.example.com - telebit.example.net From c8c06d1b9989dd201234f2db76b4f2b83324edb3 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 15 Jun 2018 06:13:26 +0000 Subject: [PATCH 2/2] use sharedDomain from config --- lib/relay.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/relay.js b/lib/relay.js index f31fd7c..3760e5f 100644 --- a/lib/relay.js +++ b/lib/relay.js @@ -264,7 +264,7 @@ module.exports.create = function (state) { //token.dynamicPorts.push(serviceport); Devices.add(state.deviceLists, serviceport, token); //var hri = require('human-readable-ids').hri; - //var hrname = hri.random() + '.telebit.cloud'; + //var hrname = hri.random() + '.' + state.config.sharedDomain; //token.dynamicNames.push(hrname); // TODO restrict to authenticated device // TODO pull servername from config @@ -275,8 +275,8 @@ module.exports.create = function (state) { , [ 2 , 'grant' , [ ['ssh+https', token.domains[0], 443 ] - , ['ssh', 'ssh.telebit.cloud', serviceport ] - , ['tcp', 'tcp.telebit.cloud', serviceport] + , ['ssh', 'ssh.' + state.config.sharedDomain, serviceport ] + , ['tcp', 'tcp.' + state.config.sharedDomain, serviceport] , ['https', token.domains[0] ] ] ]