Skip to content

Instantly share code, notes, and snippets.

Avatar

YuanSheng Wang membphis

  • apiseven.com
  • Zhuhai, China
View GitHub Profile
@agentzh
agentzh / dns_server.lua
Created Aug 18, 2016
My first hacked version of silly Lua DNS server atop NGINX (with patched ngx_stream_lua_module).
View dns_server.lua
local bit = require "bit"
local byte = string.byte
local lshift = bit.lshift
local rshift = bit.rshift
local concat = table.concat
local insert = table.insert
local char = string.char
local band = bit.band
local sub = string.sub
local gsub = string.gsub