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(-)
5 prompt "uClibc version"
9 prompt "latest snapshot"
11 config LIBC_V_specific_date
13 prompt "<specific date>"
17 prompt "0.9.28 (OBSOLETE)"
20 config LIBC_V_0_9_28_1
22 prompt "0.9.28.1 (OBSOLETE)"
25 config LIBC_V_0_9_28_2
27 prompt "0.9.28.2 (OBSOLETE)"
30 config LIBC_V_0_9_28_3
38 # CT_INSERT_VERSION_ABOVE
39 # Don't remove above line!
44 prompt "Enter date (YYYYMMDD)" if LIBC_V_specific_date
45 default "snapshot" if LIBC_V_snapshot
46 default "0.9.28" if LIBC_V_0_9_28
47 default "0.9.28.1" if LIBC_V_0_9_28_1
48 default "0.9.28.2" if LIBC_V_0_9_28_2
49 default "0.9.28.3" if LIBC_V_0_9_28_3
50 default "0.9.29" if LIBC_V_0_9_29
51 # CT_INSERT_VERSION_STRING_ABOVE
52 # Don't remove above line!
54 Enter the date of the snapshot you want to use in the form: YYYYMMDD
55 where YYYY is the 4-digit year, MM the 2-digit month and DD the 2-digit
58 Please note that uClibc site removes snapshots older than a month.
63 default LIBC_UCLIBC_DEBUG_LEVEL_0
65 config LIBC_UCLIBC_DEBUG_LEVEL_0
69 config LIBC_UCLIBC_DEBUG_LEVEL_1
73 config LIBC_UCLIBC_DEBUG_LEVEL_2
79 config LIBC_UCLIBC_DEBUG_LEVEL
81 default 0 if LIBC_UCLIBC_DEBUG_LEVEL_0
82 default 1 if LIBC_UCLIBC_DEBUG_LEVEL_1
83 default 2 if LIBC_UCLIBC_DEBUG_LEVEL_2
85 config LIBC_UCLIBC_CONFIG_FILE
87 prompt "Configuration file"
90 Path to the configuration file.
92 You _must_ provide one (for now).
94 config LIBC_UCLIBC_LOCALES
96 prompt "Add support for locales"
99 Say y if you want uClibc to support localisation.
101 Note that seems to be broken on recent uClibc releases.