ports.ts ×5

Frontier kind: Code frontier

unlabeled · c_c28349d62d7c

32 tests · 5200 LOC · 28 files · introduces 0 tests · 109 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges109 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
748 ranges5200 lines · 28 files · Browse complete extent
All tests (intent)
32 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Introduced files, introduced tests, and structurally relevant concept specializationextHostTunnelService.ts ×3 · 22 introduced LOCextHostTunnelService.ts …extHostTunnelService.ts ×2 · 21 introduced LOCextHostTunnelService.ts …extHostTunnelService.ts ×4 · 38 introduced LOCextHostTunnelService.ts …extHostTunnelService.ts ×2 · 23 introduced LOCextHostTunnelService.ts …extHostTunnelService.ts ×1 · 9 introduced LOCextHostTunnelService.ts …extHostTunnelService.ts ×1 · 17 introduced LOCextHostTunnelService.ts …remoteAgentConnection.ts ×53 · 823 introduced LOCremoteAgentConnection.ts…tunnelProxy.test|title=TunnelProxy managed (non-NodeSocket) transport CONNECT tunnels bidirectional data through a managed socket|occurrence=1 · 0 introduced LOCtunnelProxy.test|title=T…tunnelProxy.test|title=TunnelProxy managed (non-NodeSocket) transport forwards an authenticated HTTP GET through a managed socket|occurrence=1 · 0 introduced LOCtunnelProxy.test|title=T…tunnelProxy.test|title=TunnelProxy managed (non-NodeSocket) transport dispose disposes the managed remote socket via the adapter|occurrence=1 · 0 introduced LOCtunnelProxy.test|title=T…tunnelProxy.ts ×1 · 6 introduced LOCtunnelProxy.ts ×1tunnelProxy.ts ×2 · 6 introduced LOCtunnelProxy.ts ×2tunnelProxy.test|title=TunnelProxy dispose terminates active CONNECT tunnels|occurrence=1, tunnelProxy.test|title=TunnelProxy CONNECT establishes a tunnel to the target|occurrence=1, +1 · 0 introduced LOCtunnelProxy.test|title=T…tunnelProxy.test|title=TunnelProxy forwards authenticated HTTP GET to target|occurrence=1, tunnelProxy.test|title=TunnelProxy forwards authenticated HTTP POST to target|occurrence=1, +4 · 0 introduced LOCtunnelProxy.test|title=T…tunnelProxy.ts ×2 · 11 introduced LOCtunnelProxy.ts ×2tunnelProxy.ts ×5 · 21 introduced LOCtunnelProxy.ts ×5tunnelProxy.ts ×4 · 20 introduced LOCtunnelProxy.ts ×4tunnelProxy.ts ×3 · 9 introduced LOCtunnelProxy.ts ×3tunnelProxy.ts ×10 · 66 introduced LOCtunnelProxy.ts ×10tunnelProxy.ts ×1 · 14 introduced LOCtunnelProxy.ts ×1tunnelProxy.ts ×1 · 1 introduced LOCtunnelProxy.ts ×1tunnelProxy.ts ×2 · 9 introduced LOCtunnelProxy.ts ×2tunnelProxy.ts ×2 · 6 introduced LOCtunnelProxy.ts ×2tunnelProxy.ts ×7 · 27 introduced LOCtunnelProxy.ts ×7tunnelProxy.ts ×1 · 2 introduced LOCtunnelProxy.ts ×1tunnelProxy.ts ×3 · 17 introduced LOCtunnelProxy.ts ×3tunnelProxy.ts ×1 · 4 introduced LOCtunnelProxy.ts ×1tunnelProxy.ts ×1 · 8 introduced LOCtunnelProxy.ts ×1tunnelProxy.ts ×5 · 11 introduced LOCtunnelProxy.ts ×5tunnelProxy.ts ×4 · 13 introduced LOCtunnelProxy.ts ×4tunnelProxy.ts ×1 · 2 introduced LOCtunnelProxy.ts ×1tunnelProxy.ts ×20 · 329 introduced LOCtunnelProxy.ts ×20debugAdapter.ts ×2 · 4 introduced LOCdebugAdapter.ts ×2debugAdapter.ts ×2 · 4 introduced LOCdebugAdapter.ts ×2debugAdapter.ts ×9 · 88 introduced LOCdebugAdapter.ts ×9ports.ts ×1 · 3 introduced LOCports.ts ×1ports.ts ×9 · 48 introduced LOCports.ts ×9extpath.ts ×17 · 91 introduced LOCextpath.ts ×17strings.ts ×101 · 542 introduced LOCstrings.ts ×101cancellation.ts ×18 · 90 introduced LOCcancellation.ts ×18event.ts ×93 · 864 introduced LOCevent.ts ×93utils.ts ×3 · 9 introduced LOCutils.ts ×3linkedList.ts ×13 · 44 introduced LOClinkedList.ts ×13lifecycle.ts ×2 · 4 introduced LOClifecycle.ts ×2lifecycle.ts ×4 · 8 introduced LOClifecycle.ts ×4lifecycle.ts ×6 · 16 introduced LOClifecycle.ts ×6lazy.ts ×1 · 2 introduced LOClazy.ts ×1lazy.ts ×3 · 37 introduced LOClazy.ts ×3lifecycle.ts ×1 · 2 introduced LOClifecycle.ts ×1lifecycle.ts ×1 · 2 introduced LOClifecycle.ts ×1uint.ts ×2 · 43 introduced LOCuint.ts ×2lifecycle.ts ×1 · 3 introduced LOClifecycle.ts ×1map.ts ×97 · 3334 introduced LOCmap.ts ×97src/vs/base/common/arrays.ts · 949 LOCcommon/arrays.tssrc/vs/base/common/arraysFind.ts · 226 LOCcommon/arraysFind.tssrc/vs/base/common/assert.ts · 91 LOCcommon/assert.tssrc/vs/base/common/cache.ts · 153 LOCcommon/cache.tssrc/vs/base/common/cancellation.ts · 206 LOCcommon/cancellation.tssrc/vs/base/common/charCode.ts · 450 LOCcommon/charCode.tssrc/vs/base/common/collections.ts · 176 LOCcommon/collections.tssrc/vs/base/common/errors.ts · 357 LOCcommon/errors.tssrc/vs/base/common/event.ts · 1964 LOCcommon/event.tssrc/vs/base/common/extpath.ts · 433 LOCcommon/extpath.tssrc/vs/base/common/functional.ts · 32 LOCcommon/functional.tssrc/vs/base/common/iterator.ts · 194 LOCcommon/iterator.tssrc/vs/base/common/lazy.ts · 57 LOCcommon/lazy.tssrc/vs/base/common/lifecycle.ts · 974 LOCcommon/lifecycle.tssrc/vs/base/common/linkedList.ts · 151 LOCcommon/linkedList.tssrc/vs/base/common/map.ts · 1016 LOCcommon/map.tssrc/vs/base/common/marshallingIds.ts · 33 LOCcommon/marshallingIds.tssrc/vs/base/common/path.ts · 1589 LOCcommon/path.tssrc/vs/base/common/platform.ts · 281 LOCcommon/platform.tssrc/vs/base/common/process.ts · 76 LOCcommon/process.tssrc/vs/base/common/stopwatch.ts · 41 LOCcommon/stopwatch.tssrc/vs/base/common/strings.ts · 1413 LOCcommon/strings.tssrc/vs/base/common/types.ts · 410 LOCcommon/types.tssrc/vs/base/common/uint.ts · 59 LOCcommon/uint.tssrc/vs/base/common/uri.ts · 754 LOCcommon/uri.tssrc/vs/base/node/ports.ts · 211 LOCnode/ports.tssrc/vs/base/test/common/utils.ts · 107 LOCcommon/utils.tssrc/vs/nls.ts · 244 LOCvs/nls.tssrc/vs/platform/remote/common/managedSocket.ts · 145 LOCcommon/managedSocket.tssrc/vs/platform/remote/common/remoteAgentConnection.ts · 839 LOCcommon/remoteAgentConnec…src/vs/platform/remote/common/remoteSocketFactoryService.ts · 60 LOCcommon/remoteSocketFacto…src/vs/platform/sign/common/sign.ts · 22 LOCcommon/sign.tssrc/vs/platform/tunnel/node/tunnelProxy.ts · 599 LOCnode/tunnelProxy.tssrc/vs/platform/tunnel/node/tunnelService.ts · 265 LOCnode/tunnelService.tssrc/vs/workbench/api/node/extHostTunnelService.ts · 419 LOCnode/extHostTunnelServic…src/vs/workbench/contrib/debug/common/abstractDebugAdapter.ts · 226 LOCcommon/abstractDebugAdap…src/vs/workbench/contrib/debug/node/debugAdapter.ts · 404 LOCnode/debugAdapter.tssrc/vs/workbench/services/remote/common/tunnelModel.ts · 1042 LOCcommon/tunnelModel.tsport.test|title=Ports Finds a free port (no timeout)|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/node/port.test|title=Ports Finds a free port (no timeout)|occurrence=1port.test|title=Ports Fi…tunnelProxy.test|title=TunnelProxy CONNECT establishes a tunnel to the target|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/tunnel/test/node/tunnelProxy.test|title=TunnelProxy CONNECT establishes a tunnel to the target|occurrence=1tunnelProxy.test|title=T…tunnelProxy.test|title=TunnelProxy CONNECT rejects invalid port 0|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/tunnel/test/node/tunnelProxy.test|title=TunnelProxy CONNECT rejects invalid port 0|occurrence=1tunnelProxy.test|title=T…tunnelProxy.test|title=TunnelProxy CONNECT rejects port > 65535|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/tunnel/test/node/tunnelProxy.test|title=TunnelProxy CONNECT rejects port > 65535|occurrence=1tunnelProxy.test|title=T…tunnelProxy.test|title=TunnelProxy a reset on a pooled tunnel socket does not escalate to an uncaught exception|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/tunnel/test/node/tunnelProxy.test|title=TunnelProxy a reset on a pooled tunnel socket does not escalate to an uncaught exception|occurrence=1tunnelProxy.test|title=T…tunnelProxy.test|title=TunnelProxy dispose shuts down the server|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/tunnel/test/node/tunnelProxy.test|title=TunnelProxy dispose shuts down the server|occurrence=1tunnelProxy.test|title=T…tunnelProxy.test|title=TunnelProxy dispose synchronously destroys the remote tunnel socket|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/tunnel/test/node/tunnelProxy.test|title=TunnelProxy dispose synchronously destroys the remote tunnel socket|occurrence=1tunnelProxy.test|title=T…tunnelProxy.test|title=TunnelProxy dispose terminates CONNECT sockets stuck waiting for the upstream tunnel|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/tunnel/test/node/tunnelProxy.test|title=TunnelProxy dispose terminates CONNECT sockets stuck waiting for the upstream tunnel|occurrence=1tunnelProxy.test|title=T…tunnelProxy.test|title=TunnelProxy dispose terminates active CONNECT tunnels|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/tunnel/test/node/tunnelProxy.test|title=TunnelProxy dispose terminates active CONNECT tunnels|occurrence=1tunnelProxy.test|title=T…tunnelProxy.test|title=TunnelProxy dispose terminates idle HTTPS keep-alive connections|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/tunnel/test/node/tunnelProxy.test|title=TunnelProxy dispose terminates idle HTTPS keep-alive connections|occurrence=1tunnelProxy.test|title=T…tunnelProxy.test|title=TunnelProxy drainConnectionPool destroys pooled tunnel sockets|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/tunnel/test/node/tunnelProxy.test|title=TunnelProxy drainConnectionPool destroys pooled tunnel sockets|occurrence=1tunnelProxy.test|title=T…tunnelProxy.test|title=TunnelProxy fails the request when the tunnel connection fails|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/tunnel/test/node/tunnelProxy.test|title=TunnelProxy fails the request when the tunnel connection fails|occurrence=1tunnelProxy.test|title=T…tunnelProxy.test|title=TunnelProxy forwards authenticated HTTP GET to target|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/tunnel/test/node/tunnelProxy.test|title=TunnelProxy forwards authenticated HTTP GET to target|occurrence=1tunnelProxy.test|title=T…tunnelProxy.test|title=TunnelProxy forwards authenticated HTTP POST to target|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/tunnel/test/node/tunnelProxy.test|title=TunnelProxy forwards authenticated HTTP POST to target|occurrence=1tunnelProxy.test|title=T…tunnelProxy.test|title=TunnelProxy managed (non-NodeSocket) transport CONNECT tunnels bidirectional data through a managed socket|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/tunnel/test/node/tunnelProxy.test|title=TunnelProxy managed (non-NodeSocket) transport CONNECT tunnels bidirectional data through a managed socket|occurrence=1tunnelProxy.test|title=T…tunnelProxy.test|title=TunnelProxy managed (non-NodeSocket) transport dispose disposes the managed remote socket via the adapter|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/tunnel/test/node/tunnelProxy.test|title=TunnelProxy managed (non-NodeSocket) transport dispose disposes the managed remote socket via the adapter|occurrence=1tunnelProxy.test|title=T…tunnelProxy.test|title=TunnelProxy managed (non-NodeSocket) transport forwards an authenticated HTTP GET through a managed socket|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/tunnel/test/node/tunnelProxy.test|title=TunnelProxy managed (non-NodeSocket) transport forwards an authenticated HTTP GET through a managed socket|occurrence=1tunnelProxy.test|title=T…tunnelProxy.test|title=TunnelProxy rejects CONNECT without credentials (407)|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/tunnel/test/node/tunnelProxy.test|title=TunnelProxy rejects CONNECT without credentials (407)|occurrence=1tunnelProxy.test|title=T…tunnelProxy.test|title=TunnelProxy rejects plain HTTP request without credentials (407)|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/tunnel/test/node/tunnelProxy.test|title=TunnelProxy rejects plain HTTP request without credentials (407)|occurrence=1tunnelProxy.test|title=T…tunnelProxy.test|title=TunnelProxy returns 400 for malformed URL|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/tunnel/test/node/tunnelProxy.test|title=TunnelProxy returns 400 for malformed URL|occurrence=1tunnelProxy.test|title=T…tunnelProxy.test|title=TunnelProxy reuses tunnel socket for multiple requests to the same host|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/tunnel/test/node/tunnelProxy.test|title=TunnelProxy reuses tunnel socket for multiple requests to the same host|occurrence=1tunnelProxy.test|title=T…tunnelProxy.test|title=TunnelProxy server uses TLS|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/tunnel/test/node/tunnelProxy.test|title=TunnelProxy server uses TLS|occurrence=1tunnelProxy.test|title=T…tunnelProxy.test|title=TunnelProxy start returns a valid ITunnelProxyInfo|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/tunnel/test/node/tunnelProxy.test|title=TunnelProxy start returns a valid ITunnelProxyInfo|occurrence=1tunnelProxy.test|title=T…tunnelProxy.test|title=TunnelProxy strips hop-by-hop headers from forwarded request|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/platform/tunnel/test/node/tunnelProxy.test|title=TunnelProxy strips hop-by-hop headers from forwarded request|occurrence=1tunnelProxy.test|title=T…extHostTunnelService.test|title=ExtHostTunnelService findPorts|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/api/test/node/extHostTunnelService.test|title=ExtHostTunnelService findPorts|occurrence=1extHostTunnelService.tes…extHostTunnelService.test|title=ExtHostTunnelService getSockets|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/api/test/node/extHostTunnelService.test|title=ExtHostTunnelService getSockets|occurrence=1extHostTunnelService.tes…extHostTunnelService.test|title=ExtHostTunnelService loadConnectionTable|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/api/test/node/extHostTunnelService.test|title=ExtHostTunnelService loadConnectionTable|occurrence=1extHostTunnelService.tes…extHostTunnelService.test|title=ExtHostTunnelService loadListeningPorts|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/api/test/node/extHostTunnelService.test|title=ExtHostTunnelService loadListeningPorts|occurrence=1extHostTunnelService.tes…extHostTunnelService.test|title=ExtHostTunnelService parseIpAddress|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/api/test/node/extHostTunnelService.test|title=ExtHostTunnelService parseIpAddress|occurrence=1extHostTunnelService.tes…extHostTunnelService.test|title=ExtHostTunnelService tryFindRootPorts|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/api/test/node/extHostTunnelService.test|title=ExtHostTunnelService tryFindRootPorts|occurrence=1extHostTunnelService.tes…streamDebugAdapter.test|title=Debug - StreamDebugAdapter StreamDebugAdapter (NamedPipeDebugAdapter) can initialize a connection|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/contrib/debug/test/node/streamDebugAdapter.test|title=Debug - StreamDebugAdapter StreamDebugAdapter (NamedPipeDebugAdapter) can initialize a connection|occurrence=1streamDebugAdapter.test|…streamDebugAdapter.test|title=Debug - StreamDebugAdapter StreamDebugAdapter (SocketDebugAdapter) can initialize a connection|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/workbench/contrib/debug/test/node/streamDebugAdapter.test|title=Debug - StreamDebugAdapter StreamDebugAdapter (SocketDebugAdapter) can initialize a connection|occurrence=1streamDebugAdapter.test|…Focused concept · ports.ts ×5 · 109 introduced LOCports.ts ×5

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 109 introduced LOC across 5 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/base/node/ports.ts 109 introduced LOC · 5 ranges

