Update: As package.elm-lang.org IP address has been changed and is not blocked anymore as far as I know, these proxies have been disabled. If you still need them, add a comment describing why.
Here is how to use the proxies:
Two options:
1. Browse elm.dmy.fr instead of package.elm-lang.org
This requires no configuration, but this won't redirect google results or absolute links.
For elm < 0.19, use old.elm.dmy.fr instead.
Configure your system and/or browser proxy with the following proxy automatic configuration URL:
Or add in your own configuration:
if (shExpMatch(host, "package.elm-lang.org"))
{
return "PROXY elm.dmy.fr:9999";
}This will only redirects package.elm-lang.org so performance won't be impacted for other web sites. This should work for all documentation links, including google results.
Again two options:
$ https_proxy=elm.dmy.fr:9999 elm <command> ...As the proxy only accepts domains used by the elm binary, don't set it globally, or it could break other programs.
If you don't want to type it each time, wrap the installed elm binary in a shell script found in your $PATH before the the real one. For example if you installed elm with npm:
#!/bin/sh
https_proxy=elm.dmy.fr:9999 ~/.local/bin/elm "$@"For elm < 0.19, use http_proxy instead:
http_proxy=elm.dmy.fr:9999 elm-make [...]
http_proxy=elm.dmy.fr:9999 elm-package ...
By rebuilding the binary with a single line modification, you can avoid having to set the https_proxy variable. I won't provide a binary for security and maintenance reasons, but you can use this Dockerfile (using this guide if needed, just changing the Dockerfile) to build an Elm 0.19.0 static Linux x64 one with one command in a few minutes.
The proxies log IP addresses to allow to ban some if there are some abuses unrelated to Elm. Logs are deleted after a few days.
Your system configuration may be different.
elmglobally if you have not done it already:npm install -g elmwhich elmand use the output instead of~/.local/bin/elmin the script.elmchmod +x ./elmbindirectory listed inecho $PATHbefore the one returned bywhich elmIf you don't know where to put the script, you could for example put in in
~/bin:then open a new shell or terminal and check that the
elmcommand works and uses your script by runningwhich elm, it should now return your script location.elmcommands should now use the proxy.Note that this only works for
elminstalled globally (npm install -g elm). If you install it locally in a project withnpm install elmand runnpx elm, it won't use your script. You would have to usehttps_proxy=elm.dmy.fr:9999 npx elm ....