免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 10497 | 回复: 4

[proxy] 关于解决 Illegal character in hostname; underscores are not allowed [复制链接]

论坛徽章:
0
发表于 2007-08-09 17:01 |显示全部楼层
Illegal character in hostname; underscores are not allowed

注释: 无效的字符串,访问地址中不允许下划线。


解决办法 :
squid  2.5 中,编译的时候加入如下参数
--enable-underscore

允许解析的URL中出现下划先,因为默认squid会认为带下划线的URL地址是非法的,并拒绝访问该地址。


对于 2.6 版本,有朋友告诉我说 编译时没有这个参数,我看了一下 2.6 的 change  log ,这个参数出现在 squid.conf 的配置文档里,说明是这样的 :


allow_underscore New option to allow _ in hostnames, replacing the similar build time configure option in 2.5 and earlier.


具体的在 squid.conf 中的参数,大家可以在配置文档里搜索一下 allow_underscore  ,看一下配置文档的具体注释。

论坛徽章:
0
发表于 2007-08-09 17:21 |显示全部楼层
squid.conf:

#  TAG: allow_underscore
#       Underscore characters is not strictly allowed in Internet hostnames
#       but nevertheless used by many sites. Set this to off if you want
#       Squid to be strict about the standard.
#
#Default:
# allow_underscore on

论坛徽章:
0
发表于 2007-08-09 17:33 |显示全部楼层
楼上的,3个月内能出旁路吗 ?

论坛徽章:
0
发表于 2007-08-09 17:59 |显示全部楼层
哎,实在不好意思,这签名还是我2年前写的信息,这家公司防火墙效果很好,但是手段不太好,看新闻吧。

注意:现已更新!!!

[ 本帖最后由 dwolf 于 2007-8-9 18:05 编辑 ]

论坛徽章:
0
发表于 2007-08-09 18:01 |显示全部楼层
我知道,罗总进去了。  
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP