config/libc.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Apr 26 21:31:05 2008 +0000 (2008-04-26)
changeset 454 372b2f397baa
parent 446 d205527c5e01
child 710 021546adce69
permissions -rw-r--r--
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(-)
yann@1
     1
# C library options
yann@1
     2
yann@1
     3
menu "C-library"
yann@1
     4
yann@1
     5
choice
yann@1
     6
    bool
yann@1
     7
    prompt "C-library to use:"
yann@1
     8
    default LIBC_GLIBC
yann@1
     9
yann@1
    10
config LIBC_GLIBC
yann@1
    11
    bool
yann@1
    12
    prompt "glibc"
yann@95
    13
    select LIBC_SUPPORT_NPTL
yann@95
    14
    select LIBC_SUPPORT_LINUXTHREADS
yann@1
    15
yann@1
    16
config LIBC_UCLIBC
yann@1
    17
    bool
yann@1
    18
    prompt "uClibc"
yann@95
    19
    select LIBC_SUPPORT_LINUXTHREADS
yann@1
    20
yann@1
    21
endchoice
yann@1
    22
yann@1
    23
config LIBC_VERSION
yann@1
    24
    string
yann@1
    25
yann@1
    26
config LIBC
yann@1
    27
    string
yann@1
    28
    default "glibc" if LIBC_GLIBC
yann@1
    29
    default "uClibc" if LIBC_UCLIBC
yann@1
    30
yann@95
    31
config LIBC_SUPPORT_NPTL
yann@95
    32
    bool
yann@95
    33
    default n
yann@95
    34
yann@95
    35
config LIBC_SUPPORT_LINUXTHREADS
yann@95
    36
    bool
yann@95
    37
    default n
yann@95
    38
yann@1
    39
if LIBC_GLIBC
yann@448
    40
source config/libc/glibc.in
yann@1
    41
endif
yann@1
    42
yann@1
    43
if LIBC_UCLIBC
yann@448
    44
source config/libc/uClibc.in
yann@1
    45
endif
yann@1
    46
yann@1
    47
endmenu