feat(duo): add direct proxy setting for LSP traffic

Summary

Adds a VS Code setting that forwards direct Duo proxy mode to the GitLab language server.

Scope

  • Adds gitlab.duo.proxy.directConnection to the GitLab Duo settings category.
  • Scopes the setting to the current machine so workspace configuration and Settings Sync cannot change proxy routing.
  • Reads the setting through the extension configuration service.
  • Sends duo.proxy.mode as direct when enabled and inherit when disabled.
  • Keeps VS Code HTTP proxy settings unchanged for other extension and editor traffic.

Contract References

  • Requires @gitlab-org/gitlab-lsp 9.7.0, which contains gitlab-org/editor-extensions/gitlab-lsp!3462 (merged) and exposes duo.proxy.mode on ClientConfig.
  • The default false value maps to inherit so current proxy behavior is preserved.
  • The true value maps to direct for scoped GitLab and Duo traffic handled by the language server.

Change Details

  • Added the machine-scoped boolean setting to package.json with Duo category ordering.
  • Added extension configuration typing and parsing for duo.proxy.directConnection.
  • Extended the language server configuration payload with duo.proxy.mode using the published ClientConfig contract.
  • Updated the LSP dependency and lockfile to 9.7.0.
  • Added tests for config parsing, sync payload mapping, setting scope, and package setting order.

Validation Evidence

  • Clean npm ci dependency installation.
  • Prettier check on touched files and the lockfile.
  • ESLint on touched TypeScript files.
  • Focused Jest suites: 3 passed, 53 tests passed.
  • TypeScript compilation with no emitted output.
  • Full Jest suite: 290 passed, 2,482 tests passed.
  • Production VSIX packaging.

Risks and Follow-ups

  • The direct mode is opt-in and preserves inherited proxy behavior by default.
  • Custom proxy URL mode is intentionally not included.
  • JetBrains and docs are handled in separate MRs.

Issue Reference

Relates to gitlab-org/editor-extensions/gitlab-lsp#2490 (closed)

Edited by primetheus

Merge request reports

Loading
Loading