mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Add mock support for public ports to test resolver
This commit is contained in:
parent
106f26b27b
commit
e5dd4b6e4b
|
@ -9,7 +9,9 @@
|
|||
"engines": {
|
||||
"vscode": "^1.25.0"
|
||||
},
|
||||
"extensionKind": [ "ui" ],
|
||||
"extensionKind": [
|
||||
"ui"
|
||||
],
|
||||
"scripts": {
|
||||
"compile": "node ./node_modules/vscode/bin/compile -watch -p ./",
|
||||
"vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:vscode-test-resolver"
|
||||
|
@ -121,10 +123,13 @@
|
|||
"description": "If set, connection is paused",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"testresolver.supportPublicPorts": {
|
||||
"description": "If set, the test resolver tunnel factory will support mock public ports. Forwarded ports will not actually be public. Requires reload.",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -216,7 +216,7 @@ export function activate(context: vscode.ExtensionContext) {
|
|||
}, (progress) => doResolve(_authority, progress));
|
||||
},
|
||||
tunnelFactory,
|
||||
tunnelFeatures: { elevation: true, public: false },
|
||||
tunnelFeatures: { elevation: true, public: !!vscode.workspace.getConfiguration('testresolver').get('supportPublicPorts') },
|
||||
showCandidatePort
|
||||
});
|
||||
context.subscriptions.push(authorityResolverDisposable);
|
||||
|
@ -358,7 +358,7 @@ async function tunnelFactory(tunnelOptions: vscode.TunnelOptions, tunnelCreation
|
|||
return {
|
||||
localAddress,
|
||||
remoteAddress: tunnelOptions.remoteAddress,
|
||||
public: tunnelOptions.public,
|
||||
public: !!vscode.workspace.getConfiguration('testresolver').get('supportPublicPorts') && tunnelOptions.public,
|
||||
onDidDispose: onDidDispose.event,
|
||||
dispose: () => {
|
||||
if (!isDisposed) {
|
||||
|
|
Loading…
Reference in a new issue