Internet access via Proxy | Drupal 8

Internet access via Proxy

Submitted by editor on Tue, 07/26/2016 - 14:07
Question

How to configure network connexion via a proxy server ?

For the examples, IP = 192.168.100.100, Port=3128

Window

Add Proxy server to the Windows environment variable. (Controle panel -> System -> Advance settings -> variable -> variable system)
PROTOCOLE_proxy  NAME:PASSWORD:HOST:IP
Ex:
http_proxy http://192.168.100.100:3128
https_proxy http://192.168.100.100:3128

 

Linux (Debian, Mint ...)

export http_proxy=http://192.168.100.100:3128

Create a file /etc/profile.d/proxy.sh
Add:
export PROTOCOLE_proxy =NAME:PASSWORD:HOST:IP
Ex:
export http_proxy=http://192.168.100.100:3128
export https_proxy=http://192.168.100.100:3128
export HTTP_PROXY=http://192.168.100.100:3128
export HTTPS_PROXY=http://192.168.100.100:3128

Check proxys :  env | grep -i proxy

Exclude (NO proxy)
export no_proxy="127.0.0.1, localhost, *.loc, *.local, 192.168.1.10, domain.com:8080"
export NO_PROXY="127.0.0.1, localhost, *.loc, *.local, 192.168.1.10, domain.com:8080"

Linux apt

Create file : /etc/apt/apt.conf.d/99HttpProxy (Or use : /etc/apt/apt.conf)
Add:
Acquire::http::Proxy "http://192.168.100.100:3128";

 

Add / Edit proxy for a docker machine installed on linux ubuntu (debian, Mint ...)

(Tested on  Ubuntu 14.04.2 LTS)

Edit the file :/etc/default/docker

sudo vim /etc/default/docker

Add the proxy

export http_proxy="http://PROXY_IP:PROXY_PORT"
Example:
export http_proxy="http://192.168.100.100:3128"

Restart the docker service

sudo service docker restart

Add new comment