squid

Unable to test HTTP PUT-based file upload via Squid Proxy

会有一股神秘感。 提交于 2019-12-05 18:39:42
I can upload a file to my Apache web server using Curl just fine: echo "[$(date)] file contents." | curl -T - http://WEB-SERVER/upload/sample.put However, if I put a Squid proxy server in between, then I am not able to: echo "[$(date)] file contents." | curl -x http://SQUID-PROXY:3128 -T - http://WEB-SERVER/upload/sample.put Curl reports the following error: Note: This error response was in HTML format, but I've removed the tags for ease of reading. ERROR: The requested URL could not be retrieved ERROR The requested URL could not be retrieved While trying to retrieve the URL: http://WEB-SERVER

Squid代理服务器应用(传统与透明)

戏子无情 提交于 2019-12-05 17:10:00
实验原理图 第一步:配置squid代理服务器 #远程共享并挂载源码包 [root@squid ~]# smbclient -L //192.168.142.1 [root@squid ~]# mount.cifs //192.168.142.1/squid /mnt #解压源码包 [root@squid ~]# cd /mnt [root@squid mnt]# tar zxvf squid-3.4.6.tar.gz -C /opt #安装编译环境 [root@squid mnt]# yum install gcc gcc-c++ make -y #切入源码包目录 [root@squid mnt]# cd /opt/squid-3.4.6/ #配置configure组件项 [root@squid squid-3.4.6]# ./configure --prefix=/usr/local/squid \ >--sysconfdir=/etc \ >--enable-arp-acl \ >--enable-linux-netfilter \ >--enable-linux-tproxy \ >--enable-async-io=100 \ >--enable-err-language="Simplify_Chinese" \ >--enable-underscore \ >-

CentOS7下配置Squid代理

旧城冷巷雨未停 提交于 2019-12-05 16:45:03
当一台服务器由于网络原因无法上外网是,可以通过在另一台能够上外网的服务配置一个Squid代理程序,该服务器通过这个代理程序来上外网。 1.代理服务器A配置:   安装squid程序 yum install squid     启动squid程序 syetemctl start squid 2.内网服务器B配置:   设置代理:       http_proxy=192.168.164.128:8080     https_proxy=192.168.164.128:8080 这样服务器B就能通过服务器A上访问网页了,squid默认监听端口是3128,这里是8080是我自己改了。 squid代理服务器access接入日志,squid可以做http、https、ftp代理,可以基于IP做访问控制,也可以基于文件做更精确的控制。 来源: https://www.cnblogs.com/chen-wg/p/11934187.html

c# HttpWebRequest not sending default credentials to proxy server

人盡茶涼 提交于 2019-12-05 15:35:12
I am using squid proxy server to authenticate the client before passing on the request to public network. I haven't set HttpWebRequest.Proxy object so I am assuming that the web request will take the default window credentials and pass on to the proxy server. I have added an entry of the user to squid proxy as well, but I am getting the following error while making the request.: (407) Proxy Authentication Required. In squid logs, I am getting this: TCP_DENIED/407 3722 CONNECT I have inserted the following block in App.config <system.net> <defaultProxy useDefaultCredentials="true"> <proxy

系统原理分析架构-五-squid(反代理即web缓存服务器)

怎甘沉沦 提交于 2019-12-05 14:35:52
感谢朋友支持本博客,欢迎共同探讨交流,由于能力和时间有限,错误之处在所难免,欢迎指正! 如有转载,请保留源作者博客信息。 Better Me的博客 : blog.csdn.net/tantexian 如需交流,欢迎大家博客留言。 反向代理的概念 ( 关于代理服务器分类更多详情,请参考博文: 系统原理分析架构-三--代理服务器简介及分类 ) 反向代理服务器又称为 WEB 加速服务器,它位于 WEB 服务器的前端,充当 WEB 服 务器的内容缓存器。 反向代理服务器是针对 WEB 服务器设置的,后台 WEB 服务器对互联网用户是透明的,用户只能看到反向代理服务器的地址,不清楚后台 WEB 服务器是如何组织架构的。当互联网用户请求 WEB 服务时,DNS 将请求的域名解析为反向代理服务器的 IP 地址,这样 URL 请求将被发送到反向代理服务器,由反向代理服务器负责处理用户的请求与应答、与后台 WEB 服务器交互。利用反向代理服务器减轻了后台 WEB 服务器的负载,提高了访问速度,同时避免了因用户直接与 WEB 服务器通信带来的安全隐患。 Squid 反向代理的实现原理 目前有许多反向代理软件,比较有名的有 Nginx 和 Squid 。 Nginx 是由 Igor Sysoev 为俄罗斯访问量第二的 Rambler.ru 站点开发的,是一个高性能的 HTTP 和反向代理服务器,也是一个

系统原理分析架构-四-squid(简介及正向代理)

