OpenVPN
socks.h
Go to the documentation of this file.
1/*
2 * OpenVPN -- An application to securely tunnel IP networks
3 * over a single TCP/UDP port, with support for SSL/TLS-based
4 * session authentication and key exchange,
5 * packet encryption, packet authentication, and
6 * packet compression.
7 *
8 * Copyright (C) 2002-2024 OpenVPN Inc <sales@openvpn.net>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2
12 * as published by the Free Software Foundation.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 */
23
24/*
25 * 2004-01-30: Added Socks5 proxy support
26 * (Christof Meerwald, http://cmeerw.org)
27 */
28
29#ifndef SOCKS_H
30#define SOCKS_H
31
32#include "buffer.h"
33
34struct openvpn_sockaddr;
36
38 bool defined;
39
40 char server[128];
41 const char *port;
42 char authfile[256];
43};
44
45struct socks_proxy_info *socks_proxy_new(const char *server,
46 const char *port,
47 const char *authfile);
48
49void socks_proxy_close(struct socks_proxy_info *sp);
50
52 socket_descriptor_t sd, /* already open to proxy */
53 const char *host, /* openvpn server remote */
54 const char *servname, /* openvpn server port */
55 struct event_timeout *server_poll_timeout,
56 struct signal_info *sig_info);
57
59 socket_descriptor_t ctrl_sd, /* already open to proxy */
60 struct openvpn_sockaddr *relay_addr,
61 struct event_timeout *server_poll_timeout,
62 struct signal_info *sig_info);
63
64void socks_process_incoming_udp(struct buffer *buf,
65 struct link_socket_actual *from);
66
68 const struct link_socket_actual *to);
69
70#endif /* ifndef SOCKS_H */
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 socks.c:455
int socks_process_outgoing_udp(struct buffer *buf, const struct link_socket_actual *to)
Definition socks.c:603
void socks_process_incoming_udp(struct buffer *buf, struct link_socket_actual *from)
Definition socks.c:564
struct socks_proxy_info * socks_proxy_new(const char *server, const char *port, const char *authfile)
Definition socks.c:52
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 socks.c:517
void socks_proxy_close(struct socks_proxy_info *sp)
Definition socks.c:81
Wrapper structure for dynamically allocated memory.
Definition buffer.h:61
char authfile[256]
Definition socks.h:42
char server[128]
Definition socks.h:40
const char * port
Definition socks.h:41
SOCKET socket_descriptor_t
Definition syshead.h:439