squid

Squid代理服务器

左心房为你撑大大i 提交于 2019-12-26 15:46:49
代理的基本类型 传统代理:适用于Internet,需明确指定服务端 透明代理:客户机不需要指定代理服务器的地址和端口,是通过默认路由,防火墙将web重定向给代理 代理的好处 提高web访问速度 隐藏客户机的真实IP地址 实验环境 squid服务器:192.168.149.125 web服务器:192.168.149.135 client服务器:192.168.149.188 在squid服务器上安装squid代理服务器 [root@squid ~]# mkdir /abc [root@squid ~]# mount.cifs //192.168.100.3/LNMP-C7 /abc/ ##挂载 [root@squid ~]# cd /abc/ [root@squid abc]# tar zxvf squid-3.4.6.tar.gz -C /opt ##解压 [root@squid abc]# yum install gcc gcc-c++ make -y ##安装环境组件 [root@squid abc]# cd /opt/squid-3.4.6 [root@squid squid-3.4.6]# ./configure \ --prefix=/usr/local/squid \ ##安装路径 --sysconfdir=/etc \ ##配置文件目录 --enable-arp

在html页头设置不缓存

一笑奈何 提交于 2019-12-25 10:01:03
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> <meta http-equiv="Expires" content="0"> <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Cache-control" content="no-cache"> <meta http-equiv="Cache" content="no-cache"> HTML的HTTP协议头信息中控制着页面在几个地方的缓存信息,包括浏览器端,中间缓存服务器端(如:squid等),Web服务器端。本文讨论头信息 中带缓存控制信息的HTML页面(JSP/Servlet生成好出来的也是HTML页面)在中间缓存服务器中的缓存情况。 HTTP协议中关于缓存的信息头关键字包括Cache-Control(HTTP1.1),Pragma(HTTP1.0),last-Modified,Expires等。 HTTP1.0中通过 Pragma 控制页面缓存,可以设置:Pragma或no-cache。网上有非常多的文章说明如何控制不让浏览器或中间缓存服务器缓存页面,通常设置的值为no- cache,不过这个值不这么保险,通常还加上Expires置为0来达到目的。但是如我们刻意需要浏览器或缓存服务器缓存住我们的页面这个值则要设置为

squid+apache实现缓存加速

帅比萌擦擦* 提交于 2019-12-25 08:04:51
本实例是squid和apache在同一台机器上,squid做前端反向代理。port为80,apache作为后端web,port为81 serverip:172.16.8.102 1.首先介绍下版本号选择,在进行測试之前一定要选定一个合适的squid版本号,在此推荐2.7。她和2.6功能相似但更好的支持http1.1,也有3.0以上版本号的不少特性。 2.squid2.7安装 cd /usr/local/src tar -zxvf squid-2.7.STABLE9.tar.gz cd squid-2.7.STABLE9 ./configure -prefix=/usr/local/squid2.7 -enable-xmalloc-statistics --enable-async-io=320 --with-maxfd=65536 -enable-useragent-log -enable-referer-log -enable-epoll -disable-poll -enable-large-cache-files -disable-internal-dns -enable-linux-netfilter -enable-truncate -enable-x-accelerator-vary -enable-follow-x-forwarded-for -with-large

Bandwidth quota in squid

吃可爱长大的小学妹 提交于 2019-12-25 07:59:45
问题 Can anyone help me with finding a way to do 'per user quota' on squid like people login to the proxy they have a cap like 1GB or something (Might be different for each user) and when they use 1GB of Bandwidth it stops their internet and redirects them to a webpage on the a web server saying they have run out of internet etc.. 回答1: Squid doesn't have anything to do that. You have to code an external helper and a process that counts the bytes transferred from the logs. I'd write a daemon that

squid介绍及其简单配置

拜拜、爱过 提交于 2019-12-25 07:59:29
squid-cache 官网 http://www.squid-cache.org squid介绍及其简单配置 https://www.cnblogs.com/cherishry/p/5706736.html CentOS 7安装squid代理服务器 https://blog.csdn.net/ithomer/article/details/78136993 squid的概念 squid是一种用来缓存Internet数据的软件。接受来自人们需要下载的目标(object)的请求并适当的处理这些请求。也就是说,如果一个人想下载一web界面,他请求squid为他取得这个页面。squid随之连接到远程服务器并向这个页面发出请求。然后,squid显式地聚集数据到客户端机器,而且同时复制一份。当下一次有人需要同一页面时, squid可以简单的从磁盘中读到它,那样数据会立即传输到客户机上。 squid代理的作用 通过缓存的方式为用户提供Web访问加速 对用户的Web访问进行过滤控制 工作流程 当代理服务器中有客户端需要的数据时: a. 客户端向代理服务器发送数据请求; b. 代理服务器检查自己的数据缓存; c. 代理服务器在缓存中找到了用户想要的数据,取出数据; d. 代理服务器将从缓存中取得的数据返回给客户端。 当代理服务器中没有客户端需要的数据时: 客户端向代理服务器发送数据请求;

