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(-)
7 prompt "C compiler flavour"
14 select CC_SUPPORT_FORTRAN
15 select CC_SUPPORT_JAVA
17 select CC_SUPPORT_OBJC
18 select CC_SUPPORT_OBJCXX
20 gcc is the full-blown GNU compiler. This is what most people will choose.
22 gcc supports many languages, a powerful code parser, optimised binary
23 output, and lots of other features.
32 default "gcc" if CC_GCC
35 source config/cc/gcc.in
41 config CC_SUPPORT_FORTRAN
44 config CC_SUPPORT_JAVA
50 config CC_SUPPORT_OBJC
53 config CC_SUPPORT_OBJCXX
56 comment "Additional supported languages:"
62 depends on CC_SUPPORT_CXX
64 Enable building a C++ compiler.
66 Only select this if you know that your specific version of the
67 compiler supports this language.
69 config CC_LANG_FORTRAN
73 depends on CC_SUPPORT_FORTRAN
75 Enable building a FORTRAN compiler.
77 Only select this if you know that your specific version of the
78 compiler supports this language.
84 depends on CC_SUPPORT_JAVA
86 Enable building a Java compiler.
88 Only select this if you know that your specific version of the
89 compiler supports this language.
95 depends on CC_SUPPORT_ADA
97 Enable building an Ada compiler.
99 Only select this if you know that your specific version of the
100 compiler supports this language.
106 depends on CC_SUPPORT_OBJC
108 Enable building an Objective C compiler.
110 Only select this if you know that your specific version of the
111 compiler supports this language.
113 config CC_LANG_OBJCXX
115 prompt "Objective-C++"
117 depends on CC_SUPPORT_OBJCXX
119 Enable building an Objective C++ compiler.
121 Only select this if you know that your specific version of the
122 compiler supports this language.
124 config CC_LANG_OTHERS
126 prompt "Other languages"
129 Enter here a comma-separated list of languages that you know your compiler
130 supports, besides those listed above.
132 Eg. gcc-4.1+ has a toy programming language, treelang. As it is not usefull
133 in real life, it is not available in the selection above.