public ClientCli(Config config, Shell shell)
	{
		this.config = config;
		this.shell = shell;
		try
		{
			socket = new Socket(config.getString("proxy.host"), config.getInt("proxy.tcp.port"));
			directory = config.getString("download.dir");
			input = socket.getInputStream();
			objectInput = new ObjectInputStream(input);
			output = socket.getOutputStream();
			objectOutput = new ObjectOutputStream(output);
			objectOutput.flush();
		}
		catch(SocketException se)
		{
			try
			{
				shell.writeLine("Could not find server.");
				exitWithoutConnection();
			} 
			catch (IOException e)
			{
				e.printStackTrace();
			}
		}
		catch (UnknownHostException e)
		{
			e.printStackTrace();
		} 
		catch (IOException e)
		{
			e.printStackTrace();
		}
	}