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(-)
2 # Automatically generated make config: don't edit
3 # Sun Jul 8 23:49:20 2007
5 # TARGET_alpha is not set
6 # TARGET_arm is not set
7 # TARGET_bfin is not set
8 # TARGET_cris is not set
10 # TARGET_frv is not set
11 # TARGET_h8300 is not set
12 # TARGET_hppa is not set
14 # TARGET_i960 is not set
15 # TARGET_ia64 is not set
16 # TARGET_m68k is not set
17 # TARGET_microblaze is not set
18 # TARGET_mips is not set
19 # TARGET_nios is not set
20 # TARGET_nios2 is not set
21 # TARGET_powerpc is not set
22 # TARGET_sh is not set
23 # TARGET_sh64 is not set
24 # TARGET_sparc is not set
25 # TARGET_v850 is not set
26 # TARGET_vax is not set
27 # TARGET_x86_64 is not set
30 # Target Architecture Features and Options
33 FORCE_OPTIONS_FOR_ARCH=y
34 # CONFIG_GENERIC_386 is not set
35 # CONFIG_386 is not set
36 # CONFIG_486 is not set
37 # CONFIG_586 is not set
39 # CONFIG_686 is not set
40 # CONFIG_PENTIUMII is not set
41 # CONFIG_PENTIUMIII is not set
42 # CONFIG_PENTIUM4 is not set
43 # CONFIG_K6 is not set
44 # CONFIG_K7 is not set
45 # CONFIG_ELAN is not set
46 # CONFIG_CRUSOE is not set
47 # CONFIG_WINCHIPC6 is not set
48 # CONFIG_WINCHIP2 is not set
49 # CONFIG_CYRIXIII is not set
50 # CONFIG_NEHEMIAH is not set
54 # Using ELF file format
66 KERNEL_HEADERS="/usr/include"
70 # General Library Settings
72 # HAVE_NO_PIC is not set
74 # HAVE_NO_SHARED is not set
75 # ARCH_HAS_NO_LDSO is not set
77 # FORCE_SHAREABLE_TEXT_SEGMENTS is not set
80 # LDSO_PRELOAD_FILE_SUPPORT is not set
81 LDSO_BASE_FILENAME="ld.so"
82 UCLIBC_STATIC_LDCONFIG=y
83 # LDSO_RUNPATH is not set
85 # HAS_NO_THREADS is not set
87 # PTHREADS_DEBUG_SUPPORT is not set
91 # MALLOC_SIMPLE is not set
93 # MALLOC_GLIBC_COMPAT is not set
94 UCLIBC_DYNAMIC_ATEXIT=y
95 # COMPAT_ATEXIT is not set
96 # UCLIBC_SUSV3_LEGACY is not set
97 # UCLIBC_SUSV3_LEGACY_MACROS is not set
99 UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y
100 UCLIBC_HAS___PROGNAME=y
103 UCLIBC_HAS_TM_EXTENSIONS=y
104 UCLIBC_HAS_TZ_CACHING=y
106 UCLIBC_HAS_TZ_FILE_READ_MANY=y
107 UCLIBC_TZ_FILE_PATH="/etc/TZ"
110 # Advanced Library Settings
112 UCLIBC_PWD_BUFFER_SIZE=256
113 UCLIBC_GRP_BUFFER_SIZE=256
118 # UCLIBC_HAS_IPV6 is not set
120 UCLIBC_HAS_FULL_RPC=y
121 UCLIBC_HAS_REENTRANT_RPC=y
123 # UCLIBC_HAS_BSD_RES_CLOSE is not set
126 # String and Stdio Support
128 UCLIBC_HAS_STRING_GENERIC_OPT=y
129 UCLIBC_HAS_STRING_ARCH_OPT=y
130 UCLIBC_HAS_CTYPE_TABLES=y
131 UCLIBC_HAS_CTYPE_SIGNED=y
132 UCLIBC_HAS_CTYPE_UNSAFE=y
133 # UCLIBC_HAS_CTYPE_CHECKED is not set
134 # UCLIBC_HAS_CTYPE_ENFORCED is not set
136 # UCLIBC_HAS_LOCALE is not set
137 UCLIBC_HAS_HEXADECIMAL_FLOATS=y
138 UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y
139 UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9
140 # UCLIBC_HAS_SCANF_GLIBC_A_FLAG is not set
141 # UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set
142 # UCLIBC_HAS_STDIO_BUFSIZ_256 is not set
143 # UCLIBC_HAS_STDIO_BUFSIZ_512 is not set
144 # UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set
145 # UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set
146 UCLIBC_HAS_STDIO_BUFSIZ_4096=y
147 # UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set
148 # UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE is not set
149 UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4=y
150 # UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set
151 # UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set
152 UCLIBC_HAS_STDIO_GETC_MACRO=y
153 UCLIBC_HAS_STDIO_PUTC_MACRO=y
154 UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y
155 # UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set
156 UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y
157 UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
158 UCLIBC_HAS_PRINTF_M_SPEC=y
159 UCLIBC_HAS_ERRNO_MESSAGES=y
160 # UCLIBC_HAS_SYS_ERRLIST is not set
161 UCLIBC_HAS_SIGNUM_MESSAGES=y
162 # UCLIBC_HAS_SYS_SIGLIST is not set
163 UCLIBC_HAS_GNU_GETOPT=y
164 UCLIBC_HAS_GNU_GETSUBOPT=y
170 UCLIBC_HAS_REGEX_OLD=y
172 UCLIBC_HAS_FNMATCH_OLD=y
176 # UCLIBC_HAS_GNU_GLOB is not set
179 # Library Installation Options
181 SHARED_LIB_LOADER_PREFIX="$(DEVEL_PREFIX)/lib"
182 RUNTIME_PREFIX="/usr/$(TARGET_ARCH)-linux-uclibc/"
183 DEVEL_PREFIX="/usr/$(TARGET_ARCH)-linux-uclibc/usr/"
188 # UCLIBC_BUILD_PIE is not set
189 UCLIBC_HAS_ARC4RANDOM=y
190 # HAVE_NO_SSP is not set
191 # UCLIBC_HAS_SSP is not set
192 # UCLIBC_BUILD_RELRO is not set
193 # UCLIBC_BUILD_NOW is not set
194 # UCLIBC_BUILD_NOEXECSTACK is not set
197 # uClibc development/debugging options
199 CROSS_COMPILER_PREFIX=""
200 UCLIBC_EXTRA_CFLAGS=""
202 # DODEBUG_PT is not set
204 # DOASSERTS is not set
205 # SUPPORT_LD_DEBUG is not set
206 # SUPPORT_LD_DEBUG_EARLY is not set
207 # UCLIBC_MALLOC_DEBUGGING is not set
209 # EXTRA_WARNINGS is not set
211 # UCLIBC_MJN3_ONLY is not set