Exemplo n.º 1
0
        public void CreateRemote(EndPoint destination)
        {
            Server server = _controller.GetAServer(IStrategyCallerType.TCP, (IPEndPoint)_connection.RemoteEndPoint, destination);

            if (server == null || server.server == "")
            {
                throw new ArgumentException("No server configured");
            }

            encryptor = EncryptorFactory.GetEncryptor(server.method, server.password);
            decryptor = EncryptorFactory.GetEncryptor(server.method, server.password);
            _server   = server;
        }
Exemplo n.º 2
0
        private void CreateRemote()
        {
            Server server = _controller.GetAServer(IStrategyCallerType.TCP, (IPEndPoint)Connection.RemoteEndPoint, _destEndPoint);

            if (server == null || server.server == "")
            {
                throw new ArgumentException("No server configured");
            }
            lock (_encryptionLock)
            {
                lock (_decryptionLock)
                {
                    _encryptor = EncryptorFactory.GetEncryptor(server.method, server.password, server.auth, false);
                }
            }
            this._server = server;
        }
Exemplo n.º 3
0
        private void CreateRemote()
        {
            Server server = _controller.GetAServer(IStrategyCallerType.TCP, (IPEndPoint)_connection.RemoteEndPoint,
                                                   _destEndPoint);

            if (server == null || server.server == "")
            {
                throw new ArgumentException("No server configured");
            }

            _encryptor = EncryptorFactory.GetEncryptor(server.method, server.password);

            this._server = server;

            /* prepare address buffer length for AEAD */
            Logging.Debug($"_addrBufLength={_addrBufLength}");
            _encryptor.AddrBufLength = _addrBufLength;
        }