示例#1
0
        private async Task <string> test()
        {
            VpnServerRpc api;

            api = new VpnServerRpc("127.0.0.1", 5555, "pirkon12", "");
            // async Task<VpnRpcEnumEth> devlist => await api.EnumEthernet();
            return(await Task.Run <string>(() =>
            {
                var DeviceList = new List <DevList>();
                List <string> g31 = new List <List <g3> >();
                VpnRpcEnumEth devlist = api.EnumEthernet();
                for (int i = 0; i < devlist.EthList.Count() - 1; i++)
                {
                    string h = devlist.EthList[i].DeviceName_str.ToString();
                    string g = devlist.EthList[i].NetworkConnectionName_utf.ToString();
                    DeviceList.Add(new DevList {
                        Device = h, NetName = g
                    });
                }
                ;



                //  string g = devlist.EthList[2].NetworkConnectionName_utf.ToString();
                //  string h = devlist.EthList[2].DeviceName_str.ToString();

                // g1 = g.ToString();
                // g2 = h.ToString();
                //  textBox1.Text = g1.ToString();
                return g1;
            }));
        }
示例#2
0
        public static void _Devlist()
        {
            VpnServerRpc api;

            api = new VpnServerRpc("127.0.0.1", 5555, "pirkon12", "");
            Console.WriteLine("Begin: Test_EnumEthernet");

            VpnRpcEnumEth         out_rpc_enum_eth = api.EnumEthernet();
            VpnRpcEnumLocalBridge b = api.EnumLocalBridge();

            print_object(out_rpc_enum_eth);
            Console.WriteLine("/n");
            print_object(b);
            Console.WriteLine("End: Test_EnumEthernet");
            Console.WriteLine("-----");
            Console.WriteLine();
            Console.WriteLine("End: Test_Test");
            Console.WriteLine("-----");
            Console.WriteLine();
            DisplayDnsConfiguration();
        }
示例#3
0
 public SoftTest()
 {
     api = new VpnServerRpc("192.168.97.112", 443, "pirkon12,", "");
 }
示例#4
0
 public VPNRPCTest()
 {
     api = new VpnServerRpc("192.168.97.112", 443, "pirkon12", "");       // Speficy your VPN Server's password here.
 }