aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_socks.h
diff options
context:
space:
mode:
authorJeff Burdges <burdges@gnunet.org>2015-07-31 12:20:36 +0000
committerJeff Burdges <burdges@gnunet.org>2015-07-31 12:20:36 +0000
commit56349f844b7e04b352c9baeb03e96eeaae54efd2 (patch)
tree95271fe954b534cd7f868666b382e49f32b93ba4 /src/include/gnunet_socks.h
parentaa6f2fcf62b6128ac6172dc408e22483afeeef3b (diff)
downloadgnunet-56349f844b7e04b352c9baeb03e96eeaae54efd2.tar.gz
gnunet-56349f844b7e04b352c9baeb03e96eeaae54efd2.zip
Initial SOCKS5 proxy code. This will not yet work properly.
Diffstat (limited to 'src/include/gnunet_socks.h')
-rw-r--r--src/include/gnunet_socks.h77
1 files changed, 77 insertions, 0 deletions
diff --git a/src/include/gnunet_socks.h b/src/include/gnunet_socks.h
new file mode 100644
index 000000000..6ac3919e8
--- /dev/null
+++ b/src/include/gnunet_socks.h
@@ -0,0 +1,77 @@
1/*
2 This file is part of GNUnet.
3 Copyright (C) 2001-2013 Jeffrey Burdges (and other contributing authors)
4
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
9
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20
21/**
22 * @file include/gnunet_socks.h
23 * @brief SOCKS proxy for connections
24 * @author Jeffrey Burdges
25 */
26
27#ifndef GNUNET_SOCKS_H
28#define GNUNET_SOCKS_H
29
30#ifdef __cplusplus
31extern "C"
32{
33#if 0 /* keep Emacsens' auto-indent happy */
34}
35#endif
36#endif
37
38#include "gnunet_common.h"
39
40
41/**
42 * Check if a SOCKS proxy is required by a service. Do not use local service
43 * if a SOCKS proxy port is configured as this could deanonymize a user.
44 *
45 * @param service_name name of service to connect to
46 * @param cfg configuration to use
47 * @return GNUNET_YES if so, GNUNET_NO if not
48 */
49int
50GNUNET_SOCKS_check_service (const char *service_name,
51 const struct GNUNET_CONFIGURATION_Handle *cfg);
52
53
54/**
55 * Try to connect to a service configured to use a SOCKS5 proxy.
56 *
57 * @param service_name name of service to connect to
58 * @param cfg configuration to use
59 * @return Connection handle that becomes usable when the handshake completes.
60 * NULL if SOCKS not configured or not configured properly
61 */
62struct GNUNET_CONNECTION_Handle *
63GNUNET_SOCKS_do_connect (const char *service_name,
64 const struct GNUNET_CONFIGURATION_Handle *cfg);
65
66
67#if 0 /* keep Emacsens' auto-indent happy */
68{
69#endif
70#ifdef __cplusplus
71}
72#endif
73
74
75/* ifndef GNUNET_SOCKS_H */
76#endif
77/* end of gnunet_socks.h */