refactor shadowoscks framework