config/global/download_extract.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Apr 18 22:16:28 2008 +0000 (2008-04-18)
changeset 451 8a72f9bcf675
parent 450 4765aa0bd896
child 452 15fdb2eb2db3
permissions -rw-r--r--
Using SOCKS 4/5 proxy is no easy task:
- a machine may well be able to reach the proxy, even if it is not on the same sub-net(s) as the machine itself (absolutely legitimate)
- tsocks.conf needs a list of so-called 'local' networks that can be reached without the need for a SOCKS connection
- SOCKS proxies are expected to be in 'local' networks
- there is absolutely NO way to tell what networks are local, besides the sub-net(s) the machine is in

Therefore, appropriate configuration of SOCKS 4/5 configuration is really complex, and attempts to correctly overcome this issue are doomed.

/trunk/scripts/crosstool.sh | 52 46 6 0 ++++++++++++++++++++++++++++++++++----
/trunk/config/global/download_extract.in | 39 31 8 0 +++++++++++++++++++++++------
2 files changed, 77 insertions(+), 14 deletions(-)
     1 # Options specific to downloading and extracting packages
     2 
     3 comment "Downloading"
     4 
     5 config FORCE_DOWNLOAD
     6     bool
     7     prompt "Force downloads"
     8     default n
     9     help
    10       Force downloading tarballs, even if one already exists.
    11       
    12       Usefull if you suspect a tarball to be damaged.
    13 
    14 config ONLY_DOWNLOAD
    15     bool
    16     prompt "Stop after downloading tarballs"
    17     default n
    18     help
    19       Only download the tarballs. Exit once it done.
    20       
    21       Usefull to pre-retrieve the tarballs before going off-line.
    22 
    23 choice
    24     bool
    25     prompt "Proxy type"
    26     default USE_NO_PROXY
    27 
    28 config PROXY_TYPE_NONE
    29     bool
    30     prompt "No proxy"
    31     help
    32       Select this option if you have a direct connection to the internet,
    33       or if you already set the environment adequately.
    34 
    35 config PROXY_TYPE_HTTP
    36     bool
    37     prompt "HTTP proxy"
    38     help
    39       Use an HTTP proxy to connect to to the internet.
    40       Only the http and ftp protocols will be tunneled through this
    41       proxy.
    42 
    43       Alternatively to setting this option, you can set and export the
    44       following variables in your environment:
    45         ftp_proxy=http://user:passwd@proxy.server:port/
    46         http_proxy=http://user:passwd@proxy.server:port/
    47         https_proxy=http://user:passwd@proxy.server:port/
    48 
    49 # Haha! Here is an interesting feature/bug of mconf!
    50 # The following config entries will be shown out-side the
    51 # choice menu!
    52 # To add a third entry in the choice menu, add it after the
    53 # if...endif conditional below, and so on for a fourth entry...
    54 if PROXY_TYPE_HTTP
    55 
    56 config PROXY_HOST
    57     string
    58     prompt "hostname/IP"
    59 
    60 config PROXY_PORT
    61     int
    62     prompt "port"
    63     default 0
    64     
    65 config PROXY_USER
    66     string
    67     prompt "user name"
    68 
    69 config PROXY_PASS
    70     string
    71     prompt "password"
    72 
    73 endif # USE_HTTP_PROXY
    74 
    75 config PROXY_TYPE_SOCKS
    76     bool
    77     prompt "SOCKS 4/5 proxy (EXPERIMENTAL)"
    78     depends on EXPERIMENTAL
    79     help
    80       Use a Socks 4/5 proxy to connect to the internet.
    81       All protocols can get tunneled through this kind of proxy (depending
    82       on your proxy configuration, so;e do not allow all protocols, but
    83       chances are that protocols needed by crosstool-NG are allowed).
    84 
    85       Alternatively to setting this option, you can set and export the
    86       following variable in your environment:
    87         LD_PRELOAD=/path/to/your/tsocks-library.so
    88 
    89       In any case, wether you set this option or you export the aforementionned
    90       variable, you will _have_ to  configure the /etc/tsocks.conf file
    91       accordingly to your network setup.
    92 
    93       This option makes use of the tsocks library. You will have to have tsocks
    94       installed on your system, of course.
    95 
    96       If you think you do not know what tsocks is, or how to configure it,
    97       chances are that you do not need to set this option.
    98 
    99 if PROXY_TYPE_SOCKS
   100 
   101 choice
   102     bool
   103     prompt "type"
   104     default PROXY_TYPE_SOCKS_SYS
   105 
   106 config PROXY_TYPE_SOCKS_SYS
   107     bool
   108     prompt "Use system settings"
   109     help
   110       Use that if your system is already configured to
   111       connect to SOCKS 4/5 proxies.
   112 
   113 config PROXY_TYPE_SOCKS_AUTO
   114     bool
   115     prompt "Auto"
   116     help
   117       crosstool-NG will attempt to guess what type of
   118       SOCKS version the proxy speaks.
   119 
   120 config PROXY_TYPE_SOCKS_4
   121     bool
   122     prompt "SOCKS 4"
   123 
   124 config PROXY_TYPE_SOCKS_5
   125     bool
   126     prompt "SOCKS 5"
   127 
   128 endchoice
   129 
   130 if ! PROXY_TYPE_SOCKS_SYS
   131 
   132 comment "THIS IS HIGHLY EXPERIMENTAL!!!"
   133 
   134 config PROXY_HOST
   135     string
   136     prompt "hostname/IP"
   137 
   138 config PROXY_PORT
   139     int
   140     prompt "port"
   141     default 0
   142 
   143 config PROXY_USER
   144     string
   145     prompt "user name"
   146 
   147 config PROXY_PASS
   148     string
   149     prompt "password"
   150 
   151 endif # ! PROXY_TYPE_SOCKS_SYS
   152 
   153 endif # USE_SOCKS_PROXY
   154 
   155 endchoice
   156 
   157 config PROXY_TYPE
   158     string
   159     default "none"      if PROXY_TYPE_NONE
   160     default "http"      if PROXY_TYPE_HTTP
   161     default "sockssys"  if PROXY_TYPE_SOCKS_SYS
   162     default "socksauto" if PROXY_TYPE_SOCKS_AUTO
   163     default "socks4"    if PROXY_TYPE_SOCKS_4
   164     default "socks5"    if PROXY_TYPE_SOCKS_5
   165 
   166 # Force restore indentation
   167 config BREAK_INDENT
   168     bool
   169     default n
   170 
   171 if ! ONLY_DOWNLOAD
   172 
   173 comment "Extracting"
   174 
   175 config FORCE_EXTRACT
   176     bool
   177     prompt "Force extractions"
   178     default n
   179     help
   180       Force extraction of already exctracted tarballs.
   181       
   182       Usefull if you suspect a previous extract did not complete (eg. broken
   183       tarball), or you added a new set of patches for this component.
   184 
   185 config ONLY_EXTRACT
   186     bool
   187     prompt "Stop after extracting tarballs"
   188     default n
   189     help
   190       Exit after unpacking and patching tarballs.
   191       
   192       Usefull to look at the code before doing the build itself.
   193 
   194 endif # ! ONLY_DOWNLOAD