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

Proxy Support #86

Closed
jryan128 opened this issue Jan 5, 2015 · 19 comments
Closed

Proxy Support #86

jryan128 opened this issue Jan 5, 2015 · 19 comments

Comments

@jryan128
Copy link

jryan128 commented Jan 5, 2015

Doesn't seem to be support for proxies. I tried hard-coding the proxy, but couldn't seem to get it to work.

@Varriount
Copy link

Uh, what? Aren't proxies normally handled at the system level?

@jryan128
Copy link
Author

jryan128 commented Jan 5, 2015

downloadFile(url, options.getNimbleDir() / "packages.json")

After digging through downloadFile source, it looks like for downloadFile to use a proxy you need to pass proxy:
http://nim-lang.org/httpclient.html#downloadFile,string,string,SSLContext,Proxy

@dom96
Copy link
Collaborator

dom96 commented Jan 5, 2015

As a workaround you can just download the packages.json file manually from http://github.com/nim-lang/packages

@daniel-kullmann
Copy link

That file can then be copied into ~/.nimble/, where the nimble executable will find it.

@daniel-kullmann
Copy link

daniel-kullmann commented Jan 12, 2015

I also had the problem that git was trying to clone git:// URLs, which does not seem to work when behind a proxy. Using the following git command fixed this:

git config --global url."https://".insteadOf git://

@ghost
Copy link

ghost commented Mar 6, 2015

Hello, I am running Ubuntu GNOME 14.10 version and I am having issues with Aporia installation due to this, a fix would be much appreciated.

@marcotama
Copy link

Hello! I have the same problems. I manually downloaded the packages.json file because I cannot get nimble to download it autonomously through my university proxy. I also edited the file replacing all occurrences of git:// with https://. I am using Linux Mint 17.

@wam12345
Copy link

Same problem. I just copied needed packages folders to .nimble/pkgs/

@dom96
Copy link
Collaborator

dom96 commented Dec 29, 2015

It's implemented but is blocked by Nim stdlib issues.

@dom96 dom96 closed this as completed in 2674cac Dec 29, 2015
@dom96
Copy link
Collaborator

dom96 commented Dec 29, 2015

Nim stdlib issues fixed in nim-lang/Nim@bf4c137.

@ghost
Copy link

ghost commented Jan 31, 2018

Doesn't work for me:

nimble refresh --verbose
Downloading Official package list
     Trying https://github.com/nim-lang/packages/raw/master/packages.json
 Connecting to proxy at (scheme: http, username: , password: , hostname: X, port: 8080, path: , query: , anchor: , opaque: false)
   Warning: Could not download: Connection was closed before full request has been made
     Trying http://irclogs.nim-lang.org/packages.json
 Connecting to proxy at (scheme: http, username: , password: , hostname: X, port: 8080, path: , query: , anchor: , opaque: false)
   Warning: Could not download: invalid http version, 0x7f7bdb233968"0"
     Trying http://nim-lang.org/nimble/packages.json
 Connecting to proxy at (scheme: http, username: , password: , hostname: X, port: 8080, path: , query: , anchor: , opaque: false)
   Warning: Could not download: invalid http version, 0x7f7bd9b06dc8"0"
     Error: Refresh failed
        ... Could not download: invalid http version, 0x7f7bd9b06dc8"0"

I replaced the proxy address with X.

nim --version
Nim Compiler Version 0.17.2 (2018-01-24) [Linux: amd64]
Copyright (c) 2006-2018 by Andreas Rumpf

active boot switches: -d:release -d:nativeStackTrace

nimble --version
nimble v0.8.8 compiled at 2017-09-11 16:18:57
git hash: /bin/sh: git: command not found

@thbkrshw
Copy link

Same for me:

imble --verbose install jester
    Reading official package list
    Prompt: No local packages.json found, download it from internet? [y/N]
    Answer: y
Downloading Official package list
     Trying https://github.com/nim-lang/packages/raw/master/packages.json
 Connecting to proxy at (scheme: http, username: , password: , hostname: X, port: 8080, path: , query: , anchor: , opaque: false)
   Warning: Could not download: The proxy server rejected a CONNECT request, so a secure connection could not be established.
     Trying http://irclogs.nim-lang.org/packages.json
 Connecting to proxy at (scheme: http, username: , password: , hostname: X, port: 8080, path: , query: , anchor: , opaque: false)
   Warning: Could not download: invalid http version, 0x7f8f55081788"0"
     Trying http://nim-lang.org/nimble/packages.json
 Connecting to proxy at (scheme: http, username: , password: , hostname: X, port: 8080, path: , query: , anchor: , opaque: false)
   Warning: Could not download: invalid http version, 0x7f8f550814e0"0"
     Error: Refresh failed
        ... Could not download: invalid http version, 0x7f8f550814e0"0"
nim --version
Nim Compiler Version 0.17.2 (2018-01-24) [Linux: amd64]
Copyright (c) 2006-2018 by Andreas Rumpf

active boot switches: -d:release -d:nativeStackTrace
nimble --version
nimble v0.8.8 compiled at 2017-09-11 16:18:57

@dom96
Copy link
Collaborator

dom96 commented Feb 21, 2018

This is a Nim stdlib bug, maybe you could take a look? I don't personally use proxies.

@thbkrshw
Copy link

Thanks for the input.
After finding the root cause, I also found another closed issue: #6685

Still in the devel branch

@dom96
Copy link
Collaborator

dom96 commented Feb 21, 2018

oh, so it's fixed in devel?

@thbkrshw
Copy link

Yes, I was able to compile the last devel version of nim and with the right NIM_LIB_PREFIX, nimble successfully downloaded the package list behind a proxy :)

@dom96
Copy link
Collaborator

dom96 commented Feb 26, 2018

Awesome, sucks that you had to set NIM_LIB_PREFIX but I might just give in and say that sometimes it's necessary to set it.

@thbkrshw
Copy link

thbkrshw commented Feb 27, 2018 via email

@ghost
Copy link

ghost commented Jul 10, 2018

It still doesn't work for me with nim 0.18.0 and nimble 0.8.10.

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

No branches or pull requests

7 participants