linux 搭建squid代理服务器

雨燕双飞 提交于 2019-12-25 07:43:37
linux 搭建squid代理服务器 实验环境: 一台linux搭建Web服务器,充当内网web服务器(同时充当内网客户端) 202.100.10.100 一台linux系统充当网关服务器,两个网卡,开启路由转发 192.168.133.131和202.100.10.1 一台linux搭建Web服务器,充当外网web服务器(同时充当外网客户端)) 192.168.133.131 实验步骤: 1.配置内网web服务器、网关服务器、外网Web服务器的IP地址,开启网关的路由转发,关闭网关的防火墙,测试内网web服务器与外网Web服务器的联通性,保证能互通。 2.安装内网Web服务器和外网Web服务器的web服务,启动服务,新建一个测试页面 3.测试内网客户端访问外网web服务器,外网客户端访问内网web服务器 4.内网客户端访问外网web服务器    5.外网客户端访问内网web服务器    防火墙SNAT和DNAT 1.内网客户端访问外网web服务器    2.在外网web服务器上查看日志 tail -f /var/log/httpd/access_log    3.在网关设置地址转换 iptables -t nat -A POSTROUTING -s 192.168.133.0/24 -o eth2 -j SNAT --to-source 202.100.10.1

squid-正向代理

偶尔善良 提交于 2019-12-25 07:42:26
squid http://www.squid-cache.org/ squid软件主要有两大应用: 1,代理上网(正向代理,透明代理) 2,网站静态页面缓存加速(反向代理) 三种代理类型 正向代理 代理内部主机上网,共享上网,缓存,控制内网用户上网行为等功能(客户端需要设置代理服务器的IP和代理端口) 透明代理 和正向代理的功能完全一致(客户端不需要设置代理服务器的IP和代理端口,对用户是透明的) 外网 | medem | 路由器(dhcp,snat共享上网,上网行为控制,限速等) | | squid正向代理(共享上网,静态页面缓存加速,内网用户四七层上网行为控制,限速等) | | |----------------------| 上网用户一 上网用户二 反向代理 从外部网络访问内部服务器,与正向方向相反,主要用于网站架构的缓存加速或CDN client | | 反向代理 (缓存加速,七层切分,负载均衡,会话保持等) | | web =================================================================== 正向代理实验 公网 | | eth0 172.16.2.9 squid 服务器 vmnet1 192.168.1.1 | | | 内网用户VM1 eth0(vmnet1) 192.168.1.128

How can I using squid from internet

ε祈祈猫儿з 提交于 2019-12-25 07:29:49
问题 I have a squid running in AWS EC2, it's ubuntu12.04 with 64bit, I tried telnet localhost 3129 it can be accessed successfully. Now I try to telnet from remote machine, it can not. My question is, how can I access squid server from remote computers? I saw the configuration examples are all 192.168.0.1 or some other internal IP. 来源: https://stackoverflow.com/questions/17287630/how-can-i-using-squid-from-internet

How to use in squid 2.7 the 3.1 feature “ignore-cc”

做~自己de王妃 提交于 2019-12-25 05:25:29
问题 There is any way to ignore client " Cache-Control: max-age=0 " and always let squid to return stale content ? In Squid 3.2 works using "ignore-cc" and the request never reaches backend (only while revalidating), always is stale but in Squid 2.7 works fine unless you send the Cache-control: max-age=0 and If-Modified-Since headers. 回答1: Well, after trying all alternatives, I modified the source code to implement the feature. I changed in the Squid-2.7-stable9 the file src/refresh.c : 282 : 282:

squid bind outgoing ip

心不动则不痛 提交于 2019-12-24 21:00:23
问题 I have many ips on same server and I am using squid basic authentication. Example - I have two ips and 2 users and one single port 3128. The issue is any user can use any outgoing ips. Below is my squid configuration: acl http proto http acl port_80 port 80 acl port_443 port 443 acl CONNECT method CONNECT auth_param basic program /usr/bin/python /path/to/authenticationscript auth_param basic realm Please enter username and password auth_param basic credentialsttl 1 second acl AuthUsers proxy