williamboman / mason.nvim

Portable package manager for Neovim that runs everywhere Neovim runs. Easily install and manage LSP servers, DAP servers, linters, and formatters.
Apache License 2.0
7.22k stars 258 forks source link

LSP components are not loaded through the proxy specified in the configuration #1697

Open Re3w opened 2 months ago

Re3w commented 2 months ago

I've searched open issues for similar requests

I've recently downloaded the latest plugin version of mason.nvim

Problem description

Good day, dear developer!

I enjoy using your tool in my daily work and would like to continue!

Unfortunately, curl and wget requests to external sources via direct links are forbidden in my organization.

You have a wonderful parameter in your configuration, github = { download_url_template = ... }, with which I solved the problem with registry synchronization and downloading LSP servers. But the installation of LSP servers does not go completely through the specified parameter github = { download_url_template = ... }.

Attached are the requests:

curl -H User-Agent: mason.nvim v1.10.0 (+https://github.com/williamboman/mason.nvim) -fsSL -X GET --connect-timeout 30 https://raw.githubusercontent.com/rust-analyzer/rust-analyzer/2024-04-22/editors/code/package.json

curl -H User-Agent: mason.nvim v1.10.0 (+https://github.com/williamboman/mason.nvim) -fsSL -X GET -o /home/users/.local/share/nvim/mason/staging/jdtls/./jdtls.tar.gz --connect-timeout 30 https://download.eclipse.org/jdtls/milestones/1.34.0/jdt-language-server-1.34.0-202404031240.tar.gz

curl -H User-Agent: mason.nvim v1.10.0 (+https://github.com/williamboman/mason.nvim) -fsSL -X GET -o /home/users/.local/share/nvim/mason/staging/jdtls/./lombok.jar --connect-timeout 30 https://projectlombok.org/downloads/lombok.jar

wget --header=User-Agent: mason.nvim v1.10.0 (+https://github.com/williamboman/mason.nvim) -nv -o /dev/null -O /home/users/.local/share/nvim/mason/staging/jdtls/./lombok.jar --timeout=30 --method=GET https://projectlombok.org/downloads/lombok.jar

Expected behavior

All downloads of LSP components and their dependencies are expected to go through the parameter github = { download_url_template = http://someproxy/ }

Affected packages

rust-analyzer, jdtls, may be All

Mason output

No response

Installation log

[DEBUG Пт 26 апр 2024 10:49:58] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:162: Spawned with pid 42293
[DEBUG Пт 26 апр 2024 10:49:58] .../.local/share/nvim/lazy/mason.nvim/lua/mason-core/fs.lua:71: fs: mkdirp /home/user/.local/share/nvim/mason/staging/rust-analyzer
[DEBUG Пт 26 апр 2024 10:49:58] ...zy/mason.nvim/lua/mason-core/installer/registry/init.lua:149: Compiling installer. jdtls Package(name=jdtls)
[DEBUG Пт 26 апр 2024 10:49:58] ...azy/mason.nvim/lua/mason-core/installer/managers/std.lua:96: std: downloading file "https://download.eclipse.org/jdtls/milestones/1.34.0/jdt-language-server-1.34.0-202404031240.tar.gz"
[DEBUG Пт 26 апр 2024 10:49:58] ...ocal/share/nvim/lazy/mason.nvim/lua/mason-core/fetch.lua:37: Fetching URL "https://download.eclipse.org/jdtls/milestones/1.34.0/jdt-language-server-1.34.0-202404031240.tar.gz"
[DEBUG Пт 26 апр 2024 10:49:58] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:116: Spawning cmd="curl", spawn_opts={
  args = { "-H", "User-Agent: mason.nvim v1.10.0 (+https://github.com/williamboman/mason.nvim)", "-fsSL", "-X", "GET", "-o", "/home/user/.local/share/nvim/mason/staging/jdtls/./jdtls.tar.gz", "--connect-timeout", 30, "https://download.eclipse.org/jdtls/milestones/1.34.0/jdt-language-server-1.34.0-202404031240.tar.gz" }
}
[DEBUG Пт 26 апр 2024 10:49:58] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:162: Spawned with pid 42300
[DEBUG Пт 26 апр 2024 10:49:58] ...zy/mason.nvim/lua/mason-core/installer/registry/init.lua:149: Compiling installer. rust-analyzer Package(name=rust-analyzer)
[DEBUG Пт 26 апр 2024 10:49:58] ...azy/mason.nvim/lua/mason-core/installer/managers/std.lua:96: std: downloading file "https://token:AuthToken@github_proxy/repo/extras/github_api/rust-lang/rust-analyzer/releases/download/2024-04-22/rust-analyzer-x86_64-unknown-linux-gnu.gz"
[DEBUG Пт 26 апр 2024 10:49:58] ...ocal/share/nvim/lazy/mason.nvim/lua/mason-core/fetch.lua:37: Fetching URL "https://token:AuthToken@github_proxy/repo/extras/github_api/rust-lang/rust-analyzer/releafes/download/2024-04-22/rust-analyzer-x86_64-unknown-linux-gnu.gz"
[DEBUG Пт 26 апр 2024 10:49:58] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:116: Spawning cmd="curl", spawn_opts={
  args = { "-H", "User-Agent: mason.nvim v1.10.0 (+https://github.com/williamboman/mason.nvim)", "-fsSL", "-X", "GET", "-o", "/home/user/.local/share/nvim/mason/staging/rust-analyzer/./rust-analyzer-x86_64-unknown-linux-gnu.gz", "--connect-timeout", 30, "https://token:AuthToken@github_proxy/repo/extras/github_api/rust-lang/rust-analyzer/releases/download/2024-04-22/rust-analyzer-x86_64-unknown-linux-gnu.gz" }
}

Neovim version (>= 0.7)

NVIM v0.9.5 Build type: Release LuaJIT 2.1.1692716794

Operating system/version

Linux 6.5.0-0-amd64 #1 SMP PREEMPT_DYNAMIC 6.5.8-1 (2023-10-20) x86_64 GNU/Linux

Healthcheck

mason: require("mason.health").check()

mason.nvim ~
- OK mason.nvim version v1.10.0
- OK PATH: prepend
- OK Providers:
  mason.providers.client
- OK neovim version >= 0.7.0

mason.nvim [Registries] ~
- OK Registry `github.com/mason-org/mason-registry version: 2024-04-23-very-court` is installed.

mason.nvim [Core utils] ~
- OK unzip: `UnZip 6.00 of 20 April 2009, by Debian. Original by Info-ZIP.`
- OK wget: `GNU Wget 1.21.4 для linux-gnu.`
- OK curl: `curl 8.5.0 (x86_64-pc-linux-gnu) libcurl/8.5.0 OpenSSL/3.1.5 zlib/1.3 brotli/1.0.9 zstd/1.5.5 libidn2/2.3.4 libpsl/0.21.2 (+libidn2/2.3.4) libssh2/1.11.0 nghttp2/1.58.0 librtmp/2.3 OpenLDAP/2.5.13`
- OK gzip: `gzip 1.12`
- OK tar: `tar (GNU tar) 1.35`
- OK bash: `GNU bash, версия 5.2.15(1)-release (x86_64-pc-linux-gnu)`
- OK sh: `Ok`

mason.nvim [Languages] ~
- WARNING luarocks: not available
  - ADVICE:
    - spawn: luarocks failed with exit code - and signal -. luarocks is not executable
- OK Go: `go version go1.22.0 linux/amd64`
- WARNING Composer: not available
  - ADVICE:
    - spawn: composer failed with exit code - and signal -. composer is not executable
- OK Ruby: `ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux-gnu]`
- OK PHP: `PHP 8.2.10 (cli) (built: Sep  5 2023 05:43:15) (NTS)`
- OK cargo: `cargo 1.71.1 (7f1d04c00 2023-07-29)`
- OK node: `v18.18.2`
- WARNING julia: not available
  - ADVICE:
    - spawn: julia failed with exit code - and signal -. julia is not executable
- OK python: `Python 3.11.6`
- OK java: `openjdk version "17.0.10" 2024-01-16`
- OK JAVA_HOME: `openjdk version "17.0.2" 2022-01-18`
- WARNING pip: not available
  - ADVICE:
    - spawn: python3 failed with exit code 1 and signal 0. /usr/bin/python3: No module named pip

- OK RubyGem: `3.4.20`
- OK python venv: `Ok`
- OK javac: `javac 17.0.2`
- OK npm: `9.8.1`

mason.nvim [GitHub] ~
- OK GitHub API rate limit. Used: 12. Remaining: 48. Limit: 60. Reset: Пт 03 мая 2024 14:41:57.
  Install and authenticate via gh-cli to increase rate limit.

Screenshots

No response

fabiomcosta commented 3 weeks ago

Have you tried the http_proxy env variable? https://everything.curl.dev/usingcurl/proxies/env.html

Re3w commented 1 week ago

Have you tried the http_proxy env variable? https://everything.curl.dev/usingcurl/proxies/env.html

Good afternoon, unfortunately my organization does not implement a proxy for github. We use endpoint with different routes, that's the problem.

Packets are downloaded from github fine.

When these packets receive dependencies or raw content, the requests bypass the endpoint.

I still haven't found a solution(