免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3429 | 回复: 0
打印 上一主题 下一主题

proxy 认证 (authorization) 使用总结 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-04-16 23:58 |只看该作者 |倒序浏览

                如何在linux下通过proxy server的认证访问外网?
apt的proxy比较简单。在/etc/apt/apt.conf中添加:
/etc/apt/apt.conf
               
               
                APT::Authentication::TrustCDROM "true";
Acquire::http::Proxy "http://username:password@proxy.xxx.xxx/";
Acquire::::Proxy "true"
wget 的proxy 它是借助环境变量
export http_proxy=http://proxy.xx.xx:80
export ftp_proxy=ftp://proxy.xx.xx:21
如果需要认证则需要编写一个文本
~/.wgetrc
中添加:
proxy-user=username
proxy-password=password
w3m 的代理上网可以参考使用proxychains工具。
具体配置需要在 /etc/proxychains.conf中进行设置。
/etc/proxychains.conf
# proxychains.conf  VER 2.0
#
#        HTTP, SOCKS4, SOCKS5 tunneling proxifier.
#
# The option below identifies how the ProxyList is treated.
# only one option should be uncommented at time,
# otherwise the last appearing option will be accepted
#
# Dynamic - Each connection will be done via chained proxies
# all proxies chained in the order as they appear in the list
# at least one proxy must be online to play in chain
# (dead proxies are skipped)
# otherwise EINTR is returned to the app
#
# Strict - Each connection will be done via chained proxies
# all proxies chained in the order as they appear in the list
# all proxies must be online to play in chain
# otherwise EINTR is returned to the app
#
# Random - Each connection will be done via random proxy
# (or proxy chain, see  chain_len) from the list
# this option is good for scans
#dynamic_chain
#strict_chain
random_chain
# Make sense only if random_chain
# 一定要注意,这个值要和下面定义的 proxy list 的个数一致
chain_len = 1
# Quiet mode (no output)
quiet_mode
# Write stats about good proxies to proxychains.stats
#write_stats
#Some timeouts in milliseconds
#
tcp_read_time_out 15000
tcp_connect_time_out 10000
[ProxyList]
# ProxyList format
#       type  host  port [user pass]
#       (values separated by 'tab' or 'blank')
#
#
#        Examples:
#
#                socks5    192.168.67.78    1080    lamer  secret
#        http    192.168.89.3    8080    justu    hidden
#         socks4    192.168.1.49    1080
#            http    192.168.39.93    8080   
#        
#
#       proxy types: http, socks4, socks5
#        ( auth types supported: "basic"-http  "user/pass"-socks )
#
#http     10.0.0.5 3128
#http     10.0.0.3 3128
#http     10.0.0.5 3128
#socks5 192.168.1.4 1080
#socks4 10.5.81.143 1080
#http    192.168.203.18 8080
http                proxy.xxx.xxx   80  username  password
目前没有解决firefox的代理认证方法。(其实有个方案,就是在本机搭建一个简单的proxyserver,然后firefox+FoxyProxy来进行穿越)
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/62744/showart_545424.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP