Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 14 2018 22:29
    JonathanWbn opened #47
  • Jun 04 2018 21:23
    therealgilles opened #46
  • May 21 2018 18:54
    pyros2097 commented #45
  • May 21 2018 16:12
    coolaj86 commented #45
  • May 21 2018 16:04
    coolaj86 commented #45
  • May 21 2018 14:56
    pyros2097 commented #45
  • May 12 2018 03:14
    coolaj86 commented #44
  • May 12 2018 03:12
    coolaj86 opened #45
  • Feb 16 2018 22:37
    brandonn1231 edited #44
  • Feb 16 2018 22:36
    brandonn1231 opened #44
  • Oct 06 2017 01:57

    DylanPiercey on master

    Update changelog V2.3.2 (compare)

  • Oct 06 2017 01:25

    DylanPiercey on master

    Update README.md Added documen… Merge pull request #43 from fzi… (compare)

  • Oct 06 2017 01:25
    DylanPiercey closed #43
  • Oct 06 2017 01:25
    DylanPiercey commented #43
  • Oct 02 2017 20:30
    fzipi opened #43
  • Oct 02 2017 20:25
    fzipi commented #42
  • Oct 02 2017 20:18
    DylanPiercey closed #41
  • Oct 02 2017 20:18
    DylanPiercey commented #41
  • Oct 02 2017 20:17
    DylanPiercey closed #42
  • Oct 02 2017 20:17
    DylanPiercey commented #42
Dylan Piercey
@DylanPiercey
@ejeklint im assuming you are using the latest version?
Per Ejeklint
@ejeklint
The one from npm
Dylan Piercey
@DylanPiercey
@ejeklint Sorry I didn't see that you replied! Do you mind posting the rest of your config?
Dylan Piercey
@DylanPiercey
If any one knows how to dynamically alias a localhost name in travis (ie /etc/hosts) it would be a huge help. Currently tests require sudo and I cant use travis :(.
Per Ejeklint
@ejeklint
@DylanPiercey Here’s my complete and very complicated server :)
'use strict';

const createServer = require("auto-sni");
const hapi = require("hapi");
const server = new hapi.Server();

const secureServer = createServer({
    email: 'ejeklint@me.com', // Emailed when certificates expire.
    agreeTos: true, // Required for letsencrypt.
    debug: true, // Add console messages and uses staging LetsEncrypt server. (Disable in production)
    domains: ['localhost', ['www.onoiono.se', 'test.onoiono.se']], // List of accepted domain names. (You can use nested arrays to register bundles with LE).
    forceSSL: true, // Make this false to disable auto http->https redirects (default true).
    ports: {
        http: 3001, // Optionally override the default http port.
        https: 3002 // // Optionally override the default https port.
    }
});

server.connection({
    listener: secureServer,
    autoListen: false,
    tls: true
});

// Add the route
server.route({
    method: 'GET',
    path: '/hello',
    handler: (request, reply) => {

        return reply('hello world');
    }
});

// Start the server
server.start((err) => {

    if (err) {
        throw err;
    }
    console.log('Server running at:', server.info.uri);
});
Should note that when I got the error message, everything still worked as expected.
dangerbacon
@dangerbacon
Hi. Trying out auto-sni with restify. Seems great! Found a documentation bug and the fix for it.

Readme says:

// Override the https module in AutoSNI with restify.
createServer.https = restify.createServer;

