OpenVPN
Macros | Functions
socks.c File Reference
#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"
Include dependency graph for socks.c:

Go to the source code of this file.

Macros

#define UP_TYPE_SOCKS   "SOCKS Proxy"
 

Functions

struct socks_proxy_infosocks_proxy_new (const char *server, const char *port, const char *authfile)
 
void socks_proxy_close (struct socks_proxy_info *sp)
 
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, socket_descriptor_t udp_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)
 

Macro Definition Documentation

◆ UP_TYPE_SOCKS

#define UP_TYPE_SOCKS   "SOCKS Proxy"

Definition at line 49 of file socks.c.

Function Documentation

◆ establish_socks_proxy_passthru()

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 
)

◆ establish_socks_proxy_udpassoc()

void establish_socks_proxy_udpassoc ( struct socks_proxy_info p,
socket_descriptor_t  ctrl_sd,
socket_descriptor_t  udp_sd,
struct openvpn_sockaddr relay_addr,
struct event_timeout server_poll_timeout,
struct signal_info sig_info 
)

◆ port_from_servname()

static int port_from_servname ( const char *  servname)
static

Definition at line 435 of file socks.c.

References service.

Referenced by establish_socks_proxy_passthru().

◆ recv_socks_reply()

static bool recv_socks_reply ( socket_descriptor_t  sd,
struct openvpn_sockaddr addr,
struct event_timeout server_poll_timeout,
volatile int *  signal_received 
)
static

◆ socks_handshake()

static bool socks_handshake ( struct socks_proxy_info p,
socket_descriptor_t  sd,
struct event_timeout server_poll_timeout,
volatile int *  signal_received 
)
static

◆ socks_process_incoming_udp()

void socks_process_incoming_udp ( struct buffer buf,
struct link_socket_actual from 
)

◆ socks_process_outgoing_udp()

int socks_process_outgoing_udp ( struct buffer buf,
const struct link_socket_actual to 
)

◆ socks_proxy_close()

void socks_proxy_close ( struct socks_proxy_info sp)

Definition at line 81 of file socks.c.

Referenced by uninit_proxy_dowork().

◆ socks_proxy_new()

struct socks_proxy_info* socks_proxy_new ( const char *  server,
const char *  port,
const char *  authfile 
)

◆ socks_username_password_auth()

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