src/vs/workbench/services/remote/common/remoteExplorerService.ts/TunnelModel/getAttributes
class TunnelModel:	async getAttributes(ports: number[], checkProviders: boolean = true): Promise<Map<number, Attributes> | undefined> {
		const matchingCandidates: Map<number, CandidatePort> = new Map();
		const pidToPortsMapping: Map<number | undefined, number[]> = new Map();
		ports.forEach(port => {
			const matchingCandidate = mapHasAddressLocalhostOrAllInterfaces<CandidatePort>(this._candidates ?? new Map(), LOCALHOST_ADDRESSES[0], port);
			if (matchingCandidate) {
				matchingCandidates.set(port, matchingCandidate);
				if (!pidToPortsMapping.has(matchingCandidate.pid)) {
					pidToPortsMapping.set(matchingCandidate.pid, []);
				}
				pidToPortsMapping.get(matchingCandidate.pid)?.push(port);
			}
		});

		const configAttributes: Map<number, Attributes> = new Map();
		ports.forEach(port => {
			const attributes = this.configPortsAttributes.getAttributes(port, matchingCandidates.get(port)?.detail);
			if (attributes) {
				configAttributes.set(port, attributes);
			}
		});
		if ((this.portAttributesProviders.length === 0) || !checkProviders) {
			return (configAttributes.size > 0) ? configAttributes : undefined;
		}

		// Group calls to provide attributes by pid.
		const allProviderResults = await Promise.all(flatten(this.portAttributesProviders.map(provider => {
			return Array.from(pidToPortsMapping.entries()).map(entry => {
				const portGroup = entry[1];
				const matchingCandidate = matchingCandidates.get(portGroup[0]);
				return provider.providePortAttributes(portGroup,
					matchingCandidate?.pid, matchingCandidate?.detail, new CancellationTokenSource().token);
			});
		})));
		const providedAttributes: Map<number, ProvidedPortAttributes> = new Map();
		allProviderResults.forEach(attributes => attributes.forEach(attribute => {
			if (attribute) {
				providedAttributes.set(attribute.port, attribute);
			}
		}));

		if (!configAttributes && !providedAttributes) {
			return undefined;
		}

		// Merge. The config wins.
		const mergedAttributes: Map<number, Attributes> = new Map();
		ports.forEach(port => {
			const config = configAttributes.get(port);
			const provider = providedAttributes.get(port);
			mergedAttributes.set(port, {
				elevateIfNeeded: config?.elevateIfNeeded,
				label: config?.label,
				onAutoForward: config?.onAutoForward ?? PortsAttributes.providedActionToAction(provider?.autoForwardAction),
				requireLocalPort: config?.requireLocalPort,
				protocol: config?.protocol
			});
		});

		return mergedAttributes;
	}