From fa3c23773944788125db2f67bcb048376c17fec9 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 20 Mar 2013 16:17:06 -0400 Subject: Per-SOCKSPort configuration for bug 8117 fix. This might be necessary if the bug8117 fix confuses any applications. Also add a changes file. --- src/or/or.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/or/or.h') diff --git a/src/or/or.h b/src/or/or.h index 51c23d305d..ca28c0e7b5 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -1085,6 +1085,10 @@ typedef struct listener_connection_t { /** One or more ISO_ flags to describe how to isolate streams. */ uint8_t isolation_flags; /**@}*/ + /** For SOCKS connections only: If this is set, we will choose "no + * authentication" instead of "username/password" authentication if both + * are offered. Used as input to parse_socks. */ + unsigned int socks_prefer_no_auth : 1; } listener_connection_t; @@ -2910,6 +2914,10 @@ typedef struct port_cfg_t { uint8_t isolation_flags; /**< Zero or more isolation flags */ int session_group; /**< A session group, or -1 if this port is not in a * session group. */ + /* Socks only: */ + /** When both no-auth and user/pass are advertised by a SOCKS client, select + * no-auth. */ + unsigned int socks_prefer_no_auth : 1; /* Server port types (or, dir) only: */ unsigned int no_advertise : 1; @@ -3729,6 +3737,10 @@ struct socks_request_t { * make sure we send back a socks reply for * every connection. */ unsigned int got_auth : 1; /**< Have we received any authentication data? */ + /** If this is set, we will choose "no authentication" instead of + * "username/password" authentication if both are offered. Used as input to + * parse_socks. */ + unsigned int socks_prefer_no_auth : 1; /** Number of bytes in username; 0 if username is NULL */ size_t usernamelen; -- cgit v1.2.3-54-g00ecf