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 # crosstool-NG version: 0.3.2+svn
4 # Wed Jan 16 23:20:35 2008
9 # Paths and misc options
13 # crosstool-NG behavior
17 # CT_BROKEN is not set
19 # CT_DEBUG_CT_PAUSE_STEPS is not set
20 CT_DEBUG_CT_SAVE_STEPS=y
21 CT_DEBUG_CT_SAVE_STEPS_GZIP=y
34 CT_LOCAL_TARBALLS_DIR="${HOME}/dev/src"
36 CT_PREFIX_DIR="${HOME}/${CT_TARGET}"
37 CT_INSTALL_DIR="${CT_PREFIX_DIR}"
38 # CT_CUSTOM_PATCH is not set
39 # CT_REMOVE_DOCS is not set
40 # CT_INSTALL_DIR_RO is not set
45 # CT_FORCE_DOWNLOAD is not set
46 # CT_ONLY_DOWNLOAD is not set
51 # CT_FORCE_EXTRACT is not set
52 # CT_ONLY_EXTRACT is not set
57 # CT_LOG_ERROR is not set
58 # CT_LOG_WARN is not set
59 # CT_LOG_INFO is not set
61 # CT_LOG_DEBUG is not set
62 # CT_LOG_ALL is not set
63 CT_LOG_LEVEL_MAX="EXTRA"
64 # CT_LOG_SEE_TOOLS_WARN is not set
67 CT_LOG_FILE_COMPRESS=y
74 # General target options
77 # CT_ARCH_ARM is not set
79 # CT_ARCH_SH is not set
80 # CT_ARCH_MIPS is not set
81 # CT_ARCH_x86 is not set
82 # CT_ARCH_x86_64 is not set
83 CT_ARCH_SUPPORTS_BOTH_ENDIAN=y
84 # CT_ARCH_DEFAULT_BE is not set
85 # CT_ARCH_DEFAULT_LE is not set
86 # CT_ARCH_BE is not set
90 # Target optimisations
98 # CT_ARCH_FLOAT_SW is not set
106 # General toolchain options
110 # CT_THREADS_NPTL is not set
111 CT_THREADS_LINUXTHREADS=y
112 # CT_THREADS_NONE is not set
113 CT_THREADS="linuxthreads"
114 CT_TARGET_VENDOR="unknown"
115 CT_TARGET_ALIAS_SED_EXPR=""
121 # CT_NATIVE is not set
123 # CT_CROSS_NATIVE is not set
124 # CT_CANADIAN is not set
125 CT_TOOLCHAIN_TYPE="cross"
133 CT_KERNEL_VERSION="2.6.22.5"
134 CT_KERNEL_LINUX_HEADERS_INSTALL=y
135 # CT_KERNEL_LINUX_HEADERS_SANITISED is not set
136 # CT_KERNEL_LINUX_HEADERS_COPY is not set
137 # CT_KERNEL_LINUX_HEADERS_USE_CUSTOM_DIR is not set
139 CT_KERNEL_VERSION_SEE_EXTRAVERSION=y
140 # CT_KERNEL_INSTALL_V_2_6_18_8 is not set
141 # CT_KERNEL_INSTALL_V_2_6_19_7 is not set
142 # CT_KERNEL_INSTALL_V_2_6_20_15 is not set
143 # CT_KERNEL_INSTALL_V_2_6_21_7 is not set
144 # CT_KERNEL_INSTALL_V_2_6_22 is not set
145 # CT_KERNEL_INSTALL_V_2_6_22_1 is not set
146 # CT_KERNEL_INSTALL_V_2_6_22_2 is not set
147 # CT_KERNEL_INSTALL_V_2_6_22_3 is not set
148 # CT_KERNEL_INSTALL_V_2_6_22_4 is not set
149 CT_KERNEL_INSTALL_V_2_6_22_5=y
150 # CT_KERNEL_INSTALL_V_2_6_22_6 is not set
151 # CT_KERNEL_INSTALL_V_2_6_22_7 is not set
152 # CT_KERNEL_INSTALL_V_2_6_22_8 is not set
153 # CT_KERNEL_INSTALL_V_2_6_22_9 is not set
154 # CT_KERNEL_INSTALL_V_2_6_22_10 is not set
155 # CT_KERNEL_INSTALL_V_2_6_23 is not set
156 # CT_KERNEL_INSTALL_V_2_6_23_1 is not set
157 # CT_KERNEL_LINUX_HEADERS_INSTALL_CHECK is not set
158 CT_KERNEL_LINUX_VERBOSITY_0=y
159 # CT_KERNEL_LINUX_VERBOSITY_1 is not set
160 # CT_KERNEL_LINUX_VERBOSITY_2 is not set
161 CT_KERNEL_LINUX_VERBOSE_LEVEL=0
162 # CT_KERNEL_LINUX_NEEDS_CONFIG is not set
167 CT_BINUTILS_VERSION="2.18"
168 # CT_BINUTILS_V_2_14 is not set
169 # CT_BINUTILS_V_2_15 is not set
170 # CT_BINUTILS_V_2_16_1 is not set
171 # CT_BINUTILS_V_2_17 is not set
173 CT_BINUTILS_EXTRA_CONFIG=""
179 CT_CC_VERSION="3.4.6"
181 # CT_CC_V_2_95_3 is not set
182 # CT_CC_V_3_2_3 is not set
183 # CT_CC_V_3_3_6 is not set
185 # CT_CC_V_4_0_0 is not set
186 # CT_CC_V_4_0_1 is not set
187 # CT_CC_V_4_0_2 is not set
188 # CT_CC_V_4_0_3 is not set
189 # CT_CC_V_4_0_4 is not set
190 # CT_CC_V_4_1_0 is not set
191 # CT_CC_V_4_1_1 is not set
192 # CT_CC_V_4_1_2 is not set
193 # CT_CC_V_4_2_0 is not set
194 # CT_CC_V_4_2_1 is not set
195 # CT_CC_V_4_2_2 is not set
197 CT_CC_CORE_EXTRA_CONFIG=""
198 CT_CC_EXTRA_CONFIG=""
200 CT_CC_SUPPORT_FORTRAN=y
204 CT_CC_SUPPORT_OBJCXX=y
207 # Additional supported languages:
209 # CT_CC_LANG_CXX is not set
210 # CT_CC_LANG_FORTRAN is not set
211 # CT_CC_LANG_JAVA is not set
212 # CT_CC_LANG_ADA is not set
213 # CT_CC_LANG_OBJC is not set
214 # CT_CC_LANG_OBJCXX is not set
221 # CT_LIBC_UCLIBC is not set
222 CT_LIBC_VERSION="2.3.6"
224 CT_LIBC_SUPPORT_NPTL=y
225 CT_LIBC_SUPPORT_LINUXTHREADS=y
227 # CT_LIBC_V_2_5 is not set
228 # CT_LIBC_V_2_5_1 is not set
229 # CT_LIBC_V_2_6 is not set
230 # CT_LIBC_V_2_6_1 is not set
231 # CT_LIBC_V_2_7 is not set
232 CT_LIBC_GLIBC_EXTRA_CONFIG=""
233 CT_LIBC_GLIBC_EXTRA_CFLAGS=""
234 CT_LIBC_EXTRA_CC_ARGS=""
235 CT_LIBC_GLIBC_CONFIGPARMS=""
236 # CT_LIBC_GLIBC_USE_PORTS is not set
237 # CT_LIBC_ADDONS is not set
242 # CT_SSTRIP is not set
247 # CT_DMALLOC is not set
250 # CT_STRACE is not set