Exemplo n.º 1
0
        public SilkroadTunnel(SilkroadProxy silkroadProxy, List<SilkroadTunnel> tunnels, MainForm mainForm)
        {
            _remoteIP = "123.30.200.6";
            _remotePort = 15779;

            _silkroadProxy = silkroadProxy;

            _localContext = new Context();
            _localContext.MySecurity.GenerateSecurity(true, true, true);

            _remoteContext = new Context();

            _localContext.MyRelaySecurity = _remoteContext.MySecurity;
            _remoteContext.MyRelaySecurity = _localContext.MySecurity;

            _contexts = new List<Context>();
            _contexts.Add(_localContext);
            _contexts.Add(_remoteContext);

            _tunnels = tunnels;

            _mainForm = mainForm;

            if (_mainForm != null)
            {
                _charracter = new Charracter(_mainForm);
            }
        }
Exemplo n.º 2
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            try
            {
                _silkroadProxy = new SilkroadProxy(this);
                _silkroadProxy.StartProxy();

            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.ToString());
            }
        }