1jehuang / 1jehuang/jcode

Feature request: configure HTTP(S) proxy in ~/.jcode/config.toml

Open
#1,083 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

autonomous: no enhancement triage: needs-decision
Dominant language
Rust
Stars
19.9k
Forks
2.3k
Avg merge
2d 7h
Merged PRs (30d)
30

Description

Problem

jcode can work behind a proxy when proxy environment variables are configured outside jcode, but there is no supported proxy setting in ~/.jcode/config.toml.

Current behavior

The HTTP client stack relies on reqwest's system-proxy support, which reads HTTP_PROXY, HTTPS_PROXY, ALL_PROXY, and NO_PROXY.

OpenAI's WebSocket transport is a separate path and does not use reqwest's proxy configuration, so proxy setups can work for HTTP requests but fail for streaming.

Proposed configuration

[network]
proxy = "http://127.0.0.1:7890"
no_proxy = "localhost,127.0.0.1,.internal"

When proxy is unset, preserve the current environment-variable behavior. A configured value should explicitly apply to HTTP and HTTPS requests. Invalid values should produce a clear, redacted error.

Scope

  • Apply the setting to shared async and blocking reqwest clients, provider/auth/tool traffic, updates, telemetry, and embeddings.
  • Keep NO_PROXY behavior, or provide an equivalent TOML setting.
  • Decide whether WebSocket transport should use an HTTP(S) fallback when a proxy is configured, or support HTTP CONNECT explicitly.
  • Avoid copying TOML values into process-wide proxy environment variables.
  • Document whether changing the setting requires a restart.

Issue #974 appears related because it covers SOCKS proxy support for provider traffic. This request is specifically about a first-class TOML setting and consistent HTTP(S) proxy behavior across jcode's network clients.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the configuration handling for ~/.jcode/config.toml, then trace the shared async and blocking reqwest clients and the separate OpenAI WebSocket transport. Check how provider, auth, tool, update, telemetry, and embedding traffic is routed; done means the proxy behavior, NO_PROXY handling, invalid-value errors, WebSocket decision, and restart requirement are defined and documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.