trick77/tunlr-style-dns-unblocking — pull request #25 by jamiees2 (2014-12-23 17:15:17+00:00)
Title: Converted the generator to python and separated code into smaller pieces.

Hi.

Please do not dismiss this immediately as PHP hate. There are a couple reasons for this, namely:

* PHP is not built for command line scripts like this. Python is able to take advantage of much better support in terms of generation, for example `argparse`, better modules, and so on...
* Python comes as default on Ubuntu and some other Linux distros. For the ones it is not included by default, it is easy to install. - This is a big plus, as it simplifies the setup, and reduces the package bloat on the server.
* The code was getting increasingly bloated. Separating it into multiple scripts, as i have done here, would solve the problem in part, but PHP does not have a good module system. Including something would almost always mean polluting the global namespace which might result in naming conflicts. You could mess with `namespace`, but it is finicky.
* This is not language related, but now it is much easier to write a generator for some other system based on config.json or write another mode entirely.

I would like to encourage a discussion about this, personally i think it is the right move, but again, it is up to you.

By using `argparse`, i could allow, for example to skip generating certain configuration files. I have not completed the full amount of arguments i would like to implement, but i believe it is at the point where i would like to open this up for community discussion.

I also implemented issue #15 by @skorokithakis and renamed a couple fields within the `config.json`.