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

[Feature] Support for HTTP proxy #29

Open
zicklag opened this issue Feb 15, 2018 · 6 comments
Open

[Feature] Support for HTTP proxy #29

zicklag opened this issue Feb 15, 2018 · 6 comments

Comments

@zicklag
Copy link

zicklag commented Feb 15, 2018

I want to use Lix, but I am behind an HTTP proxy. It would be great to add support for using Lix behind a proxy. I would actually be willing to help out and try to work on this, but I wanted to know if the owners of this project have any preference on how it is implemented.

I am on an Ubuntu machine and I would definitely like it if Lix would be able to read my http_proxy environment variables and configure the proxy accordingly. It does seem like it might be a good idea to add a proxy configuration subcommand as well.

@zicklag
Copy link
Author

zicklag commented Feb 15, 2018

Unfortunately the Haxe standard library doesn't support specifying a proxy for the Javascript platform. 😦 It does make sense, though, because if you are running in a browser, the browser handles the proxy for any requests made by your script. That approach doesn't work for Node, though. It doesn't look like the builtin Node API has any support for making a proxied request either.

NPM uses the request library to make its proxied requests. Would there be any reason not to add that package as a dependency to Lix? That would probably make this easy; request even respects http_proxy environment variables.

If there is a reason not to add request I could probably write a pure Haxe class that does the proxying using request as a reference.

@kevinresol
Copy link
Member

Maybe tink_http should add proxy support and lix should use that

@zicklag
Copy link
Author

zicklag commented Feb 18, 2018

I like the sound of that. It would great if there was a completely cross-platform way to make http/https requests through a proxy. If tink_http can make requests from node that would be a good place to implement this. And it would mean that any other Haxe projects that need proxy support could use the library as well.

@damoebius
Copy link

I'm also behind a proxy. Any update on that ?

@zicklag
Copy link
Author

zicklag commented Apr 26, 2019

Unfortunately haven't gotten to work on it: haxetink/tink_http#90 (comment).

@kevinresol
Copy link
Member

Perhaps using OS-level proxy as a workaround?

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

3 participants