Skip to content

common : honor no_proxy and warn on malformed URLs - #1

Merged
texasich merged 2 commits into
texasich:fix/proxy-env-vars-http-clientfrom
marecabo:proxy-env-vars-addons
Sep 5, 2026
Merged

texasich merged 2 commits into
texasich:fix/proxy-env-vars-http-clientfrom
marecabo:proxy-env-vars-addons

Conversation

@marecabo

@marecabo marecabo commented Sep 5, 2026 •

Copy link
Copy Markdown

Overview

This addresses the two review comments of #21752:

  • Adds honoring of NO_PROXY/no_proxy env vars and update readme
    • required since 2026-07-08 to ensure CLI loopback #24948 is not sent to proxy
  • Adds logging for malformed proxy URLs

Additional information

On top of this branch proxy-env-vars-addons, I merged master back in branch proxy-env-vars-merged (cc576d1), see ggml-org/llama.cpp@master...marecabo:llama.cpp:proxy-env-vars-merged. There was just one small readme conflict.

I tested this merged branch locally on RHEL 9 with ZScaler successfully:

$ export proxy=http://... # your proxy here

$ http_proxy= https_proxy= no_proxy= llama download -hf ggml-org/Qwen3.5-0.8B-GGUF
0.00.039.245 E get_repo_commit: error: HTTPLIB failed: Could not establish connection
error: model download failed

$ http_proxy= https_proxy=nonsense no_proxy= llama serve -hf ggml-org/Qwen3.5-0.8B-GGUF
0.00.036.272 W common_http_client: ignoring malformed proxy URL from the environment: invalid URL: no scheme
0.00.044.224 E get_repo_commit: error: HTTPLIB failed: Could not establish connection
0.00.044.227 W get_repo_files: failed to resolve commit for ggml-org/Qwen3.5-0.8B-GGUF
...

$ http_proxy=$proxy https_proxy=$proxy no_proxy= llama download -hf ggml-org/Qwen3.5-0.8B-GGUF
Downloading Qwen3.5-0.8B-Q8_0.gguf ───────────────────────────────── 100%
/home/***/.cache/huggingface/hub/models--ggml-org--Qwen3.5-0.8B-GGUF/snapshots/8fea620810c4afa23dd6443f999a48574c1611a3/Qwen3.5-0.8B-Q8_0.gguf

$ http_proxy=http://127.0.0.1:1 https_proxy=$proxy no_proxy= llama cli -hf ggml-org/Qwen3.5-0.8B-GGUF
Loading model...  # <-- hangs -> CTRL+C

$ http_proxy=http://127.0.0.1:1 https_proxy=$proxy no_proxy=127.0.0.1 llama cli -hf ggml-org/Qwen3.5-0.8B-GGUF
Loading model...  

▄▄ ▄▄
██ ██
██ ██  ▀▀█▄ ███▄███▄  ▀▀█▄    ▄████ ████▄ ████▄
██ ██ ▄█▀██ ██ ██ ██ ▄█▀██    ██    ██ ██ ██ ██
██ ██ ▀█▄██ ██ ██ ██ ▀█▄██ ██ ▀████ ████▀ ████▀
                                    ██    ██
                                    ▀▀    ▀▀

build      : b10824-cc576d166
model      : ggml-org/Qwen3.5-0.8B-GGUF
ftype      : Q8_0
modalities : text
...

Requirements

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 5, 2026
@marecabo
marecabo force-pushed the proxy-env-vars-addons branch from 14db3ae to 887bed7 Compare September 5, 2026 11:59

@texasich texasich left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@texasich
texasich merged this pull request into texasich:fix/proxy-env-vars-http-client Sep 5, 2026
1 check passed
@marecabo
marecabo deleted the proxy-env-vars-addons branch September 5, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants