Configure tsocks with a simple heuristic.
Consider the proxy has to be in a 'local' network. It means it is directly
reachable by the local machine, even if the local machine has to hop through
one or more gates to reach the proxy (often the case in enterprise networks
where class A 10.0.0.0/8 is in fact sub-divided into smaller networks, each
one of them in a different location, eg. 10.1.0.0/16 in a place, while
10.2.0.0/16 would be on the other side of the world). Not being in the same
subnet does not mean the proxy is not available.
So we will build a mask with at most high bits set, which defines a network
that has both the local machine and the proxy. Because a machine may have
more than one interface, build a mask for each of them, removing 127.0.0.1
which is added automagically by tsocks, and removing duplicate masks.
If all of this does not work, then it means the local machine can NOT in fact
reach the proxy, which in turn means the user mis-configured something (most
probably a typo...).
/trunk/scripts/crosstool.sh | 61 52 9 0 +++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 52 insertions(+), 9 deletions(-)
1 --- gdb-6.3/bfd/configure.orig Fri Oct 8 16:53:56 2004
2 +++ gdb-6.3/bfd/configure Sun Feb 27 18:32:58 2005
4 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
8 + lt_cv_deplibs_check_method=pass_all
9 + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
12 netbsd* | knetbsd*-gnu)
13 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
14 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
15 --- gdb-6.3/libtool.m4.orig Wed Jul 21 21:21:41 2004
16 +++ gdb-6.3/libtool.m4 Mon Feb 28 00:08:11 2005
22 + lt_cv_deplibs_check_method=pass_all
23 + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
27 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
28 lt_cv_file_magic_cmd=/usr/bin/file
29 --- gdb-6.3/ltconfig.orig Tue Oct 5 15:34:42 2004
30 +++ gdb-6.3/ltconfig Sun Feb 27 18:14:41 2005
33 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
36 +linux-gnu*|linux-uclibc*) ;;
37 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
40 @@ -1270,6 +1270,24 @@
41 dynamic_linker='GNU/Linux ld.so'
48 + library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
49 + soname_spec='${libname}${release}.so$major'
50 + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
51 + shlibpath_var=LD_LIBRARY_PATH
52 + shlibpath_overrides_runpath=no
53 + # This implies no fast_install, which is unacceptable.
54 + # Some rework will be needed to allow for fast_install
55 + # before this can be enabled.
56 + # Note: copied from linux-gnu, and may not be appropriate.
57 + hardcode_into_libs=yes
58 + # Assume using the uClibc dynamic linker.
59 + dynamic_linker="uClibc ld.so"
65 --- gdb-6.3/opcodes/configure.orig Fri Sep 17 08:13:38 2004
66 +++ gdb-6.3/opcodes/configure Mon Feb 28 00:09:42 2005
67 @@ -3595,6 +3595,11 @@
72 + lt_cv_deplibs_check_method=pass_all
73 + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
77 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
78 lt_cv_file_magic_cmd=/usr/bin/file