Tor
0.4.7.0-alpha-dev
|
#include <socks_request_st.h>
Data Fields | |
uint8_t | socks_version |
uint8_t | auth_type |
uint8_t | command |
uint8_t | listener_type |
size_t | replylen |
uint8_t | reply [MAX_SOCKS_REPLY_LEN] |
char | address [MAX_SOCKS_ADDR_LEN] |
uint16_t | port |
unsigned int | has_finished: 1 |
unsigned int | got_auth: 1 |
unsigned int | socks_prefer_no_auth: 1 |
unsigned int | socks_use_extended_errors: 1 |
socks5_reply_status_t | socks_extended_error_code |
size_t | usernamelen |
uint8_t | passwordlen |
char * | username |
char * | password |
uint8_t | socks5_atyp |
State of a SOCKS request from a user to an OP. Also used to encode other information for non-socks user request (such as those on TransPort and DNSPort)
Definition at line 37 of file socks_request_st.h.
char address[MAX_SOCKS_ADDR_LEN] |
What address did the client ask to connect to/resolve?
Definition at line 57 of file socks_request_st.h.
Referenced by adjust_exit_policy_from_exitpolicy_failure(), connection_ap_can_use_exit(), connection_ap_fail_onehop(), dnsserv_resolved(), process_socks4_request(), remap_event_helper(), and write_stream_target_to_buf().
uint8_t auth_type |
If using socks5 authentication, which authentication type did we negotiate? currently we support 0 (no authentication) and 2 (username/password).
Definition at line 45 of file socks_request_st.h.
uint8_t command |
What is this stream's goal? One of the SOCKS_COMMAND_* values
Definition at line 47 of file socks_request_st.h.
Referenced by connection_ap_can_use_exit(), connection_ap_handshake_attach_chosen_circuit(), connection_ap_handshake_send_resolve(), and connection_ap_process_transparent().
unsigned int got_auth |
Have we received any authentication data?
Definition at line 63 of file socks_request_st.h.
unsigned int has_finished |
Has the SOCKS handshake finished? Used to make sure we send back a socks reply for every connection.
Definition at line 60 of file socks_request_st.h.
Referenced by connection_ap_about_to_close(), connection_ap_process_transparent(), and connection_mark_unattached_ap_().
uint8_t listener_type |
Which kind of listener created this stream?
Definition at line 49 of file socks_request_st.h.
Referenced by entry_connection_describe_status_for_controller().
char* password |
The negotiated password value if any (for socks5). This value is NOT nul-terminated; see passwordlen for its length.
Definition at line 84 of file socks_request_st.h.
Referenced by entry_connection_describe_status_for_controller(), and socks_request_free_().
uint8_t passwordlen |
Number of bytes in password; 0 if password is NULL
Definition at line 77 of file socks_request_st.h.
Referenced by connection_ap_handshake_attach_chosen_circuit(), entry_connection_describe_status_for_controller(), and socks_request_free_().
uint16_t port |
What port did the client ask to connect to?
Definition at line 59 of file socks_request_st.h.
Referenced by circuit_stream_is_being_handled(), connection_ap_can_use_exit(), connection_ap_fail_onehop(), connection_ap_get_begincell_flags(), process_socks4_request(), and write_stream_target_to_buf().
uint8_t reply[MAX_SOCKS_REPLY_LEN] |
Write an entry into this string if we want to specify our own socks reply, rather than using the default socks4 or socks5 socks reply. We use this for the two-stage socks5 handshake.
Definition at line 51 of file socks_request_st.h.
size_t replylen |
Length of reply.
Definition at line 50 of file socks_request_st.h.
socks5_reply_status_t socks_extended_error_code |
If non zero, this contains the extended error code that should be used if the port was configured to use them.
Definition at line 72 of file socks_request_st.h.
Referenced by socks_mark_rend_circuit_timed_out().
unsigned int socks_prefer_no_auth |
If this is set, we will choose "no authentication" instead of "username/password" authentication if both are offered. Used as input to parse_socks.
Definition at line 67 of file socks_request_st.h.
unsigned int socks_use_extended_errors |
If set, we can send back the extended error code in the reply.
Definition at line 69 of file socks_request_st.h.
uint8_t socks_version |
Which version of SOCKS did the client use? One of "0, 4, 5" – where 0 means that no socks handshake ever took place, and this is just a stub connection (e.g. see connection_ap_make_link()).
Definition at line 41 of file socks_request_st.h.
Referenced by entry_connection_describe_status_for_controller().
char* username |
The negotiated username value if any (for socks5), or the entire authentication string (for socks4). This value is NOT nul-terminated; see usernamelen for its length.
Definition at line 81 of file socks_request_st.h.
Referenced by entry_connection_describe_status_for_controller(), and socks_request_free_().
size_t usernamelen |
Number of bytes in username; 0 if username is NULL
Definition at line 75 of file socks_request_st.h.
Referenced by connection_ap_handshake_attach_chosen_circuit(), entry_connection_describe_status_for_controller(), and socks_request_free_().