add stat/0 api, move all api func to dns_proxy.