mimic shadowsocks-csharp.