Skip to content

Instantly share code, notes, and snippets.

View membphis's full-sized avatar

YuanSheng Wang membphis

  • api7.ai
  • Zhuhai, China
View GitHub Profile
@agentzh
agentzh / dns_server.lua
Created August 18, 2016 19:33
My first hacked version of silly Lua DNS server atop NGINX (with patched ngx_stream_lua_module).
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