config/global.in
changeset 442 ab046c11fbf7
parent 441 f1326505e3e5
child 445 17aa08b441f2
     1.1 --- a/config/global.in	Sun Apr 13 22:46:02 2008 +0000
     1.2 +++ b/config/global.in	Thu Apr 17 18:07:26 2008 +0000
     1.3 @@ -251,23 +251,23 @@
     1.4      prompt "Proxy type"
     1.5      default USE_NO_PROXY
     1.6  
     1.7 -config USE_NO_PROXY
     1.8 +config PROXY_TYPE_NONE
     1.9      bool
    1.10      prompt "No proxy"
    1.11      help
    1.12        Select this option if you have a direct connection to the internet,
    1.13        or if you already set the environment adequately.
    1.14  
    1.15 -config USE_HTTP_PROXY
    1.16 +config PROXY_TYPE_HTTP
    1.17      bool
    1.18      prompt "HTTP proxy"
    1.19      help
    1.20        Use an HTTP proxy to connect to to the internet.
    1.21 -      Onlt the http and ftp protocols will be tunneled through this
    1.22 +      Only the http and ftp protocols will be tunneled through this
    1.23        proxy.
    1.24  
    1.25 -      Alternatively to setting this options, you can set and export
    1.26 -      the following variable in your environment:
    1.27 +      Alternatively to setting this option, you can set and export the
    1.28 +      following variables in your environment:
    1.29          ftp_proxy=http://user:passwd@proxy.server:port/
    1.30          http_proxy=http://user:passwd@proxy.server:port/
    1.31          https_proxy=http://user:passwd@proxy.server:port/
    1.32 @@ -277,28 +277,95 @@
    1.33  # choice menu!
    1.34  # To add a third entry in the choice menu, add it after the
    1.35  # if...endif conditional below, and so on for a fourth entry...
    1.36 -if USE_HTTP_PROXY
    1.37 +if PROXY_TYPE_HTTP
    1.38  
    1.39 -config HTTP_PROXY_HOST
    1.40 +config PROXY_HOST
    1.41      string
    1.42 -    prompt "HTTP proxy hostname/IP"
    1.43 +    prompt "hostname/IP"
    1.44  
    1.45 -config HTTP_PROXY_PORT
    1.46 +config PROXY_PORT
    1.47      int
    1.48 -    prompt "HTTP proxy port"
    1.49 +    prompt "port"
    1.50 +    default 0
    1.51      
    1.52 -config HTTP_PROXY_USER
    1.53 +config PROXY_USER
    1.54      string
    1.55 -    prompt "HTTP proxy user name"
    1.56 +    prompt "user name"
    1.57  
    1.58 -config HTTP_PROXY_PASSWD
    1.59 +config PROXY_PASS
    1.60      string
    1.61 -    prompt "HTTP proxy password"
    1.62 +    prompt "password"
    1.63  
    1.64  endif # USE_HTTP_PROXY
    1.65  
    1.66 +config PROXY_TYPE_SOCKS
    1.67 +    bool
    1.68 +    prompt "SOCKS 4/5 proxy"
    1.69 +    help
    1.70 +      Use a Socks 4/5 proxy to connect to the internet.
    1.71 +      All protocols can get tunneled through this kind of proxy (depending
    1.72 +      on your proxy configuration, so;e do not allow all protocols, but
    1.73 +      chances are that protocols needed by crosstool-NG are allowed).
    1.74 +
    1.75 +      Alternatively to setting this option, you can set and export the
    1.76 +      following variable in your environment:
    1.77 +        LD_PRELOAD=/path/to/your/tsocks-library.so
    1.78 +
    1.79 +      In any case, wether you set this option or you export the aforementionned
    1.80 +      variable, you will _have_ to  configure the /etc/tsocks.conf file
    1.81 +      accordingly to your network setup.
    1.82 +
    1.83 +      This option makes use of the tsocks library. You will have to have tsocks
    1.84 +      installed on your system, of course.
    1.85 +
    1.86 +      If you think you do not know what tsocks is, or how to configure it,
    1.87 +      chances are that you do not need to set this option.
    1.88 +
    1.89 +if PROXY_TYPE_SOCKS
    1.90 +
    1.91 +choice
    1.92 +    bool
    1.93 +    prompt "type"
    1.94 +    default PROXY_TYPE_SOCKS_5
    1.95 +
    1.96 +config PROXY_TYPE_SOCKS_5
    1.97 +    bool
    1.98 +    prompt "SOCKS 5"
    1.99 +
   1.100 +config PROXY_TYPE_SOCKS_4
   1.101 +    bool
   1.102 +    prompt "SOCKS 4"
   1.103 +
   1.104  endchoice
   1.105  
   1.106 +config PROXY_HOST
   1.107 +    string
   1.108 +    prompt "hostname/IP"
   1.109 +
   1.110 +config PROXY_PORT
   1.111 +    int
   1.112 +    prompt "port"
   1.113 +    default 0
   1.114 +
   1.115 +config PROXY_USER
   1.116 +    string
   1.117 +    prompt "user name"
   1.118 +
   1.119 +config PROXY_PASS
   1.120 +    string
   1.121 +    prompt "password"
   1.122 +
   1.123 +endif # USE_SOCKS_PROXY
   1.124 +
   1.125 +endchoice
   1.126 +
   1.127 +config PROXY_TYPE
   1.128 +    string
   1.129 +    default "none" if PROXY_TYPE_NONE
   1.130 +    default "HTTP" if PROXY_TYPE_HTTP
   1.131 +    default "socks5" if PROXY_TYPE_SOCKS_5
   1.132 +    default "socks4" if PROXY_TYPE_SOCKS_4
   1.133 +
   1.134  # Force restore indentation
   1.135  config FOOBAR
   1.136