Changing proxy settings and making them effective I'm running a Drupal training course at work. For the exercises I've set up an Ubuntu Server VM (with Unity GUI) using VirtualBox. This allows me to port the VM around between my home workstation (with no proxy) and two work locations (each behind different proxies). 

Since we work in French, the exercises make extensive use of translations for the various modules installed.

Drupal accesses the Internet from the server in the following different ways:


drush downloads of modules 
drush pm-updates 
UI verification of module updates 
UI verification of translation updates (using l10n_update module)
drush verification of translation updates (also using l10n, but with commands)


Every time I make a change to the VM in one location I have to update the proxy settings in the others, and I'm having great difficulty in working out how to do this. Proxy settings seem to be in three places:


/etc/wgetrc - this changes the wget proxy settings, and it seems to work fine for drush dl and drush pm-update, but does not get taken into account by the UI or drush translation updates
in settings.php: here it seems to be possible to set them in either Drupal-7 format, like so:

$conf['proxy_server'] = '10.154.61.3';
$conf['proxy_port'] = 3128;


or in Drupal-8 format, like so:

$settings['http_client_config']['proxy']['http'] = '10.154.61.3:3128';
$settings['http_client_config']['proxy']['https'] = '10.154.61.3:3128';
$settings['http_client_config']['proxy']['no'] = ['127.0.0.1', 'localhost'];


You can also install a module called http_proxy, and this puts the settings directly into Drupal variables in the database (in the 'variable' table).


What's been bugging me is getting the proxy configuration changes to work. I get into situations where drush works for downloads and module updates but not for translation updates, and the UI doesn't work at all.

Of course, some of this is due to the imponderables of proxy settings (impossible to know what the settings are, and they change unpredictably - at one point for example I had to use the user agent settings).

But I have some questions I'm hoping someone might be able to answer:


What operations exactly do drush dl, pm-update, l10n-update, and the
UI equivalents use? Are there differences that might cause one to
work and others not? 
Do both the D7 and the D8 formats in
settings.php work?
What is the difference between using settings.php and the variables in the database?
How do the database variables get updated? Does the fact of changing them in settings.php also update the database?
Summary answer to your questions:

What operations exactly do drush dl, pm-update, l10n-update, and the UI equivalents use? Are there differences that might cause one to work and others not?

**
drush dl: donwload a module or theme
pm-update: update Core
l10n-update: update translation
**

Do both the D7 and the D8 formats in settings.php work?

No there are Some differences between D7 and D8

What is the difference between using settings.php and the variables in the database?

In Drupal 7 there is not any different. The settings store in DB. But in Drupal 8 None on Setting Configuration store in Database So there is no way to change them via DB

How do the database variables get updated? Does the fact of changing them in settings.php also update the database?

Yes, When you changed a config in settings.php  the equivalence variable in database got updated but in Drupal 8 There is no config or variable in DB to store settins.pp configuration.

you can get settings in Drupal 8 by Settings::get(YOUR_CONFING_NAME).