|
OpenVPN
|
#include "syshead.h"#include "common.h"#include "misc.h"#include "win32.h"#include "socket.h"#include "fdmisc.h"#include "proxy.h"#include "forward.h"#include "memdbg.h"
Go to the source code of this file.
Macros | |
| #define | UP_TYPE_SOCKS "SOCKS Proxy" |
Functions | |
| struct socks_proxy_info * | socks_proxy_new (const char *server, const char *port, const char *authfile) |
| void | socks_proxy_close (struct socks_proxy_info *sp) |
| static bool | socks_proxy_recv_char (uint8_t *c, const char *name, socket_descriptor_t sd, struct event_timeout *server_poll_timeout, volatile int *signal_received) |
| static bool | socks_username_password_auth (struct socks_proxy_info *p, socket_descriptor_t sd, struct event_timeout *server_poll_timeout, volatile int *signal_received) |
| static bool | socks_handshake (struct socks_proxy_info *p, socket_descriptor_t sd, struct event_timeout *server_poll_timeout, volatile int *signal_received) |
| static bool | recv_socks_reply (socket_descriptor_t sd, struct openvpn_sockaddr *addr, struct event_timeout *server_poll_timeout, volatile int *signal_received) |
| static int | port_from_servname (const char *servname) |
| void | establish_socks_proxy_passthru (struct socks_proxy_info *p, socket_descriptor_t sd, const char *host, const char *servname, struct event_timeout *server_poll_timeout, struct signal_info *sig_info) |
| void | establish_socks_proxy_udpassoc (struct socks_proxy_info *p, socket_descriptor_t ctrl_sd, struct openvpn_sockaddr *relay_addr, struct event_timeout *server_poll_timeout, struct signal_info *sig_info) |
| void | socks_process_incoming_udp (struct buffer *buf, struct link_socket_actual *from) |
| int | socks_process_outgoing_udp (struct buffer *buf, const struct link_socket_actual *to) |
| void establish_socks_proxy_passthru | ( | struct socks_proxy_info * | p, |
| socket_descriptor_t | sd, | ||
| const char * | host, | ||
| const char * | servname, | ||
| struct event_timeout * | server_poll_timeout, | ||
| struct signal_info * | sig_info | ||
| ) |
Definition at line 338 of file socks.c.
References D_LINK_ERRORS, msg, port_from_servname(), proxy_send(), recv_socks_reply(), register_signal(), signal_info::signal_received, and socks_handshake().
Referenced by phase2_tcp_client().
| void establish_socks_proxy_udpassoc | ( | struct socks_proxy_info * | p, |
| socket_descriptor_t | ctrl_sd, | ||
| struct openvpn_sockaddr * | relay_addr, | ||
| struct event_timeout * | server_poll_timeout, | ||
| struct signal_info * | sig_info | ||
| ) |
Definition at line 396 of file socks.c.
References CLEAR, D_LINK_ERRORS, M_ERRNO, msg, MSG_NOSIGNAL, recv_socks_reply(), register_signal(), signal_info::signal_received, and socks_handshake().
Referenced by phase2_socks_client().
|
static |
Definition at line 318 of file socks.c.
References service.
Referenced by establish_socks_proxy_passthru().
|
static |
Definition at line 234 of file socks.c.
References openvpn_sockaddr::addr, D_LINK_ERRORS, gc, gc_free(), gc_new(), openvpn_sockaddr::in4, M_INFO, msg, print_openvpn_sockaddr(), and socks_proxy_recv_char().
Referenced by establish_socks_proxy_passthru(), and establish_socks_proxy_udpassoc().
|
static |
Definition at line 160 of file socks.c.
References socks_proxy_info::authfile, D_LINK_ERRORS, msg, proxy_send(), socks_proxy_recv_char(), and socks_username_password_auth().
Referenced by establish_socks_proxy_passthru(), and establish_socks_proxy_udpassoc().
| void socks_process_incoming_udp | ( | struct buffer * | buf, |
| struct link_socket_actual * | from | ||
| ) |
Definition at line 443 of file socks.c.
References openvpn_sockaddr::addr, BLEN, buf_read(), buf_read_u16(), buf_read_u8(), link_socket_actual::dest, openvpn_sockaddr::in4, and buffer::len.
Referenced by socks_postprocess_incoming_link().
| int socks_process_outgoing_udp | ( | struct buffer * | buf, |
| const struct link_socket_actual * | to | ||
| ) |
Definition at line 481 of file socks.c.
References ASSERT, buf_defined(), buf_sub(), buf_write(), buf_write_u16(), buf_write_u8(), and buffer::len.
Referenced by socks_preprocess_outgoing_link().
| void socks_proxy_close | ( | struct socks_proxy_info * | sp | ) |
Definition at line 78 of file socks.c.
Referenced by uninit_proxy_dowork().
| struct socks_proxy_info * socks_proxy_new | ( | const char * | server, |
| const char * | port, | ||
| const char * | authfile | ||
| ) |
Definition at line 51 of file socks.c.
References ALLOC_OBJ_CLEAR, ASSERT, socks_proxy_info::authfile, socks_proxy_info::defined, socks_proxy_info::port, socks_proxy_info::server, and strncpynt().
Referenced by init_proxy_dowork().
|
static |
Definition at line 84 of file socks.c.
References get_server_poll_remaining_time(), openvpn_fd_set(), and proxy_recv_char().
Referenced by recv_socks_reply(), socks_handshake(), and socks_username_password_auth().
|
static |
Definition at line 100 of file socks.c.
References ASSERT, socks_proxy_info::authfile, cleanup(), CLEAR, D_LINK_ERRORS, get_user_pass(), GET_USER_PASS_MANAGEMENT, M_NONFATAL, msg, user_pass::password, proxy_send(), secure_memzero(), socks_proxy_recv_char(), UP_TYPE_SOCKS, and user_pass::username.
Referenced by socks_handshake().