Background: If the mobile WAP program is running in Linux, you must use the Windows Proxy Server (HTTP/https) and ISA proxy to access the Internet. Domain name/user name and password are required to use the proxy.
1. First run the command to set the environment variable export http_proxy = http: // 192.168.24.254: 8080/and export http_proxy = http://sywgdev.net/proteinx@192.168.24.254:80 /. But the execution fails. 407 error reported. authentication failed.
2. Download ntlmaps, but it must be compiled in python1.5.2. The Python website cannot be downloaded.
3. Switch to cntlm, download cntlm0.35 (http://cntlm.sourceforge.net/) and 0.351, install cntlm0.35, unzip the file, the configuration file in/usr/local/etc/cntlm. conf: Configure four items: username, domain, proxy-IP address, and listen. Then use./configure to compile the program. After successful compilation, there will be a cntlm program under the current directory. The authors of cntlm recommend that you use cntlm-m for the first runtime so that the program can automatically detect the proxy server type. The problem I encountered was that the entered domain name was inconsistent with that returned by cntlm, so the test failed. Some information about the proxy server will be fed back when cntlm is running. Domain Names (both domain and ntdomain are included ). As a result, I found that the domain name I configured was sywgdev, and the program returned sywgdev.net. After correct modification, the web page was successfully downloaded from the http://www.online.sh.cn and http://news.163.com using wget. It is a program that supports multiple threads. It should also be noted that wget uses the http_proxy environment variable. After running the cntlm, you need to set this environment variable to export http_proxy = http: // 127.0.0.1: 3128 /, use cntlm as a proxy and run on port 3128 by default. When you use it for the first time, add the-V parameter so that it runs on the front-end, and a lot of information will be returned to facilitate the discovery of problems.
Attached configuration file:
[Root @ thshost ~] # Cd/usr/local/etc
[Root @ thshost etc] # ls
Cntlm. conf index.html. 1 pear. conf
[Root @ thshost etc] # More cntlm. conf
#
# Cntlm Authentication Proxy Configuration
#
# Note: All values are parsed literally, do not escape spaces,
# Do not quote. Use 0600 perms if you use Plaintext password.
#
Username proteinx
Domain sywgdev.net
Password ASDF # Use hashes instead (-h)
# Workstation netbios_hostname # shocould be auto-guessed
Proxy 192.168.24.254: 8080
# Proxy 10.217.112.42: 8080
#
# This is the port number where cntlm will listen
#
Listen 3128.
#
# If you wish to use the SOCKS5 Proxy feature as well, uncomment
# The following option, socks5. it can be used several times
# To have SOCKS5 on more than one port or on different network
# Interfaces (specify explicit source address for that ).
#
# Warning: the service accepts all requests, unless you use
# Socks5user and make authentication mandatory. socks5user
# Can be used repeatedly for a whole bunch of individual accounts.
#
# Socks5proxy 8010
# Socks5user DAVE: Password
#
# Use-M first to detect the best NTLM settings for your proxy.
# Default is to use the only secure hash, NTLMv2, but it is not
# As available as the older stuff.
#
# This example is the most universal setup known to man, but it
# Uses the weakest hash ever. I won't have it's usage on my
# Conscience. Really, try-M first.
#
# Auth LM
# Flags 0x06820000
#
# Enable to allow access from other computers
#
# Gateway Yes
#
# Useful in Gateway mode to allow/restrict certain IPS
#
# Allow 127.0.0.1
# Deny 1, 0/0
#
# Gfi webmonitor-handling plugin parameters, disabled by default
#
# Isascannersize 1024
# Isascanneragent wget/
# Isascanneragent APT-HTTP/
# Isascanneragent Yum/
#
# Headers which shocould be replaced if present in the request
#
# Header User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)
#
# Tunnels mapping local port to a machine behind the proxy
#
# Tunnel 11443: remote.com: 443