Displaying 2 results from an estimated 2 matches for "ssh_socks5_authdone".
2003 Jun 25
1
socks5 support for -D
...1
+++ channels.c 25 Jun 2003 12:14:19 -0000
@@ -54,7 +54,7 @@
#include "key.h"
#include "authfd.h"
#include "pathnames.h"
-
+#include "bufaux.h"
/* -- channel core */
@@ -940,6 +940,115 @@
return 1;
}
+/* try to decode a socks5 header */
+#define SSH_SOCKS5_AUTHDONE 0x1000
+#define SSH_SOCKS5_NOAUTH 0x00
+#define SSH_SOCKS5_IPV4 0x01
+#define SSH_SOCKS5_DOMAIN 0x03
+#define SSH_SOCKS5_IPV6 0x04
+#define SSH_SOCKS5_CONNECT 0x01
+#define SSH_SOCKS5_SUCCESS 0x00
+
+static int
+channel_decode_socks5(Channel *c, fd_set * readset, fd_set * writeset)
+{
+ struct {...
2012 Oct 22
1
[PATCH] Implement remote dynamic TCP forwarding
...;c->input;
+ output = &c->output;
+ }
debug2("channel %d: decode socks5", c->self);
- p = buffer_ptr(&c->input);
+ p = buffer_ptr(input);
if (p[0] != 0x05)
return -1;
- have = buffer_len(&c->input);
+ have = buffer_len(input);
if (!(c->flags & SSH_SOCKS5_AUTHDONE)) {
/* format: ver | nmethods | methods */
if (have < 2)
@@ -1170,10 +1193,11 @@ channel_decode_socks5(Channel *c, fd_set *readset, fd_set *writeset)
c->self);
return -1;
}
- buffer_consume(&c->input, nmethods + 2);
- buffer_put_char(&c->output, 0x05); /*...