mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Add comment on how safe-chain works with the system proxy.
This commit is contained in:
parent
8950d528d5
commit
16c76de0f3
1 changed files with 10 additions and 0 deletions
|
|
@ -5,6 +5,16 @@ export function tunnelRequest(req, clientSocket, head) {
|
||||||
const httpsProxy = process.env.HTTPS_PROXY || process.env.https_proxy;
|
const httpsProxy = process.env.HTTPS_PROXY || process.env.https_proxy;
|
||||||
|
|
||||||
if (httpsProxy) {
|
if (httpsProxy) {
|
||||||
|
// If an HTTPS proxy is set, tunnel the request via the proxy
|
||||||
|
// This is the system proxy, not the safe-chain proxy
|
||||||
|
// The package manager will run via the safe-chain proxy
|
||||||
|
// The safe-chain proxy will then send the request to the system proxy
|
||||||
|
// Typical flow: package manager -> safe-chain proxy -> system proxy -> destination
|
||||||
|
|
||||||
|
// There are 2 processes involved in this:
|
||||||
|
// 1. Safe-chain process: has HTTPS_PROXY set to system proxy
|
||||||
|
// 2. Package manager process: has HTTPS_PROXY set to safe-chain proxy
|
||||||
|
|
||||||
tunnelRequestViaProxy(req, clientSocket, head, httpsProxy);
|
tunnelRequestViaProxy(req, clientSocket, head, httpsProxy);
|
||||||
} else {
|
} else {
|
||||||
tunnelRequestToDestination(req, clientSocket, head);
|
tunnelRequestToDestination(req, clientSocket, head);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue