Tor 0.4.9.3-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(), circuit_discard_optional_exit_enclaves(), circuit_get_open_circ_or_launch(), circuit_is_acceptable(), connection_ap_can_use_exit(), connection_ap_expire_beginning(), connection_ap_fail_onehop(), connection_ap_handle_onion(), connection_ap_handshake_attach_circuit(), connection_ap_handshake_rewrite_and_attach(), connection_ap_handshake_send_begin(), connection_ap_handshake_send_resolve(), connection_ap_handshake_socks_resolved(), connection_ap_make_link(), connection_ap_process_end_not_open(), connection_ap_process_http_connect(), connection_ap_process_natd(), connection_edge_compatible_with_circuit(), connection_edge_process_relay_cell_not_open(), connection_edge_update_circuit_isolation(), consider_recording_trackhost(), directory_all_unreachable_cb(), dnsserv_launch_request(), dnsserv_resolved(), evdns_server_callback(), handle_control_redirectstream(), link_apconn_to_circ(), parse_socks4_request(), parse_socks5_client_request(), process_socks4_request(), process_socks5_client_request(), remap_event_helper(), tell_controller_about_resolved_result(), 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.
Referenced by handle_socks_message(), process_socks5_methods_request(), and process_socks5_userpass_auth().
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 circuit_get_open_circ_or_launch(), connection_ap_can_use_exit(), connection_ap_handle_onion(), connection_ap_handshake_attach_chosen_circuit(), connection_ap_handshake_process_socks(), connection_ap_handshake_rewrite_and_attach(), connection_ap_handshake_send_begin(), connection_ap_handshake_send_resolve(), connection_ap_handshake_socks_got_resolved_cell(), connection_ap_handshake_socks_reply(), connection_ap_make_link(), connection_ap_process_http_connect(), connection_ap_process_natd(), connection_ap_process_transparent(), connection_edge_process_resolved_cell(), connection_mark_unattached_ap_(), dnsserv_launch_request(), dnsserv_resolved(), evdns_server_callback(), getinfo_helper_events(), parse_socks4_request(), parse_socks5_client_request(), process_socks4_request(), and process_socks5_client_request().
unsigned int got_auth |
Have we received any authentication data?
Definition at line 63 of file socks_request_st.h.
Referenced by handle_socks_message(), parse_socks4_request(), and parse_socks5_userpass_auth().
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 assert_connection_ok(), connection_ap_about_to_close(), connection_ap_handshake_process_socks(), connection_ap_handshake_socks_reply(), connection_ap_handshake_socks_resolved(), connection_ap_make_link(), connection_ap_process_http_connect(), connection_ap_process_natd(), connection_ap_process_transparent(), connection_edge_process_relay_cell_not_open(), connection_edge_reached_eof(), connection_handle_read_impl(), connection_handle_write_impl(), connection_mark_unattached_ap_(), and handle_relay_msg().
uint8_t listener_type |
Which kind of listener created this stream?
Definition at line 49 of file socks_request_st.h.
Referenced by connection_ap_handshake_socks_reply(), connection_ap_make_link(), connection_ap_process_http_connect(), connection_edge_compatible_with_circuit(), connection_edge_update_circuit_isolation(), connection_init_accepted_conn(), dnsserv_launch_request(), entry_connection_describe_status_for_controller(), and evdns_server_callback().
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 connection_ap_process_http_connect(), connection_edge_compatible_with_circuit(), connection_edge_update_circuit_isolation(), entry_connection_describe_status_for_controller(), parse_socks5_userpass_auth(), 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(), connection_ap_process_http_connect(), connection_edge_compatible_with_circuit(), connection_edge_update_circuit_isolation(), entry_connection_describe_status_for_controller(), parse_socks5_userpass_auth(), 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_discard_optional_exit_enclaves(), circuit_get_open_circ_or_launch(), circuit_is_acceptable(), circuit_stream_is_being_handled(), connection_ap_can_use_exit(), connection_ap_expire_beginning(), connection_ap_fail_onehop(), connection_ap_get_begincell_flags(), connection_ap_handshake_attach_circuit(), connection_ap_handshake_rewrite_and_attach(), connection_ap_handshake_send_begin(), connection_ap_make_link(), connection_ap_process_http_connect(), connection_ap_process_natd(), connection_edge_compatible_with_circuit(), connection_edge_update_circuit_isolation(), directory_all_unreachable_cb(), handle_control_redirectstream(), parse_socks4_request(), parse_socks5_client_request(), process_socks4_request(), process_socks5_client_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.
Referenced by connection_ap_handshake_process_socks(), parse_socks(), process_socks5_methods_request(), process_socks5_userpass_auth(), and socks_request_set_socks5_error().
size_t replylen |
Length of reply.
Definition at line 50 of file socks_request_st.h.
Referenced by connection_ap_handshake_process_socks(), handle_socks_message(), parse_socks(), process_socks5_methods_request(), process_socks5_userpass_auth(), and socks_request_set_socks5_error().
uint8_t socks5_atyp |
Definition at line 86 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 client_desc_missing_bad_client_auth(), client_dir_fetch_404(), connection_ap_handshake_rewrite_and_attach(), connection_ap_handshake_socks_reply(), socks_mark_introduction_failed(), and 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.
Referenced by connection_init_accepted_conn(), and process_socks5_methods_request().
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.
Referenced by connection_ap_handshake_socks_reply(), and connection_init_accepted_conn().
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 connection_ap_handshake_rewrite_and_attach(), connection_ap_handshake_socks_reply(), connection_ap_handshake_socks_resolved(), connection_ap_make_link(), connection_edge_compatible_with_circuit(), connection_edge_update_circuit_isolation(), entry_connection_describe_status_for_controller(), handle_socks_message(), parse_socks4_request(), process_socks5_methods_request(), and process_socks5_userpass_auth().
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 connection_ap_process_http_connect(), connection_edge_compatible_with_circuit(), connection_edge_update_circuit_isolation(), entry_connection_describe_status_for_controller(), parse_socks4_request(), parse_socks5_userpass_auth(), 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(), connection_ap_process_http_connect(), connection_edge_compatible_with_circuit(), connection_edge_update_circuit_isolation(), entry_connection_describe_status_for_controller(), parse_socks4_request(), parse_socks5_userpass_auth(), and socks_request_free_().