This will give you the error:
/home/admin/testapp/node_modules/auto-sni/lib/index.js:51
var httpsServer = https.createServer(httpsServerOptions, handler)
TypeError: https.createServer is not a function
This is the correct version:
// Override the https module in AutoSNI with restify.
createServer.https = restify;
After doing that, works as hoped.
Anyways, other than that one little thing, auto-sni seems great! I look forward to using it! Thanks for your hard work!
Dylan Piercey
@DylanPiercey
@dangerbacon glad to hear it's working for you. I think the restify docs are updated on github but it seems like I didn't push the doc change to npm, I'll do that now. Thanks for pointing this out!
Dylan Piercey
@DylanPiercey
Fixed in 1.1.3 :D
Adri Van Houdt
@AdriVanHoudt
Hi I tried using this with hapi but no success
is there a way to test this locally?
Dylan Piercey
@DylanPiercey
Locally it should fall back to a self signed certificate. The best way to test is to enable the debug option which will use letsencrypt staging server. The certificate won't appear valid in the browser but you can verify that it's from letsencrypt and that would mean it's working. One thing to note is that this only works when both port 80 and 443 are used.
Adri Van Houdt
@AdriVanHoudt
I have to use those ports locally?
not 8000 for example?
I also got a bit further with letsencrypt-express but not there yet
Daplie/letsencrypt-express#55
Dylan Piercey
@DylanPiercey
Yeah, afaik the letsencrypt client doesn't let you change the ports, this may have changed since I haven't looked for a couple months.
Adri Van Houdt
@AdriVanHoudt
yeah that is why I started testing on an actual domain
Dylan Piercey
@DylanPiercey
You can look at the test suite, there are some examples in there, both for self signed and staging server.
Adri Van Houdt
@AdriVanHoudt
for auto sni or letsencrypt-express?
I am also testing on google cloud compute engine (VM)
so I think the dns-01 method won't work
afaik
Dylan Piercey
@DylanPiercey
I was referring to auto-sni. The last example uses ngrok to create a temp domain and registers it with the staging server.
Adri Van Houdt
@AdriVanHoudt
local is fine
with the self signed cert
the problem is I can't test my prod env locally :P
unless I use a VM or something I guess
Adri Van Houdt
@AdriVanHoudt
using auto sni I get ERR_SSL_VERSION_OR_CIPHER_MISMATCH locally
f7f7u7f7
@f7f7u7f7
Hey, I'm getting a valid certifcate signed and everything, but the server is not using it
James Tindal
@james-tindal
For me, auto-sni is serving my server on http, port 80. So I can see it if I set forceSSL to false. Otherwise it redirects to https, which does nothing. What am I missing here?
AJ ONeal
@coolaj86
@AdriVanHoudt FYI I've bumped all of letsencrypt-express, node-letsencrypt, etc to v2.x The code base is about half of the size, everything is split into plugins, the plugins are actually testable (and most of them are tested).
All good things. Better in every way. I'd high recommend that anyone who has been depending on v1.x stuff to migrate to v2.x. It's not difficult
Adri Van Houdt
@AdriVanHoudt
@coolaj86 nice, I will probably try it out again in september
Mun Kit "Jeff" Tham
@jefftham
@DylanPiercey , if a valid/ non-expire cert in the directory, is it generate a new one after i restart the node server?
Dylan Piercey
@DylanPiercey
It will reuse a certificate for 80 days so it will not create a new one when you restart. If you want a new one you will have to manually delete the old one from ~/letsencrypt.
Mun Kit "Jeff" Tham
@jefftham
perfect!!! i like the current feature. thanks @DylanPiercey
Dylan Piercey
@DylanPiercey
No problem, glad to help!
michaelxu
@Micjoyce
啦啦啦啦
miecio1212
@miecio1212
Hey guys I have a problem and I can't find solution : (

Will fall back to self signed certificate.
AutoSNI LetsEncrypt Error: { Error: Command failed: openssl req -x509 -newkey rsa:2048 -keyout privkey.pem -out cert.pem -days 90 -nodes -subj '/CN=localhost/emailAddress=mateusz.stefanski0608@gmail.com' && cat privkey.pem cert.pem | tee -a chain.pem fullchain.pem && echo '{"domains
":"localhost","debug":true}' > opts.json
Generating a 2048 bit RSA private key
...............+++
...+++

writing new private key to 'privkey.pem'

Subject does not start with '/'.
problems making Certificate Request

Pietro Paolo Vismara
@pietrovismara
Hi, i have a domain example.com and i'd like to set a certificate for example.com and www.example.com
how am i supposed to set the domains option?
tashburn
@tashburn
@DylanPiercey Hi Dylan -- If I use auto-sni for a 10-node cluster all serving the same domain, will it work? Each node will attempt to renew... will they all get the same cert? Will they hit the Let's-Encrypt rate-limit of 5 per week?