bun
                                
                                
                                
                                    bun copied to clipboard
                            
                            
                            
                        Support `HTTPS_PROXY`, `HTTP_PROXY`, and `NO_PROXY`
Developers sometimes need to configure a proxy when using Bun.
- #49
 - #565
 
While Node.js has decided not to support this, these variables have been adopted by curl, wget, Ruby, Python, Go, etc. There is a comprehensive blog post by Gitlab that explains how each of these variables should work.
@cirospaciari is working on this
@cirospaciari has shipped this
http_proxy and https_proxy don't seem to work for me for bun install and bun upgrade. I tried the capitalized variants too. Is this confirmed to be working?
For comparison, my proxy works with npm install, yarn install, and pnpm install.
Confirmed not working with proxy at my end. @jylin is that still the issue for you?
Yea I don't think it works. bun install I can get around by using a different registry, but it would be nice if bun upgrade understood http proxy environment variables.
Hi, I am using Bun v1.0.31 on Windows 11 with CMD, Git Bash, and pwsh but seems like all of them can't do bun install under proxy connection.
I am not using WSL or Docker.
Not installed Node.js.
I've already set and using proxy configuration and it works fine with git, composer, curl, etc.
Does this feature still not implemented for windows ?
Below is my bun install --verbose result when tried to install fresh Laravel dependencies.
Verbose log
[0.00ms] ".env" bun install v1.0.31-canary.2 (8c5ac061) Enqueue package manifest for download: @tailwindcss/forms Enqueue package manifest for download: alpinejs Enqueue package manifest for download: autoprefixer Enqueue package manifest for download: axios Enqueue package manifest for download: laravel-vite-plugin Enqueue package manifest for download: postcss Enqueue package manifest for download: tailwindcss Enqueue package manifest for download: vite 🔍 Resolving [1/8] [PackageManager] waiting for 8 tasks Request: GET /@tailwindcss%2fforms Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /alpinejs Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /autoprefixer Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /axios Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /laravel-vite-plugin Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /postcss Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /tailwindcss Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /vite Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Response: < 200 Connection established
Response: < 200 Connection established
Response: < 200 Connection established
Response: < 200 Connection established
Response: < 200 Connection established
Response: < 200 Connection established
Response: < 200 Connection established
Request: GET /@tailwindcss%2fforms Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /autoprefixer Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /laravel-vite-plugin Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /axios Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Response: < 200 Connection established
Response: < 200 Connection established
Response: < 200 Connection established
Request: GET /alpinejs Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /postcss Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /tailwindcss Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /vite Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Response: < 200 Connection established
Response: < 200 Connection established
Response: < 200 Connection established
Request: GET /@tailwindcss%2fforms Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /autoprefixer Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /axios Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /laravel-vite-plugin Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Response: < 200 Connection established
Response: < 200 Connection established
Response: < 200 Connection established
Request: GET /postcss Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /alpinejs Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /tailwindcss Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /vite Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Response: < 200 Connection established
Response: < 200 Connection established
Response: < 200 Connection established
Request: GET /autoprefixer Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /laravel-vite-plugin Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /axios Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /@tailwindcss%2fforms Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Response: < 200 Connection established
Response: < 200 Connection established
Response: < 200 Connection established
Request: GET /alpinejs Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /tailwindcss Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /postcss Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /vite Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Response: < 200 Connection established
Response: < 200 Connection established
Response: < 200 Connection established
Request: GET /autoprefixer Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /axios Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /laravel-vite-plugin Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /@tailwindcss%2fforms Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Response: < 200 Connection established
Response: < 200 Connection established
Response: < 200 Connection established
Request: GET /postcss Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /vite Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /alpinejs Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /tailwindcss Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
Response: < 200 Connection established
Response: < 200 Connection established
Response: < 200 Connection established
Request: GET /laravel-vite-plugin Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /axios Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /autoprefixer Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /@tailwindcss%2fforms Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
🔍 laravel-vite-plugin [41/48] error: Syscall downloading package manifest laravel-vite-plugin Response: < 200 Connection established
🔍 @tailwindcss/forms [42/48] error: Syscall downloading package manifest @tailwindcss/forms Response: < 200 Connection established
🔍 autoprefixer [43/48] error: Syscall downloading package manifest autoprefixer Request: GET /alpinejs Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
🔍 axios [44/48] error: Syscall downloading package manifest axios Request: GET /vite Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /postcss Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Request: GET /tailwindcss Accept: application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, / Connection: keep-alive User-Agent: Bun/1.0.31 Host: registry.npmjs.org Accept-Encoding: gzip, deflate, br
Response: < 200 Connection established
🔍 vite [45/48] Response: < 200 Connection established
error: Syscall downloading package manifest vite 🔍 alpinejs [46/48] error: Syscall downloading package manifest alpinejs Response: < 200 Connection established
🔍 tailwindcss [47/48] error: Syscall downloading package manifest tailwindcss Response: < 200 Connection established
🔍 postcss [48/48] error: Syscall downloading package manifest postcss warn: Syscall downloading package manifest @tailwindcss/forms
warn: Syscall downloading package manifest autoprefixer
warn: Syscall downloading package manifest laravel-vite-plugin
warn: Syscall downloading package manifest axios
warn: Syscall downloading package manifest alpinejs
warn: Syscall downloading package manifest postcss
warn: Syscall downloading package manifest tailwindcss
warn: Syscall downloading package manifest vite
warn: Syscall downloading package manifest @tailwindcss/forms
warn: Syscall downloading package manifest autoprefixer
warn: Syscall downloading package manifest axios
warn: Syscall downloading package manifest laravel-vite-plugin
warn: Syscall downloading package manifest postcss
warn: Syscall downloading package manifest alpinejs
warn: Syscall downloading package manifest tailwindcss
warn: Syscall downloading package manifest vite
warn: Syscall downloading package manifest autoprefixer
warn: Syscall downloading package manifest laravel-vite-plugin
warn: Syscall downloading package manifest axios
warn: Syscall downloading package manifest @tailwindcss/forms
warn: Syscall downloading package manifest alpinejs
warn: Syscall downloading package manifest tailwindcss
warn: Syscall downloading package manifest postcss
warn: Syscall downloading package manifest vite
warn: Syscall downloading package manifest autoprefixer
warn: Syscall downloading package manifest axios
warn: Syscall downloading package manifest laravel-vite-plugin
warn: Syscall downloading package manifest @tailwindcss/forms
warn: Syscall downloading package manifest postcss
warn: Syscall downloading package manifest vite
warn: Syscall downloading package manifest alpinejs
warn: Syscall downloading package manifest tailwindcss
warn: Syscall downloading package manifest laravel-vite-plugin
warn: Syscall downloading package manifest axios
warn: Syscall downloading package manifest autoprefixer
warn: Syscall downloading package manifest @tailwindcss/forms
warn: Syscall downloading package manifest alpinejs
warn: Syscall downloading package manifest vite
warn: Syscall downloading package manifest postcss
warn: Syscall downloading package manifest tailwindcss error: @tailwindcss/forms@^0.5.2 failed to resolve error: alpinejs@^3.4.2 failed to resolve error: autoprefixer@^10.4.2 failed to resolve error: axios@^1.6.4 failed to resolve error: laravel-vite-plugin@^1.0 failed to resolve error: postcss@^8.4.31 failed to resolve error: tailwindcss@^3.1.0 failed to resolve error: vite@^5.0 failed to resolve
same here on macOS, with https_proxy
@cirospaciari @Jarred-Sumner any update on this?
@Electroid , @cirospaciari please reopen this, still not working
@seyfu-t can you open a new issue that includes a reproduction? HTTP_PROXY and HTTPS_PROXY do work and have unit tests to verify this, so we're going to need to see more specifically what's not working in order to fix it