Displaying 5 results from an estimated 5 matches for "channel_decode_socks4".
Did you mean:
channel_decode_socks5
2012 Oct 22
1
[PATCH] Implement remote dynamic TCP forwarding
..._RPORT_LISTENER:
@@ -635,6 +639,7 @@ channel_open_message(void)
case SSH_CHANNEL_OPENING:
case SSH_CHANNEL_CONNECTING:
case SSH_CHANNEL_DYNAMIC:
+ case SSH_CHANNEL_RDYNAMIC:
case SSH_CHANNEL_OPEN:
case SSH_CHANNEL_X11_OPEN:
case SSH_CHANNEL_INPUT_DRAINING:
@@ -1033,14 +1038,23 @@ channel_decode_socks4(Channel *c, fd_set *readset, fd_set *writeset)
u_int16_t dest_port;
struct in_addr dest_addr;
} s4_req, s4_rsp;
+ Buffer *input, *output;
+
+ if (c->type == SSH_CHANNEL_RDYNAMIC) {
+ input = &c->output;
+ output = &c->input;
+ } else {
+ input = &c->input;
+ outp...
2008 Jul 01
1
[PATCH] SOCKS4A support
...sing of the username) seems to have been off-by-one;
not accounting for the terminating NUL. I've fixed that while I'm at it.
--- openssh-5.0p1/channels.c~ 2008-04-09 17:06:20.000000000 +0100
+++ openssh-5.0p1/channels.c 2008-07-01 09:34:51.000000000 +0100
@@ -1028,7 +1028,7 @@ static int
channel_decode_socks4(Channel *c, fd_set *readset, fd_set *writeset)
{
char *p, *host;
- u_int len, have, i, found;
+ u_int len, have, i, found, need;
char username[256];
struct {
u_int8_t version;
@@ -1044,10 +1044,20 @@ channel_decode_socks4(Channel *c, fd_set
if (have < len)
return 0;
p = buffer_p...
2002 May 10
1
Patch for SOCKS4A in OpenSsh
...+----+----+....+----+----+----+....+
----+
# of bytes: 1 1 2 4 variable 1
variable 1
I propose a change/addition to SSH (the client program only) which will
permit SOCKS4A proxy connections. This only requires a relatively minor
change to the "channel_decode_socks4" function in "channels.c" .
Here's a DIFF which will apply this patch to openssh-3.1p1-1:
----------< cut >----------
--- openssh-3.1p1-1/channels.c Mon Mar 4 20:57:45 2002
+++ openssh-3.1p1-1-socks4a/channels.c Fri May 10 16:52:12 2002
@@ -908,11 +908,34 @@ channel_deco...
2003 Jun 25
1
socks5 support for -D
...e %d", c->self, have);
/* buffer_dump(&c->input); */
/* check if the fixed size part of the packet is in buffer. */
- if (have < 4) {
+ if (have < 3) {
/* need more */
FD_SET(c->sock, readset);
return;
@@ -962,6 +1071,9 @@
switch (p[0]) {
case 0x04:
ret = channel_decode_socks4(c, readset, writeset);
+ break;
+ case 0x05:
+ ret = channel_decode_socks5(c, readset, writeset);
break;
default:
ret = -1;
2001 Oct 24
2
disable features
...dif
static void
channel_pre_x11_open(Channel *c, fd_set * readset, fd_set * writeset)
@@ -876,7 +890,9 @@
debug("X11 closed %d i%d/o%d", c->self, c->istate, c->ostate);
}
}
+#endif /* WITH_X11FWD */
+#ifdef WITH_DYNFWD
/* try to decode a socks4 header */
static int
channel_decode_socks4(Channel *c, fd_set * readset, fd_set * writeset)
@@ -986,7 +1002,9 @@
port_open_helper(c, "direct-tcpip");
}
}
+#endif
+#ifdef WITH_X11FWD
/* This is our fake X11 server socket. */
static void
channel_post_x11_listener(Channel *c, fd_set * readset, fd_set * writeset)
@@ -1045,7...