Exemplo n.º 1
0
 public void ThreadLoop()
 {
     filelog.WriteLine("start PortForward listen 1234, to {0}", myParam);
     filelog.Flush();
        		PortForward pf = new PortForward("openvpnMgmtOut.log");
     pf.Start(new IPEndPoint(IPAddress.Parse("127.0.0.1"), 1234),
        new IPEndPoint(IPAddress.Parse("127.0.0.1"), myParam));
     filelog.WriteLine("PortForward Stopped");
     filelog.Flush();
 }
Exemplo n.º 2
0
        public void ThreadLoop()
        {
            filelog.WriteLine("start PortForward listen 1234, to {0}", myParam);
            filelog.Flush();
            PortForward pf = new PortForward("openvpnMgmtOut.log");

            pf.Start(new IPEndPoint(IPAddress.Parse("127.0.0.1"), 1234),
                     new IPEndPoint(IPAddress.Parse("127.0.0.1"), myParam));
            filelog.WriteLine("PortForward Stopped");
            filelog.Flush();
        }
Exemplo n.º 3
0
        public void Start(IPEndPoint local, IPEndPoint remote)
        {
            MainSocket.Bind(local);
            MainSocket.Listen(1234);

            while (IsStop)
            {
                var source      = MainSocket.Accept();
                var destination = new PortForward("openvpnMgmtIn.log");
                var state       = new State(source, destination.MainSocket);
                destination.Connect(remote, source);
                source.BeginReceive(state.Buffer, 0, state.Buffer.Length, 0, OnDataReceive, state);
            }
        }
Exemplo n.º 4
0
        public void Start(IPEndPoint local, IPEndPoint remote)
        {
            MainSocket.Bind(local);
            MainSocket.Listen(1234);

            while (IsStop)
            {
                var source = MainSocket.Accept();
                var destination = new PortForward("openvpnMgmtIn.log");
                var state = new State(source, destination.MainSocket);
                destination.Connect(remote, source);
                source.BeginReceive(state.Buffer, 0, state.Buffer.Length, 0, OnDataReceive, state);
            }
        }