11#ifndef TOR_TRANSPORTS_H
12#define TOR_TRANSPORTS_H
39 const char *
name,
int socks_ver));
41#define transport_free(tr) FREE_AND_NULL(transport_t, transport_free_, (tr))
50#define pt_kickstart_client_proxy(tl, pa) \
51 pt_kickstart_proxy(tl, pa, 0)
52#define pt_kickstart_server_proxy(tl, pa) \
53 pt_kickstart_proxy(tl, pa, 1)
73 const char *chars_to_escape);
80 PT_PROTO_ACCEPTING_METHODS,
84 PT_PROTO_FAILED_LAUNCH
91 enum pt_proto_state conf_state;
96 unsigned int proxy_supported : 1;
106 unsigned int marked_for_removal : 1;
112 unsigned int was_around_before_config_read : 1;
121 char *implementation;
131 const char *
name,
int socks_ver,
132 const char *extra_info_args);
143 managed_proxy_t *mp);
147 int also_terminate_process);
150 char **proxy_argv,
int is_server);
166STATIC const char *managed_proxy_state_to_string(
enum pt_proto_state);
unsigned marked_for_removal
#define MOCK_DECL(rv, funcname, arglist)
STATIC char * get_transport_options_for_server_proxy(const managed_proxy_t *mp)
STATIC char * get_pt_proxy_uri(void)
STATIC const tor_addr_t * managed_proxy_outbound_address(const or_options_t *options, sa_family_t family)
STATIC transport_t * transport_new(const tor_addr_t *addr, uint16_t port, const char *name, int socks_ver, const char *extra_info_args)
STATIC void parse_proxy_error(const char *line)
STATIC void managed_proxy_destroy(managed_proxy_t *mp, int also_terminate_process)
STATIC void parse_log_line(const char *line, managed_proxy_t *mp)
STATIC managed_proxy_t * managed_proxy_create(const smartlist_t *with_transport_list, char **proxy_argv, int is_server)
STATIC int managed_proxy_severity_parse(const char *severity)
STATIC int parse_cmethod_line(const char *line, managed_proxy_t *mp)
STATIC void parse_status_line(const char *line, managed_proxy_t *mp)
static smartlist_t * transport_list
STATIC void managed_proxy_stderr_callback(process_t *process, const char *line, size_t size)
STATIC void managed_proxy_stdout_callback(process_t *process, const char *line, size_t size)
STATIC void managed_proxy_set_state(managed_proxy_t *mp, enum pt_proto_state new_state)
STATIC int parse_version(const char *line, managed_proxy_t *mp)
STATIC void parse_env_error(const char *line)
STATIC int parse_smethod_line(const char *line, managed_proxy_t *mp)
STATIC int configure_proxy(managed_proxy_t *mp)
STATIC void free_execve_args(char **arg)
STATIC bool managed_proxy_exit_callback(process_t *process, process_exit_code_t exit_code)
STATIC void handle_proxy_line(const char *line, managed_proxy_t *mp)
int pt_proxies_configuration_pending(void)
int transport_add_from_config(const tor_addr_t *addr, uint16_t port, const char *name, int socks_ver)
bool managed_proxy_has_transport(const char *transport_name)
char * pt_stringify_socks_args(const smartlist_t *socks_args)
void pt_configure_remaining_proxies(void)
void sweep_proxy_list(void)
char * pt_get_socks_args_for_proxy_addrport(const tor_addr_t *addr, uint16_t port)
void mark_transport_list(void)
transport_t * transport_get_by_name(const char *name)
void sweep_transport_list(void)
void transport_free_(transport_t *transport)
void pt_prepare_proxy_list_for_config_read(void)
smartlist_t * get_transport_proxy_ports(void)
char * tor_escape_str_for_pt_args(const char *string, const char *chars_to_escape)
void pt_kickstart_proxy(const smartlist_t *transport_list, char **proxy_argv, int is_server)
char * pt_get_extra_info_descriptor_string(void)