Automatic self-signed HTTPS for local development

From time to time when doing web development, you need to test something related to HTTPS. In some cases, the application you’re writing already supports HTTPS natively and that’s no problem. But more often (and probably better, in my opinion) is the case when you have another service (be it an AWS ELB or an nginx layer) that will terminate the HTTPS connection for you so your application doesn’t have to know how to speak HTTPS.

In those cases, how can you test functionality that specifically interacts with HTTPS?

Today I will show you autohttps, a thin nginx proxy using Docker and a self signed certificate to automatically create an HTTPS proxy in front of your application.


Snuff

And so it ends.

Yes, sir, thank you, sir, and I wouldn’t trust me one little inch, sir. I knows a bad one when I sees them. I have a mirror.


The Way of Kings

Tell … tell my brother … he must find the most important words a man can say.

First, the worldbuilding and magic systems.


Thud!

“Quis custodiet ipsos custodes? Your grace.”

“I know that one,” said Vimes. “Who watches the watchmen? Me, Mr. Pessimal.”


Night Watch

Night Watch starts with Vimes and a few others visiting a number of otherwise forgotten graves. When asked what was going on: “you had to have been there.”

One magical lightning storm later and Vimes ends up ‘having been there’ for a second time.


The Black Prism

I didn’t even know that The Black Prism was a series until I’d finished Brent Weeks other series ( The Way of Shadows et al) and it came up in ‘related works’. Reading the summary, I almost wish I’d read them the other way around. Lightbringer seems like more of a traditional epic fantasy (albeit with an interesting magic system, see below) rather than the unrelenting grimdarkness that was The Night Angel books.

One thing that I’ve really been liking about this series thus far is the world building. In particular the magic system. The basic idea is that drafters (magic users) can take light of certain colors–each person has different ranges–and use those colors to do various things. Like you can make a napalm like substance out of red or a solid, smooth surface out of blue. On the down side, drafting too much of a color will eventually drive you mad1. If I knew more about the actual physics of light, I imagine I’d be more annoyed at the technical details, but as it stands, I know just enough to think it’s a really cool idea.


The Courts of Chaos

Good-bye and hello, as always.

So. Oberon is back. Things are still going wrong. The Pattern is breaking apart and Brand / the Courts of Chaos are trying to hurry things along.


The Hand of Oberon

Heredity or environment? I wondered wryly. We were all of us, to some degree, mad after his fashion. To be honest, it had to be a form of madness, to have so much and to strive so bitterly for just a little more, for a bit of an edge over the others. He carried this tendency to its extreme, that is all. He was a caricature of this mania in all of us. In this sense, did it really matter which of us was the traitor?

This time around, Corwin et all go to the Primal Pattern (because that’s a thing now) and manage to figure out what could have caused the Black Road and all the troubles that’s been causing them. We proceed to get a pile more backstory / world building from Dworkin ( Who is apparently Corwin's grandfather? ) and head off for some fun™ in the Courts of Chaos.


Running local proxies

As I’ve mentioned a couple of times recently1 2, I have set a handful of different things on my local machines to make remote development a bit easier. This time around, I have two more to add to that list:

  • Setting up a local SOCKS proxy with SSH
  • Setting up a local TOR proxy for testing / more anonymous browsing
  • Configuring your browser to use these proxies for some/all traffic

In both cases, I have these running on an always-on server that I use for various projects just like this. It could just as easily be set up to run on a Raspberry Pi or on your local machine.


The Fifth Elephant

So this is diplomacy. It’s like lying, only to a better class of people.

More than most of the Guards series (or Discworld in general), The Fifth Elephant is driven by a strong plot rather than leaning on characters and jokes. It’s actually a nice change from many of the other books, although I do like both styles.