Md. Minhazul Haque
Minhaz's Blog

Follow

Minhaz's Blog

Follow
Bypass Proxy for Composer/NPM/Apt

Bypass Proxy for Composer/NPM/Apt

Md. Minhazul Haque's photo
Md. Minhazul Haque
·Mar 31, 2023·

1 min read

While working in a restricted on-prem network, popular package managers like Composer or NPM may not properly work. Thanks to the proxy filtering technologies at the internet gateway end.

These package managers often download files over an unencrypted HTTP connection and verify the binaries using a checksum or GPG signature. However, in some cases, it is possible to bypass the filtering by enforcing HTTPS so these tools use an encrypted connection to fetch and download artifacts.

Composer

composer config --global disable-tls
composer config --global secure-http

NPM

npm config set registry https://registry.npmjs.org/
npm config set ssl-strict=false

Apt

sed -i s/http/https/g /etc/apt/sources.list
 
Share this