aboutsummaryrefslogtreecommitdiff
path: root/src/tools/tor-fw-helper
Commit message (Collapse)AuthorAge
* Add missing -Isrc/ext to tor-fw-helper/include.amNick Mathewson2014-03-25
| | | | | | We need this now that tor-fw-helper will pull in siphash.h Fixes bug 11296; bugfix on 0.2.5.4-alpha where siphash.h was introduced.
* Fix tor-fw-helper exit code.Arlo Breault2013-06-10
| | | | | | It's returning the number of initialized backends. (changes file added by nickm; this is a fix for bug #9030)
* Merge remote-tracking branch 'public/bug7768' into maint-0.2.4Nick Mathewson2013-03-19
|\
| * Use option name --test-commandline in tor-fw-helper.David Fifield2013-03-19
| | | | | | | | | | | | | | | | | | It was previously --Test in the help output and --test-commandline in the getopt call. The man page already had --test. (Originally by David, who resolved the tie in favor of "--test"; I chose --test-commandline" instead so that nothing that depended on it could break. -Nick)
* | Fix some basic socket issues with tor-fw-helper-natpmp on windowsNick Mathewson2013-03-15
| | | | | | | | | | | | | | This isn't going to be the last of these issues, but we might as well take the fixes as we find them. Patch from Gisle Vanem, fixes bug 7280.
* | Fix brackets in tor-fw-helper help output.David Fifield2013-03-15
|/ | | | | | | Change nesting from [(]) to [()]. Formerly it made it look to me at first glance that "internal port" was optional. [Trivial change; fixes #7767 --nickm]
* Update the copyright date to 201.Nick Mathewson2013-01-16
|
* Fix undefined reference to libm functions linking tor-fw-helperAnthony G. Basile2012-10-28
| | | | | | | | | | | When configuring tor without upnp support, ie ./configure --disable-upnp, tor-fw-helper fails to link with undefined references to `ceil' and `log'. This if fixed by linking to libm. X-Gentoo-Bug: 435040 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=435040 Reported-by: Alexandre <alexandre.cortes@outlook.com> Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* Convert all include-guard macros to avoid reserved identifiers.Nick Mathewson2012-10-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In C, we technically aren't supposed to define our own things that start with an underscore. This is a purely machine-generated commit. First, I ran this script on all the headers in src/{common,or,test,tools/*}/*.h : ============================== use strict; my %macros = (); my %skipped = (); FILE: for my $fn (@ARGV) { my $f = $fn; if ($fn !~ /^\.\//) { $f = "./$fn"; } $skipped{$fn} = 0; open(F, $fn); while (<F>) { if (/^#ifndef ([A-Za-z0-9_]+)/) { $macros{$fn} = $1; next FILE; } } } print "#!/usr/bin/perl -w -i -p\n\n"; for my $fn (@ARGV) { if (! exists $macros{$fn}) { print "# No macro known for $fn!\n" if (!$skipped{$fn}); next; } if ($macros{$fn} !~ /_H_?$/) { print "# Weird macro for $fn...\n"; } my $goodmacro = uc $fn; $goodmacro =~ s#.*/##; $goodmacro =~ s#[\/\-\.]#_#g; print "s/(?<![A-Za-z0-9_])$macros{$fn}(?![A-Za-z0-9_])/TOR_${goodmacro}/g;\n" } ============================== It produced the following output, which I then re-ran on those same files: ============================== s/(?<![A-Za-z0-9_])_TOR_ADDRESS_H(?![A-Za-z0-9_])/TOR_ADDRESS_H/g; s/(?<![A-Za-z0-9_])_TOR_AES_H(?![A-Za-z0-9_])/TOR_AES_H/g; s/(?<![A-Za-z0-9_])_TOR_COMPAT_H(?![A-Za-z0-9_])/TOR_COMPAT_H/g; s/(?<![A-Za-z0-9_])_TOR_COMPAT_LIBEVENT_H(?![A-Za-z0-9_])/TOR_COMPAT_LIBEVENT_H/g; s/(?<![A-Za-z0-9_])_TOR_CONTAINER_H(?![A-Za-z0-9_])/TOR_CONTAINER_H/g; s/(?<![A-Za-z0-9_])_TOR_CRYPTO_H(?![A-Za-z0-9_])/TOR_CRYPTO_H/g; s/(?<![A-Za-z0-9_])TOR_DI_OPS_H(?![A-Za-z0-9_])/TOR_DI_OPS_H/g; s/(?<![A-Za-z0-9_])_TOR_MEMAREA_H(?![A-Za-z0-9_])/TOR_MEMAREA_H/g; s/(?<![A-Za-z0-9_])_TOR_MEMPOOL_H(?![A-Za-z0-9_])/TOR_MEMPOOL_H/g; s/(?<![A-Za-z0-9_])TOR_PROCMON_H(?![A-Za-z0-9_])/TOR_PROCMON_H/g; s/(?<![A-Za-z0-9_])_TOR_TORGZIP_H(?![A-Za-z0-9_])/TOR_TORGZIP_H/g; s/(?<![A-Za-z0-9_])_TOR_TORINT_H(?![A-Za-z0-9_])/TOR_TORINT_H/g; s/(?<![A-Za-z0-9_])_TOR_LOG_H(?![A-Za-z0-9_])/TOR_TORLOG_H/g; s/(?<![A-Za-z0-9_])_TOR_TORTLS_H(?![A-Za-z0-9_])/TOR_TORTLS_H/g; s/(?<![A-Za-z0-9_])_TOR_UTIL_H(?![A-Za-z0-9_])/TOR_UTIL_H/g; s/(?<![A-Za-z0-9_])_TOR_BUFFERS_H(?![A-Za-z0-9_])/TOR_BUFFERS_H/g; s/(?<![A-Za-z0-9_])_TOR_CHANNEL_H(?![A-Za-z0-9_])/TOR_CHANNEL_H/g; s/(?<![A-Za-z0-9_])_TOR_CHANNEL_TLS_H(?![A-Za-z0-9_])/TOR_CHANNELTLS_H/g; s/(?<![A-Za-z0-9_])_TOR_CIRCUITBUILD_H(?![A-Za-z0-9_])/TOR_CIRCUITBUILD_H/g; s/(?<![A-Za-z0-9_])_TOR_CIRCUITLIST_H(?![A-Za-z0-9_])/TOR_CIRCUITLIST_H/g; s/(?<![A-Za-z0-9_])_TOR_CIRCUITMUX_EWMA_H(?![A-Za-z0-9_])/TOR_CIRCUITMUX_EWMA_H/g; s/(?<![A-Za-z0-9_])_TOR_CIRCUITMUX_H(?![A-Za-z0-9_])/TOR_CIRCUITMUX_H/g; s/(?<![A-Za-z0-9_])_TOR_CIRCUITUSE_H(?![A-Za-z0-9_])/TOR_CIRCUITUSE_H/g; s/(?<![A-Za-z0-9_])_TOR_COMMAND_H(?![A-Za-z0-9_])/TOR_COMMAND_H/g; s/(?<![A-Za-z0-9_])_TOR_CONFIG_H(?![A-Za-z0-9_])/TOR_CONFIG_H/g; s/(?<![A-Za-z0-9_])TOR_CONFPARSE_H(?![A-Za-z0-9_])/TOR_CONFPARSE_H/g; s/(?<![A-Za-z0-9_])_TOR_CONNECTION_EDGE_H(?![A-Za-z0-9_])/TOR_CONNECTION_EDGE_H/g; s/(?<![A-Za-z0-9_])_TOR_CONNECTION_H(?![A-Za-z0-9_])/TOR_CONNECTION_H/g; s/(?<![A-Za-z0-9_])_TOR_CONNECTION_OR_H(?![A-Za-z0-9_])/TOR_CONNECTION_OR_H/g; s/(?<![A-Za-z0-9_])_TOR_CONTROL_H(?![A-Za-z0-9_])/TOR_CONTROL_H/g; s/(?<![A-Za-z0-9_])_TOR_CPUWORKER_H(?![A-Za-z0-9_])/TOR_CPUWORKER_H/g; s/(?<![A-Za-z0-9_])_TOR_DIRECTORY_H(?![A-Za-z0-9_])/TOR_DIRECTORY_H/g; s/(?<![A-Za-z0-9_])_TOR_DIRSERV_H(?![A-Za-z0-9_])/TOR_DIRSERV_H/g; s/(?<![A-Za-z0-9_])_TOR_DIRVOTE_H(?![A-Za-z0-9_])/TOR_DIRVOTE_H/g; s/(?<![A-Za-z0-9_])_TOR_DNS_H(?![A-Za-z0-9_])/TOR_DNS_H/g; s/(?<![A-Za-z0-9_])_TOR_DNSSERV_H(?![A-Za-z0-9_])/TOR_DNSSERV_H/g; s/(?<![A-Za-z0-9_])TOR_EVENTDNS_TOR_H(?![A-Za-z0-9_])/TOR_EVENTDNS_TOR_H/g; s/(?<![A-Za-z0-9_])_TOR_GEOIP_H(?![A-Za-z0-9_])/TOR_GEOIP_H/g; s/(?<![A-Za-z0-9_])_TOR_HIBERNATE_H(?![A-Za-z0-9_])/TOR_HIBERNATE_H/g; s/(?<![A-Za-z0-9_])_TOR_MAIN_H(?![A-Za-z0-9_])/TOR_MAIN_H/g; s/(?<![A-Za-z0-9_])_TOR_MICRODESC_H(?![A-Za-z0-9_])/TOR_MICRODESC_H/g; s/(?<![A-Za-z0-9_])_TOR_NETWORKSTATUS_H(?![A-Za-z0-9_])/TOR_NETWORKSTATUS_H/g; s/(?<![A-Za-z0-9_])_TOR_NODELIST_H(?![A-Za-z0-9_])/TOR_NODELIST_H/g; s/(?<![A-Za-z0-9_])_TOR_NTMAIN_H(?![A-Za-z0-9_])/TOR_NTMAIN_H/g; s/(?<![A-Za-z0-9_])_TOR_ONION_H(?![A-Za-z0-9_])/TOR_ONION_H/g; s/(?<![A-Za-z0-9_])_TOR_OR_H(?![A-Za-z0-9_])/TOR_OR_H/g; s/(?<![A-Za-z0-9_])_TOR_POLICIES_H(?![A-Za-z0-9_])/TOR_POLICIES_H/g; s/(?<![A-Za-z0-9_])_TOR_REASONS_H(?![A-Za-z0-9_])/TOR_REASONS_H/g; s/(?<![A-Za-z0-9_])_TOR_RELAY_H(?![A-Za-z0-9_])/TOR_RELAY_H/g; s/(?<![A-Za-z0-9_])_TOR_RENDCLIENT_H(?![A-Za-z0-9_])/TOR_RENDCLIENT_H/g; s/(?<![A-Za-z0-9_])_TOR_RENDCOMMON_H(?![A-Za-z0-9_])/TOR_RENDCOMMON_H/g; s/(?<![A-Za-z0-9_])_TOR_RENDMID_H(?![A-Za-z0-9_])/TOR_RENDMID_H/g; s/(?<![A-Za-z0-9_])_TOR_RENDSERVICE_H(?![A-Za-z0-9_])/TOR_RENDSERVICE_H/g; s/(?<![A-Za-z0-9_])_TOR_REPHIST_H(?![A-Za-z0-9_])/TOR_REPHIST_H/g; s/(?<![A-Za-z0-9_])_TOR_REPLAYCACHE_H(?![A-Za-z0-9_])/TOR_REPLAYCACHE_H/g; s/(?<![A-Za-z0-9_])_TOR_ROUTER_H(?![A-Za-z0-9_])/TOR_ROUTER_H/g; s/(?<![A-Za-z0-9_])_TOR_ROUTERLIST_H(?![A-Za-z0-9_])/TOR_ROUTERLIST_H/g; s/(?<![A-Za-z0-9_])_TOR_ROUTERPARSE_H(?![A-Za-z0-9_])/TOR_ROUTERPARSE_H/g; s/(?<![A-Za-z0-9_])TOR_ROUTERSET_H(?![A-Za-z0-9_])/TOR_ROUTERSET_H/g; s/(?<![A-Za-z0-9_])TOR_STATEFILE_H(?![A-Za-z0-9_])/TOR_STATEFILE_H/g; s/(?<![A-Za-z0-9_])_TOR_STATUS_H(?![A-Za-z0-9_])/TOR_STATUS_H/g; s/(?<![A-Za-z0-9_])TOR_TRANSPORTS_H(?![A-Za-z0-9_])/TOR_TRANSPORTS_H/g; s/(?<![A-Za-z0-9_])_TOR_TEST_H(?![A-Za-z0-9_])/TOR_TEST_H/g; s/(?<![A-Za-z0-9_])_TOR_FW_HELPER_H(?![A-Za-z0-9_])/TOR_TOR_FW_HELPER_H/g; s/(?<![A-Za-z0-9_])_TOR_FW_HELPER_NATPMP_H(?![A-Za-z0-9_])/TOR_TOR_FW_HELPER_NATPMP_H/g; s/(?<![A-Za-z0-9_])_TOR_FW_HELPER_UPNP_H(?![A-Za-z0-9_])/TOR_TOR_FW_HELPER_UPNP_H/g; ==============================
* Fix some bugs that did not allow compilation on Windows.George Kadianakis2012-09-05
|
* General tweaks and fixes for Nick's comments.George Kadianakis2012-09-05
| | | | | | | | | | | | | | | * Add changes/ files. * Edit the tor-fw-helper manpage. * Fix check-spaces. * Add prototype for get_list_of_ports_to_forward(). * Fix tor_parse_long() TCP port range. * Improve doc. of tor_check_port_forwarding(). * Check for overflows in tor_check_port_forwarding(). * Demote successful port forwarding to LOG_INFO. Conflicts: src/common/address.c src/or/circuitbuild.c
* Tweak code and pump the tor-fw-helper version.George Kadianakis2012-09-05
| | | | | Conflicts: src/or/circuitbuild.h
* All loging messages are now sent to stderr.George Kadianakis2012-09-05
| | | | stdout should be clean for control messages.
* Refactor our backends' interface.George Kadianakis2012-09-05
|
* Further implement tor-fw-helper's TCP port forwarding system.George Kadianakis2012-09-05
|
* Implement the new TCP port parsing logic in tor-fw-helper.George Kadianakis2012-09-05
|
* Refactor tor-fw-helper port forwarding logic.George Kadianakis2012-09-05
| | | | | Make it port-purpose-agnostic; that is it should treat each port as equal, and not expect to get a DirPort and an ORPort.
* Move to non-recursive makeStewart Smith2012-08-09
| | | | | | | | | | | | | | | | | | | | This gives us a few benefits: 1) make -j clean all this will start working, as it should. It currently doesn't. 2) increased parallel build recursive make will max out at number of files in a directory, non-recursive make doesn't have such a limitation 3) Removal of duplicate information in make files, less error prone I've also slightly updated how we call AM_INIT_AUTOMAKE, as the way that was used was not only deprecated but will be *removed* in the next major automake release (1.13).... so probably best that we can continue to bulid tor without requiring old automake. (see http://www.gnu.org/software/automake/manual/html_node/Public-Macros.html ) For more reasons why, see resources such as: http://miller.emu.id.au/pmiller/books/rmch/
* Update copyright dates to 2012; add a few missing copyright statementsNick Mathewson2012-06-04
|
* Fix compile error against miniupnpc-1.6 when --enable-upnpAnthony G. Basile2012-04-24
| | | | | | | | | | | | | The bump from miniupnpc-1.5 to 1.6 changes the definition of two functions used by tor-fw-helper-upnp.c, upnpDiscover() and UPNP_AddPortMapping(). This patch addresses this and adds a check in configure.in for backwards compatibility. Thanks to Nickolay Kolchin-Semyonov for some hints. X-Tor-Bug-URL: https://trac.torproject.org/projects/tor/ticket/5434 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=376621 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* Include compat.h from natpmp-helper to fix buildSebastian Hahn2012-02-14
| | | | This means tor_socket_t is declared.
* Use the standard _WIN32, not the Torism MS_WINDOWS or deprecated WIN32Nick Mathewson2012-01-31
| | | | | | | | | | | This commit is completely mechanical; I used this perl script to make it: #!/usr/bin/perl -w -i.bak -p if (/^\s*\#/) { s/MS_WINDOWS/_WIN32/g; s/\bWIN32\b/_WIN32/g; }
* Use tor_socket_t, not unsigned, in tor-fw-helper-natmp.cNick Mathewson2012-01-18
|
* Fix compilation of natpmp-helper on non-windowsSebastian Hahn2011-12-10
| | | | Fixes a small oversight in 5dbfb1b3e0efc95be34ba7d69852511c9bac1f4b.
* Make file descriptor type an unsigned integerSteven Murdoch2011-11-30
| | | | | This avoids a warning from gcc (comparison between signed and unsigned integer expressions [-Werror=sign-compare]), under Windows
* Support NAT-PMP on WindowsSteven Murdoch2011-11-30
| | | | | | | | - Link in libws32 and libiphlpapi, needed for libnatpmp (both in ./configure and when compiling tor-fw-helper-natpmp.c) - Define STATICLIB under Windows, to allow tor-fw-helper-natpmp.c to link - Don't include arpa/inet.h which isn't present in Mingw32 and doesn't appear to be needed on either Windows or MacOS X
* Correct reference to libiphlpapi from libiphlapiSteven Murdoch2011-08-22
|
* Appease "make check spaces"Steven Murdoch2011-08-22
|
* Only link ws2_32 and iphlapi on windows.Nick Mathewson2011-08-19
| | | | This is a tweak for the tor-fw-helper port to windows.
* Link and build tor-fw-helper on WindowsSteven Murdoch2011-08-19
| | | | | | | | | | | | | - Update configure script to test for libminiupnpc along with the libws2_32 and libiphlpapi libraries required by libminiupnpc - When building tor-fw-helper, link in libiphlpapi - Link in libminiupnpc statically becasue I could not get the DLL to link properly - Call WSAStartup before doing network operations - Fix up a compiler warning about uninitialized backend_state N.B. The changes to configure.in and Makefile.am will break on non- Windows platforms.
* Re-order tor_fw_helper_LDADD flags so that they workNick Mathewson2011-08-01
| | | | Patch from "blueness".
* Fix tor-fw-helper-natpmp.c API usageJacob Appelbaum2011-06-20
| | | | | | libnatpmp-20110618 changed the API that tor-fw-helper used and for a time tor-fw-helper could not build against the newest libnatpmp. This patch brings support for libnatpmp to tor-fw-helper.
* Bump copyright statements to 2011 (master)Nick Mathewson2011-01-03
|
* Fix up tor-fw-helper "INCLUDES" directiveNick Mathewson2010-11-11
|
* Split long lines in configure.in and Makefile.am filesNick Mathewson2010-11-11
| | | | | | | | | | Having very long single lines with lots and lots of things in them tends to make files hard to diff and hard to merge. Since our tools are one-line-at-a-time, we should try to construct lists that way too, within reason. This incidentally turned up a few headers in configure.in that we were for some reason searching for twice.
* Fix space and formatting issuesNick Mathewson2010-09-30
|
* Turn select() usage in tor-fw-helper into a function.Nick Mathewson2010-09-30
|
* Start tor-fw-helper in the background, and log whatever it outputsSteven Murdoch2010-09-30
|
* Changes to tor-fw-helper, some based on Nick's reviewJacob Appelbaum2010-09-30
| | | | | | | | | | | | | | | | | | | * MINIUPNPC rather than the generic UPNP * Nick suggested a better abstraction model for tor-fw-helper * Fix autoconf to build with either natpmp or miniupnpc * Add AM_PROG_CC_C_O to fix automake complaint * update spec to address nickm's concern * refactor nat-pmp to match upnp state * we prefer tor_snprintf to snprintf * link properlty for tor_snprintf * rename test_commandline_options to log_commandline_options * cast this uint as an int * detect possible FD_SETSIZE errors * make note about future enhancements for natpmp * add upnp enhancement note * ChangeLog entry * doxygen and check-spaces cleanup * create tor-fw-helper.1.txt
* First implementation of tor-fw-helper.Jacob Appelbaum2010-09-30
tor-fw-helper is a command-line tool to wrap and abstract various firewall port-forwarding tools. This commit matches the state of Jacob's tor-fw-helper branch as of 23 September 2010. (commit msg by Nick)