Gateway - set Proxy
Question: Will the Gateway container use the system proxy or the proxy set by the environment variable to connect to the Ethereum node? How to set the proxy for the Gateway container when the network is restricted?
import { setGlobalDispatcher, ProxyAgent } from 'undici';
// 配置代理 const proxyUrl = 'http://127.0.0.1:7890'; // 替换为你的代理地址 const dispatcher = new ProxyAgent(proxyUrl); process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; setGlobalDispatcher(dispatcher);
import { setGlobalDispatcher, ProxyAgent } from 'undici';
// 配置代理 const proxyUrl = 'http://127.0.0.1:7890'; // 替换为你的代理地址 const dispatcher = new ProxyAgent(proxyUrl); process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; setGlobalDispatcher(dispatcher);
Thanks bro. But, uh, which file do I need to modify?