diff --git a/lib/extensions.js b/lib/extensions.js index f4e0c11..371b1a9 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -26,7 +26,8 @@ module.exports.authenticate = function (opts) { auth = jwtoken; if ('object' === typeof auth && /^.+@.+\..+$/.test(auth.subject)) { console.log('parsed'); - var id = crypto.randomBytes(16).toString('base64').replace(/\+/,'-').replace(/\//g,'_').replace(/=/g,''); + var id = crypto.randomBytes(12).toString('hex'); + //var id = crypto.randomBytes(16).toString('base64').replace(/\+/g,'-').replace(/\//g,'_').replace(/=/g,''); console.log("[DEBUG] gonna send email"); return requestAsync({ url: 'https://api.mailgun.net/v3/telebit.cloud/messages' @@ -130,7 +131,7 @@ app.use('/login', function (req, res) { + 'https://' + tokenData.domains.join(',') + '/?serviceport=' + tokenData.ports.join(',') + '" />' + '
' - + 'Access anything, anywhere, anytime.
+Friends don't let friends localhost.
+Friends enable friends to share anything, access anywhere, connect anytime.
End-to-End Encryption with Free (or custom) Domains
+$ telebit http 3000
+
+> Serving localhost:3000 as https://lucky-duck-42.telebit.cloud
+> Go forth and share!
+> ex: curl https://lucky-duck-42.telebit.cloud
+ Securely As Needed or Conveniently Always On
+$ telebit ssh 22
+
+> Serving ssh at lucky-duck-42.telebit.cloud on port 5050
+> ex: ssh lucky-duck-42.telebit.cloud -p 5050
+> ex: ssh lucky-duck-42.telebit.cloud -o \
+ ProxyCommand='openssl s_client -connect %h:443 -quiet'
+