gateway icon indicating copy to clipboard operation
gateway copied to clipboard

Gateway - set Proxy

Open xianz271828 opened this issue 8 months ago • 2 comments

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?

xianz271828 avatar Apr 06 '25 13:04 xianz271828

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);

lgfinfo avatar Apr 08 '25 16:04 lgfinfo

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?

xianz271828 avatar Apr 09 '25 14:04 xianz271828