]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Merge branch 'socks_trunnel4_squashed' into socks_trunnel4_squashed_merged
authorNick Mathewson <nickm@torproject.org>
Thu, 12 Jul 2018 15:47:25 +0000 (11:47 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 12 Jul 2018 15:47:25 +0000 (11:47 -0400)
1  2 
src/core/or/socks_request_st.h
src/core/proto/proto_socks.c
src/test/test_socks.c

Simple merge
index 6912441472faaf97d0072f00b128445a6244fce8,998fd72ba5e566e6723ef7ee831c83aa03c998f4..530436c41bb49d7d9970bb051838f265bfadcad9
@@@ -4,19 -4,30 +4,32 @@@
   * Copyright (c) 2007-2018, The Tor Project, Inc. */
  /* See LICENSE for licensing information */
  
 -#include "or/or.h"
 -#include "or/addressmap.h"
 -#include "common/buffers.h"
 -#include "or/control.h"
 -#include "or/config.h"
 +#include "core/or/or.h"
 +#include "feature/client/addressmap.h"
 +#include "lib/container/buffers.h"
 +#include "core/mainloop/connection.h"
 +#include "feature/control/control.h"
 +#include "app/config/config.h"
  #include "lib/crypt_ops/crypto_util.h"
 -#include "or/ext_orport.h"
 -#include "or/proto_socks.h"
 -#include "or/reasons.h"
 +#include "feature/relay/ext_orport.h"
 +#include "core/proto/proto_socks.h"
 +#include "core/or/reasons.h"
 +
 +#include "core/or/socks_request_st.h"
  
 -#include "or/socks_request_st.h"
+ #include "trunnel/socks5.h"
+ #define SOCKS_VER_5 0x05 /* First octet of non-auth SOCKS5 messages */
+ #define SOCKS_VER_4 0x04 /*                SOCKS4 messages */
+ #define SOCKS_AUTH  0x01 /*                SOCKS5 auth messages */
+ typedef enum {
+   SOCKS_RESULT_INVALID       = -1, /* Message invalid. */
+   SOCKS_RESULT_TRUNCATED     =  0, /* Message incomplete/truncated. */
+   SOCKS_RESULT_DONE          =  1, /* OK, we're done. */
+   SOCKS_RESULT_MORE_EXPECTED =  2, /* OK, more messages expected. */
+ } socks_result_t;
  static void socks_request_set_socks5_error(socks_request_t *req,
                                socks5_reply_status_t reason);
  
Simple merge