Destination hostname or IP
Destination port
OptionaltlsIf true, signals intent to upgrade to TLS. Note: The tunnel creation itself does not perform TLS - you must upgrade the returned connection manually after tunnel establishment.
OptionaltlsTLS server name for SNI (defaults to target host if not specified)
Target address for SOCKS5 connection.
TLS upgrade: After
createSocks5Tunnelreturns a tunnel, you must manually upgrade the connection to TLS. Use Node'stls.connect()or Deno'sDeno.connectTls()with the tunnel's underlying socket. ThetlsServerNameoption can be used to specify a different SNI value than the target host.Example