3 ms·
> It's funny how many things that seem kind of incredible for a pure bash solution, ... My go to example of “Bash can do whaaat?!” is the source for xip.io. A
by koolba 9y ago
> It's funny how many things that seem kind of incredible for a pure bash solution, ...
My go to example of “Bash can do whaaat?!” is the source for xip.io. A custom DNS server written in a handful of lines of Bash!
https://github.com/basecamp/xip-pdns/blob/master/bin/xip-pdns https://github.com/basecamp/xip-pdns/blob/master/bin/xip-pdn...
- ddtaylor 9y agoI have made a lot of DNS products and doing the same thing happening here is a few lines of code in most any language. This code, while entertaining, cannot handle very simple DNS packets because of its "compression encoding.
- kiallmacinnes 9y agoThis is ran behind PowerDNS, which handles the compression prior to handing off to this code, so that shouldn't be a problem.
- brazzledazzle 9y agoWhich means it’s not really doing any of the heavy lifting.
- xyproto 9y agoWhich is also the case for most bash scripts, the heaving lifting is done by all the executables that are called from bash, not in native bash.
- opinionator1 9y agoNobody said it couldn't be done, just that it shouldn't. Fun stunt but ultimately suitable only for toys or as a gimmick.
- digitalsushi 9y agoI've developed on consumer grade routers from big vendors - Asus, linksys, netgear etc, and they are all using identical quality scripts for a large majority of the router's data processing. These scripts may not be pristine, but they are sure not always just a toy.