Exemplo n.º 1
0
        public void shadowsocks_generator_can_generate_payload()
        {
            var host      = "192.168.2.5";
            var port      = 1;
            var password  = "******";
            var method    = PayloadGenerator.ShadowSocksConfig.Method.Rc4Md5;
            var generator = new PayloadGenerator.ShadowSocksConfig(host, port, password, method);

            generator
            .ToString()
            .ShouldBe("ss://cmM0LW1kNTpzM2NyM3RAMTkyLjE2OC4yLjU6MQ==");
        }
Exemplo n.º 2
0
        public void shadowsocks_generator_can_generate_payload_with_tag()
        {
            var host      = "192.168.2.5";
            var port      = 65535;
            var password  = "******";
            var method    = PayloadGenerator.ShadowSocksConfig.Method.Rc4Md5;
            var tag       = "server42";
            var generator = new PayloadGenerator.ShadowSocksConfig(host, port, password, method, tag);

            generator
            .ToString()
            .ShouldBe("ss://cmM0LW1kNTpzM2NyM3RAMTkyLjE2OC4yLjU6NjU1MzU=#server42");
        }