()
| 475 | |
| 476 | let socks: SocksLib | null = null; |
| 477 | function loadSocks() { |
| 478 | if (socks == null) { |
| 479 | const socksImport = getSocks(); |
| 480 | if ('kModuleError' in socksImport) { |
| 481 | throw socksImport.kModuleError; |
| 482 | } |
| 483 | socks = socksImport; |
| 484 | } |
| 485 | return socks; |
| 486 | } |
| 487 | |
| 488 | async function makeSocks5Connection(options: MakeConnectionOptions): Promise<Stream> { |
| 489 | const hostAddress = HostAddress.fromHostPort( |
no test coverage detected