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

socks5 support for http(s)_proxy #193

Open
clement-igonet opened this issue Feb 7, 2025 · 0 comments
Open

socks5 support for http(s)_proxy #193

clement-igonet opened this issue Feb 7, 2025 · 0 comments

Comments

@clement-igonet
Copy link

When installing agent on remote host, wget or curl is used to download mandatory package.

  • wget is the first choice
  • curl is behind

However, when the remote host rely on a socks5 proxy (defining http_proxy/https_proxy env vars):

  • wget does not support socks5 protocol
  • curl does

So, a fix would be to use curl:

  • either curl only (no wget)
  • or curl as a first choice (before wget check)

Before (KO):

    if [[ ! -z $(which wget) ]]; then
        wget --tries=3 --timeout=10 --continue --no-verbose -O vscode-server.tar.gz $SERVER_DOWNLOAD_URL
    elif [[ ! -z $(which curl) ]]; then
        curl --retry 3 --connect-timeout 10 --location --show-error --silent --output vscode-server.tar.gz $SERVER_DOWNLOAD_URL

After (OK):

    if [[ ! -z $(which curl) ]]; then
        curl --retry 3 --connect-timeout 10 --location --show-error --silent --output vscode-server.tar.gz $SERVER_DOWNLOAD_URL
    elif [[ ! -z $(which wget) ]]; then
        wget --tries=3 --timeout=10 --continue --no-verbose -O vscode-server.tar.gz $SERVER_DOWNLOAD_URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant