Skip to content
This repository has been archived by the owner on Aug 23, 2018. It is now read-only.

elm-get install : no proxy support #44

Closed
fredericlb opened this issue Jul 22, 2014 · 7 comments
Closed

elm-get install : no proxy support #44

fredericlb opened this issue Jul 22, 2014 · 7 comments

Comments

@fredericlb
Copy link

When trying to install a new package from Github, elm-get does not check for HTTP_PROXY and HTTPS_PROXY env vars, meaning that it won't hit the proxy but will try and fail to fetch url directly.

@kfish
Copy link
Contributor

kfish commented Jul 23, 2014

I've tested a hardcoded http proxy, see:

https://github.com/kfish/elm-get/tree/http-proxy
kfish@1aa174b

Proper http proxy support should include:

  • parsing $http_proxy, fallback to NoProxy
  • getting the equivalent from windows registry
  • using the proxy when publishing (http put)

Functions for this are in Network.HTTP.Proxy:
https://github.com/haskell/HTTP/blob/master/Network/HTTP/Proxy.hs

but I'm not sure how to use that from the http-client code.

@mmaz
Copy link

mmaz commented Nov 4, 2014

👍

@evancz
Copy link
Contributor

evancz commented Jan 14, 2015

Is this still an issue with elm-package? @kfish, do you know any more details about how to add a feature something like this?

@johnpmayer
Copy link
Member

This was added in http-client-0.4.7 for free

$ echo $http_proxy
http://10.0.0.216:3128
$ echo $https_proxy
http://10.0.0.216:3128
$ elm-make
Some new packages are needed. Here is the upgrade plan.

  Install:
    elm-lang/core 1.1.0

Do you approve of this plan? (y/n) y
Downloading elm-lang/core
Packages configured successfully!
Compiled 32 files

@johnpmayer
Copy link
Member

Yeah, does the same on Windows if you set http_proxy. It would be cool to also handle registry (Internet Settings).

http://hackage.haskell.org/package/HTTP-4000.1.1/docs/src/Network-HTTP-Proxy.html#registryProxyString

But I think we can close this now

@kfish
Copy link
Contributor

kfish commented May 7, 2015

@evancz The specific problem I was having was #100, which my colleague @jystic has recently tracked down.

@NigelThorne
Copy link

I still get a crash on windows...

elm-make --yes node-elm-loader\example\ticking_port.elm --output node-elm-loader\example\ticking_port.js

failed with 'TlsException (HandshakeFailed (Error_Packet_Parsing "Failed reading
: invalid header type: 72\nFrom:\theader\n\n"))' when sending request to
http://github.com/elm-lang/core/zipball/2.1.0/

(I'm trying to get https://github.com/sonnym/node-elm-loader example to run on windows).. behind a proxy server.

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

6 participants