1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-08-05 20:55:47 +03:00

Support for direct-streamlocal@openssh.com UNIX socket connection (#945)

This patch allow to use direct-streamlocal service from OpenSSH 6.7,
that allows UNIX socket connections.

Mods:
- delete unrelated condition:
  Ref: https://github.com/libssh2/libssh2/pull/216#discussion_r374748111
- rebase on master, whitespace updates.

Patch-by: @gjalves Gustavo Junior Alves

Closes #216
Closes #632
Closes #945
This commit is contained in:
Viktor Szakats
2023-04-10 14:23:17 +02:00
committed by GitHub
parent c76b96cbe6
commit fe706697ed
4 changed files with 118 additions and 0 deletions

View File

@@ -791,6 +791,11 @@ libssh2_channel_direct_tcpip_ex(LIBSSH2_SESSION *session, const char *host,
#define libssh2_channel_direct_tcpip(session, host, port) \
libssh2_channel_direct_tcpip_ex((session), (host), (port), "127.0.0.1", 22)
LIBSSH2_API LIBSSH2_CHANNEL *
libssh2_channel_direct_streamlocal_ex(LIBSSH2_SESSION * session,
const char *socket_path,
const char *shost, int sport);
LIBSSH2_API LIBSSH2_LISTENER *
libssh2_channel_forward_listen_ex(LIBSSH2_SESSION *session, const char *host,
int port, int *bound_port,