Open complete file

1 > /*--------------------------------------------------------------------------------------------- ports.ts
2 > * Copyright (c) Microsoft Corporation. All rights reserved.
3 > * Licensed under the MIT License. See License.txt in the project root for license information.
4 > *--------------------------------------------------------------------------------------------*/
5 >
6 > import * as net from 'net';
7 >
8 > /**
9 > * Given a start point and a max number of retries, will find a port that
10 > * is openable. Will return 0 in case no free port can be found.
11 > */
12 > export function findFreePort(startPort: number, giveUpAfter: number, timeout: number, stride = 1): Promise<number> {
13 let done = false;
14
30 });
31 }
32 > ports.ts
33 function doFindFreePort(startPort: number, giveUpAfter: number, stride: number, clb: (port: number) => void): void {
34 if (giveUpAfter === 0) {
63 client.connect(startPort, '127.0.0.1');
64 }
65 > ports.ts
66 > // Reference: https://chromium.googlesource.com/chromium/src.git/+/refs/heads/main/net/base/port_util.cc#56
67 > export const BROWSER_RESTRICTED_PORTS: Record<number, boolean> = {
68 > 1: true, // tcpmux
69 > 7: true, // echo
70 > 9: true, // discard
71 > 11: true, // systat
72 > 13: true, // daytime
73 > 15: true, // netstat
74 > 17: true, // qotd
75 > 19: true, // chargen
76 > 20: true, // ftp data
77 > 21: true, // ftp access
78 > 22: true, // ssh
79 > 23: true, // telnet
80 > 25: true, // smtp
81 > 37: true, // time
82 > 42: true, // name
83 > 43: true, // nicname
84 > 53: true, // domain
85 > 69: true, // tftp
86 > 77: true, // priv-rjs
87 > 79: true, // finger
88 > 87: true, // ttylink
89 > 95: true, // supdup
90 > 101: true, // hostriame
91 > 102: true, // iso-tsap
92 > 103: true, // gppitnp
93 > 104: true, // acr-nema
94 > 109: true, // pop2
95 > 110: true, // pop3
96 > 111: true, // sunrpc
97 > 113: true, // auth
98 > 115: true, // sftp
99 > 117: true, // uucp-path
100 > 119: true, // nntp
101 > 123: true, // NTP
102 > 135: true, // loc-srv /epmap
103 > 137: true, // netbios
104 > 139: true, // netbios
105 > 143: true, // imap2
106 > 161: true, // snmp
107 > 179: true, // BGP
108 > 389: true, // ldap
109 > 427: true, // SLP (Also used by Apple Filing Protocol)
110 > 465: true, // smtp+ssl
111 > 512: true, // print / exec
112 > 513: true, // login
113 > 514: true, // shell
114 > 515: true, // printer
115 > 526: true, // tempo
116 > 530: true, // courier
117 > 531: true, // chat
118 > 532: true, // netnews
119 > 540: true, // uucp
120 > 548: true, // AFP (Apple Filing Protocol)
121 > 554: true, // rtsp
122 > 556: true, // remotefs
123 > 563: true, // nntp+ssl
124 > 587: true, // smtp (rfc6409)
125 > 601: true, // syslog-conn (rfc3195)
126 > 636: true, // ldap+ssl
127 > 989: true, // ftps-data
128 > 990: true, // ftps
129 > 993: true, // ldap+ssl
130 > 995: true, // pop3+ssl
131 > 1719: true, // h323gatestat
132 > 1720: true, // h323hostcall
133 > 1723: true, // pptp
134 > 2049: true, // nfs
135 > 3659: true, // apple-sasl / PasswordServer
136 > 4045: true, // lockd
137 > 5060: true, // sip
138 > 5061: true, // sips
139 > 6000: true, // X11
140 > 6566: true, // sane-port
141 > 6665: true, // Alternate IRC [Apple addition]
142 > 6666: true, // Alternate IRC [Apple addition]
143 > 6667: true, // Standard IRC [Apple addition]
144 > 6668: true, // Alternate IRC [Apple addition]
145 > 6669: true, // Alternate IRC [Apple addition]
146 > 6697: true, // IRC + TLS
147 > 10080: true // Amanda
148 > };
149 >
150 > export function isPortFree(port: number, timeout: number): Promise<boolean> {
151 return findFreePortFaster(port, 0, timeout).then(port => port !== 0);
152 }
153 > ports.ts
154 > interface ServerError {
155 > code?: string;
156 > }
157 >
158 > /**
159 > * Uses listen instead of connect. Is faster, but if there is another listener on 0.0.0.0 then this will take 127.0.0.1 from that listener.
160 > */
161 > export function findFreePortFaster(startPort: number, giveUpAfter: number, timeout: number, hostname: string = '127.0.0.1'): Promise<number> {
162 let resolved: boolean = false;
163 let timeoutHandle: Timeout | undefined = undefined;
198 });
199 }
200 > ports.ts
201 function dispose(socket: net.Socket): void {
202 try {