江枫思渺然 提交于 2019-12-05 09:32:19
感谢朋友支持本博客,欢迎共同探讨交流,由于能力和时间有限,错误之处在所难免,欢迎指正! 如有转载,请保留源作者博客信息。 Better Me的博客 : blog.csdn.net/tantexian 如需交流,欢迎大家博客留言。 一、squid简介 Squid Cache (简称为 Squid )是 HTTP 代理服务器 软件。Squid用途广泛的,可以作为 缓存服务器 , 代理用户向web服务器请求数据并进行缓存, 可以过滤流量帮助网络安全,也可以作为代理服务器链中的一环,向上级代理转发数据或直接连接互联网。 还也可以用在局域网中,使局域网用户通过代理上网。 Squid将数据元缓存在内存中,同时也缓存 DNS 查寻的结果,除此之外,它还支持非模块化的DNS查询,对失败的请求进行消极缓存。Squid支持SSL,支持 访问控制 。由于使用了ICP,Squid能够实现重叠的代理阵列,从而最大限度的节约带宽。 Squid由一个主要的服务程序Squid,一个DNS查询程序 dns server,几个重写请求和执行认证的程序,以及几个管理工具组成。当Squid启动以后,它可以派生出指定数目的 dns server进程,而每一个dnsserver进程都可以执行单独的DNS查询,这样一来就大大减少了服务器等待DNS查询的时间。 Squid的另一个优越性在于它使用 访问控制 清单(ACL

Linux 下不同服务器之间拷贝文件 SCP

心已入冬 提交于 2019-12-05 00:41:13
scp 对拷文件夹 和 文件夹下的所有文件 对拷文件并重命名 对拷文件夹 (包括文件夹本身) scp -r /home/wwwroot/www/charts/util root@192.168.1.65:/home/wwwroot/limesurvey_back/scp 对拷文件夹下所有文件 (不包括文件夹本身) scp /home/wwwroot/www/charts/util/* root@192.168.1.65:/home/wwwroot/limesurvey_back/scp 对拷文件并重命名 scp /home/wwwroot/www/charts/util/a.txt root@192.168.1.65:/home/wwwroot/limesurvey_back/scp/b.text Linux下scp的用法 scp就是secure copy,一个在linux下用来进行远程拷贝文件的命令。 有时我们需要获得远程服务器上的某个文件,该服务器既没有配置ftp服务器,也没有做共享,无法通过常规途径获得文件时,只需要通过简单的scp命令便可达到目的。 一、将本机文件复制到远程服务器上 #scp /home/administrator/news.txt root@192.168.6.129:/etc/squid /home/administrator/ 本地文件的绝对路径

HttpClient 4.2.2 and proxy with username/password

白昼怎懂夜的黑 提交于 2019-12-04 14:47:38
问题 I have a problem with HttpClient 4.2.2 and proxy with username/password. HttpClient works in this way: List item Send request without proxy stuff (however I set proxy parameters for each request) Get response from Squid with 407 error Send request with proxy stuff It's very strange behavior, Is it possible to add info about proxy to each request? I've tried to add hardcoded "Proxy-Authorization" header to each request and it works fine, why HttpClient can't do the same? Java code

How to verify that Squid used as a reversed proxy is working?

瘦欲@ 提交于 2019-12-04 11:34:43
We want to decrease the load in one of our web servers and we are running some tests with squid configured as a reverse proxy. The configuration is in the remarks below: http_port 80 accel defaultsite=original.server.com cache_peer original.server.com parent 80 0 no-query originserver name=myAccel acl our_sites dstdomain .contentpilot.net http_access allow our_sites cache_peer_access myAccel allow our_sites cache_peer_access myAccel deny all The situation we are having is that pretty much the server is returning TCP_MISS almost all the time. 1238022316.988 86 69.15.30.186 TCP_MISS/200 797 GET

Linux 使用squid内网机器访问外网代理设置

自作多情 提交于 2019-12-04 09:44:56
1. 安装squid及需要的依赖 1.1 安装openssl yum install openssl 1.2 安装squid yum install squid 安装完成后, cd /etc/squid/ 目下, 修改squid.conf 文件中的内容,修改之前, 可以先备份该文件: 然后找到 文件中的 http_access deny all 将其修改为 http_access allow all 表示所有用户都可以访问这个代理, 还有找到 http_port 3128 修改为 http_port [机器公网IP]:3128 这里的IP及端口是 squid的代理IP及端口, 该IP是能访问外网机器的IP地址,如果是本机,则可以不用修改该地址, 下面启动squid 代理 squid -k parse squid -z #service squid start systemctl start squid 2. 目标机器配置http转发 在其他有需要访问外网的内网机器上设置其访问外网的代理机器 export http_proxy=http://[公网IP]:3128 永久生效添加到 /etc/profile 来源: oschina 链接: https://my.oschina.net/u/2420680/blog/3017757