Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Proxy setting could not be set up #8

Open
ThomasBouquet95 opened this issue Sep 4, 2017 · 0 comments
Open

Proxy setting could not be set up #8

ThomasBouquet95 opened this issue Sep 4, 2017 · 0 comments

Comments

@ThomasBouquet95
Copy link

Almost all companies work behind a proxy. There are currently no way of set up proxy setting in this library.

To solve this issue :

IOTA lib is using this https://www.npmjs.com/package/xmlhttprequest to simulate the browser environment. This doesn’t have a proxy configuration, but there is fork that does https://github.com/jbeuckm/node-XMLHttpRequest

What we have to do is to copy https://github.com/jbeuckm/node-XMLHttpRequest/blob/master/lib/XMLHttpRequest.js that has the proxy patch to the local file system on /home/ec2-user/IOTA/test/node_modules/xmlhttprequest/lib/xml/XMLHttpRequest.js

The new library needs a config parameter, so we need to change /home/ec2-user/IOTA/test/node_modules/iota.lib.js/lib/utils/makeRequest.js to include the config parameter and pass it to make request:

So at the beginning of the file:

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

No branches or pull requests

1 participant