【发布时间】:2016-03-17 08:15:03
【问题描述】:
正如标题所说,我遇到了 Cntlm 的一些问题。我正在使用 0.92.3 版本并从源代码启动。我想做的是启动 Cntlm 作为具有 localhost 配置的独立代理,以浏览互联网和启动应用程序(例如 Skype)。
我正在使用 Mint 并且命令 uname -a 给出:
Linux Jarvis 3.16.0-38-generic #52~14.04.1-Ubuntu SMP Fri May 8 09:43:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
这些是我在询问之前所做的步骤:
./configure
make
sudo make install
一切顺利。我还通过以下方式导出 http、https 和 ftp 代理:
export http_proxy = http://127.0.0.1:3128
export https_proxy = https://127.0.0.1:3128
export ftp_proxy = https://127.0.0.1:3128
而且一切都很好。剩下的就是启动cntlm,用:
sudo cntlm -v -f
它正确地保持cntlm.conf传递的信息,并显示它停留在前台。
我进入浏览器(firefox)并为代理配置它,将 127.0.0.1 设置为 http 代理,将 3128 设置为端口。
当我启动浏览器选项卡并在代理下进行测试研究时,终端开始详细说明数据,但几秒钟后它一直说:
cntlm[11605]: Serious error during accept: Too many open files
直到我按下 ctrl+C。
这是我的 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 myUsername
Domain localhost
Password password
# NOTE: Use plaintext password only at your own risk
# Use hashes instead. You can use a "cntlm -M" and "cntlm -H"
# command sequence to get the right config for your environment.
# See cntlm man page
# Example secure config shown below.
# PassLM 1AD35398BE6565DDB5C4EF70C0593492
# PassNT 77B9081511704EE852F94227CF48A793
### Only for user 'testuser', domain 'corp-uk'
# PassNTLMv2 D5826E9C665C37C80B53397D5C07BBCB
# Specify the netbios hostname cntlm will send to the parent
# proxies. Normally the value is auto-guessed.
#
# Workstation netbios_hostname
# List of parent proxies to use. More proxies can be defined
# one per line in format <proxy_ip>:<proxy_port>
#
Listen 127.0.0.1:3128
#Listen 192.168.0.1:3128
#Proxy 10.0.0.41:8080
#Proxy 10.0.0.42:8080
Proxy 127.0.0.1:3128
# List addresses you do not want to pass to parent proxies
# * and ? wildcards can be used
#
NoProxy localhost, 127.0.0.*, 10.*, 192.168.*
# Specify the port cntlm will listen on
# You can bind cntlm to specific interface by specifying
# the appropriate IP address also in format <local_ip>:<local_port>
# Cntlm listens on 127.0.0.1:3128 by default
#
# If you wish to use the SOCKS5 proxy feature as well, uncomment
# the following option. 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 5000
#SOCKS5User username: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
# Specifiy individual IPs or subnets one rule per line.
#
Allow 127.0.0.1
Deny 0/0
# GFI WebMonitor-handling plugin parameters, disabled by default
#
#ISAScannerSize 1024
#ISAScannerAgent Wget/
#ISAScannerAgent APT-HTTP/
#ISAScannerAgent Yum/
# Tunnels mapping local port to a machine behind the proxy.
# The format is <local_port>:<remote_host>:<remote_port>
#
#Tunnel 11443:remote.com:443
我尝试了很多次来改变配置,但它真的没有改变。如果我将 127.0.0.1:3128 作为默认代理(我正在尝试做的事情)它开始很好但以循环结束。
我应该怎么做才能让它工作,问题出在哪里?提前致谢。
【问题讨论】:
-
ulimit -n的输出是什么? -
我认为你最好在Server Fault 上问这个问题,让我为你关闭这个。
-
好的,我试试看,你!
标签: c networking configuration proxy linux-mint