OCEAN-xyz / datum_gateway

Decentralized Alternative Templates for Universal Mining
Other
32 stars 9 forks source link

Is it intended/desired to have the RPC connection using the HTTP_PROXY environment variable? #30

Open 21M4TW opened 2 days ago

21M4TW commented 2 days ago

Hi,

while trying datum, I have noticed that curl in json_rpc_call was attempting to use the proxy defined in my HTTP_PROXY environment variable to connect to the RPC. Was it intended? It does not seem to be how my other bitcoin services behave when connecting to the RPC when HTTP_PROXY is set. Maybe you should consider using the CURLOPT_NOPROXY option if it was not desired...

luke-jr commented 1 day ago

Seems like that's the purpose of HTTP_PROXY? The DATUM protocol isn't HTTP, so the var has no other purpose...

https://everything.curl.dev/usingcurl/proxies/env.html

21M4TW commented 1 day ago

Seems like that's the purpose of HTTP_PROXY? The DATUM protocol isn't HTTP, so the var has no other purpose...

https://everything.curl.dev/usingcurl/proxies/env.html

Yes this is the purpose of HTTP_PROXY, but other service such as CLN for example do not seem to use that variable when connecting to a bitcoin node. I had this variable set to use a proxy to be used when installing system packages (I heavily constrain Internet access on this node), but then I realized DATUM was unable to connect to my node due to it. In such situation the NO_PROXY variable can be used to add exceptions, so I could use it as another option. I just wanted to let you know that DATUM seemed to be behaving somewhat differently than existing software when it comes to this, it is not necessarily an issue.