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(-)
1 # Options related to paths and install
5 config LOCAL_TARBALLS_DIR
7 prompt "Local tarballs directory"
10 If you have previously downloaded the tarballs, enter the PATH where
15 prompt "Save new tarballs"
17 depends on LOCAL_TARBALLS_DIR != ""
19 If you say 'y' here, new downloaded tarballs will be saved in the
20 directory you entered above.
24 prompt "Prefix directory"
25 default "${HOME}/${CT_TARGET}"
27 This is the path the toolchain will run from.
31 # prompt "Install directory"
32 default "${CT_PREFIX_DIR}"
34 # This is the path the target will be installed into.
36 # Normally, you would set this to ${CT_PREFIX_DIR}, but if for some reasons
37 # you can't write there, you can install somewhere else and have a third
38 # person do the install for you.
39 # The reason you might also want to install elsewhere is if you are going
40 # to package your shinny new toolchain for distribution.
44 prompt "Use custom patch directory"
47 If you have custom patches that you want to be applied, say 'Y' here and
48 enter the path directory below.
50 Note that you must ensure that the patch directory is arranged the same
51 way the official directory is.
53 config CUSTOM_PATCH_ONLY
55 prompt "Only use custom patches"
57 depends on CUSTOM_PATCH
59 Don't apply patches coming with crosstool-NG, only those patches available
60 in the directory below.
62 If you say 'N' here, then the patches provided with crosstool-NG will be
63 applied first, and then your patches.
65 config CUSTOM_PATCH_DIR
67 prompt "Custom patch directory"
69 depends on CUSTOM_PATCH
71 Enter the custom patch directory here.
75 prompt "Remove documentation"
78 Remove the installed documentation (man and info pages).
79 Gains around 8MiB for a uClibc-based, C and C++ compiler.
83 prompt "Render the toolchain read-only"
86 Render the directory of the toolchain (and its sub-directories)
89 Usefull for toolchains destined for production.