Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web3.js fails to make calls with SOCKS5 proxy #2946

Closed
tsujp opened this issue Jul 14, 2019 · 1 comment
Closed

Web3.js fails to make calls with SOCKS5 proxy #2946

tsujp opened this issue Jul 14, 2019 · 1 comment

Comments

@tsujp
Copy link

tsujp commented Jul 14, 2019

Description

I am trying to use web3 over a SOCKS5 proxy, it fails at URL resolution.

Expected behavior

That calling an web3.eth.Contract's method returns data.

Actual behavior

The result of node test.js is: Error: Connection refused or URL couldn't be resolved: http://127.0.0.1:9999

Steps to reproduce the behavior

Use any boilerplate web3.js code with a contract ABI and call a method on that contract over a SOCKS5 proxy where the host is running a geth instance. Curling such an instance works, e.g.

~ $ curl --socks5-hostname localhost:9999 -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":67}' http://localhost:7007
{"jsonrpc":"2.0","id":67,"result":"Geth/v1.8.27-stable-4bcc0a37/linux-amd64/go1.11.9"}

however running web3 over the same SOCKS5 proxy does not.

Error Logs

None. Only the actual behaviour section.

Versions

  • web3.js: 1.0.0-beta.55
  • nodejs: v11.11.0
  • ethereum node: Geth/v1.8.27-stable-4bcc0a37/linux-amd64/go1.11.9
@nivida
Copy link
Contributor

nivida commented Jul 15, 2019

Duplication of: #887

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants