merge from zhongyuan.wang & accept multiple clients & deal with access rules