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(-)
9 prompt "2.95.3 (OBSOLETE)"
14 prompt "3.2.3 (OBSOLETE)"
19 prompt "3.3.6 (OBSOLETE)"
24 prompt "3.4.6 (OBSOLETE)"
29 prompt "4.0.0 (OBSOLETE)"
34 prompt "4.0.1 (OBSOLETE)"
39 prompt "4.0.2 (OBSOLETE)"
44 prompt "4.0.3 (OBSOLETE)"
53 prompt "4.1.0 (OBSOLETE)"
58 prompt "4.1.1 (OBSOLETE)"
79 prompt "4.2.3 (EXPERIMENTAL)"
80 depends on EXPERIMENTAL
82 # CT_INSERT_VERSION_ABOVE
83 # Don't remove above line!
88 default "2.95.3" if CC_V_2_95_3
89 default "3.2.3" if CC_V_3_2_3
90 default "3.3.6" if CC_V_3_3_6
91 default "3.4.6" if CC_V_3_4_6
92 default "4.0.0" if CC_V_4_0_0
93 default "4.0.1" if CC_V_4_0_1
94 default "4.0.2" if CC_V_4_0_2
95 default "4.0.3" if CC_V_4_0_3
96 default "4.0.4" if CC_V_4_0_4
97 default "4.1.0" if CC_V_4_1_0
98 default "4.1.1" if CC_V_4_1_1
99 default "4.1.2" if CC_V_4_1_2
100 default "4.2.0" if CC_V_4_2_0
101 default "4.2.1" if CC_V_4_2_1
102 default "4.2.2" if CC_V_4_2_2
103 default "4.2.3" if CC_V_4_2_3
104 # CT_INSERT_VERSION_STRING_ABOVE
105 # Don't remove above line!
109 prompt "__cxa_atexit"
112 If you get the missing symbol "__cxa_atexit" when building C++ programs,
113 you might want to try disabling this option.
115 config CC_CORE_EXTRA_CONFIG
117 prompt "Core gcc extra config"
120 Extra flags to pass onto ./configure when configuring the core gcc.
122 The core gcc is a stripped down, C-only compiler needed to build
123 the C library. Kinda bootstrap gcc, if you wish.
125 config CC_EXTRA_CONFIG
127 prompt "gcc extra config"
130 Extra flags to pass onto ./configure when configuring gcc.