Loading
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.directConnectionto 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.modeasdirectwhen enabled andinheritwhen disabled. - Keeps VS Code HTTP proxy settings unchanged for other extension and editor traffic.
Contract References
- Requires
@gitlab-org/gitlab-lsp9.7.0, which contains gitlab-org/editor-extensions/gitlab-lsp!3462 (merged) and exposesduo.proxy.modeonClientConfig. - The default
falsevalue maps toinheritso current proxy behavior is preserved. - The
truevalue maps todirectfor scoped GitLab and Duo traffic handled by the language server.
Change Details
- Added the machine-scoped boolean setting to
package.jsonwith Duo category ordering. - Added extension configuration typing and parsing for
duo.proxy.directConnection. - Extended the language server configuration payload with
duo.proxy.modeusing the publishedClientConfigcontract. - 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 cidependency 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