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

Proxy support for npx gulp vsDebugServer #1955

Open
relief-melone opened this issue Feb 29, 2024 · 3 comments
Open

Proxy support for npx gulp vsDebugServer #1955

relief-melone opened this issue Feb 29, 2024 · 3 comments
Assignees
Labels
feature-request Request for new features or functionality

Comments

@relief-melone
Copy link
Contributor

vscode-js-debug is being used in e.g. nvim. To make use of debugging it's dap plugin needs to build a vscode-js-debug instance. This works fine usually running

npx gulp vsDebugServerBundle

However it woll not work behind corporate proxies because in the gulp task l10n:bundle-download got is being used to fetch the vscode-loc repo. got does not nativly support proxy variables like https_proxy. Suggestion would be to add support with something like this (

const HttpsProxyAgent = require("hpagent").HttpsProxyAgent;
//...
gulp.task('l10n:bundle-download', async () => {
  const opts = {};
  const proxy = process.env.https_proxy || process.env.HTTPS_PROXY || null;
  if (proxy)
    opts.agent = {
      https: new HttpsProxyAgent({
        keepAlive: true,
	keepAliveMsecs: 1000,
	maxSockets: 256,
	maxFreeSockets: 256,
	scheduling: 'lifo',
	proxy
      })
    };
    
  const res = await got('https://github.com/microsoft/vscode-loc/archive/main.zip', opts).buffer();

  //...

if this finds acceptance I'd gladly submit a PR

@relief-melone relief-melone added the feature-request Request for new features or functionality label Feb 29, 2024
@relief-melone relief-melone changed the title Proxy support for build Proxy support for npx gulp vsDebugServer Feb 29, 2024
@connor4312
Copy link
Member

Sure, I would take a PR, https-proxy-agent is the module we normally use

Also note that we have been publishing a standard DAP server to our GH releases for a while. nvim-dap may want to move over to that...

@relief-melone
Copy link
Contributor Author

Alright. Will check that module out as well and create that pr. Forked it for now and can confirm that it does build behind the proxy now

@relief-melone
Copy link
Contributor Author

#1965

Took a little longer due to vacation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

2 participants