这可能是完全不可能实现的,但在我试一试之前,我可能会得到一位同行的建议.squid也会代理DNS查询吗?我想转发DNS查询以通过squid并使用squid的DNS错误页面,当然通过自定义它.我看到DNS查询正在UDP端口53上攻击我的squid框.我可以设置一个端口转发,以便所有这些查询都被发送到squid的端口3128.但是squid会理解它的DNS查询并将这些查询转发到dns服务器集在squid.conf中?我希望我的问题很明确,但请大声说出来,如果需要,我很乐意再给你一些信息.多谢你们!
我对squid3有一个奇怪的问题.它通常正常工作,我可以通过代理访问大多数网站.不过有些网站喜欢
google.com
bing.com
Run Code Online (Sandbox Code Playgroud)
似乎被阻止但并非总是如此.重新启动squid3似乎没有帮助或清除/ var/spool/squid3(缓存)目录.
如果我登录到squid3正在运行的机器上
wget --no-proxy google.com
Run Code Online (Sandbox Code Playgroud)
然后没有问题,但如果我通过代理它永远不会响应.大多数其他网站都可以访问,包括stackoverflow.com,我现在正通过代理使用它.知道关于google.com和bing.com可能有什么特别之处,以便squid3对待它们的方式不同,squid3 conf文件中是否有任何可能与此类行为相关的设置.
与此类似,我试图在 nginx 后面托管一个鱿鱼代理:
example.com - 主要站点
relay.example.com - 鱿鱼服务器。
到目前为止,当我尝试使用 squid 代理时,它会抱怨访问非法页面,例如,如果我尝试访问http://www.google.com,我会收到一个 Invalid URL 错误,指出该 URL /http://www.google.com(注意前面的 /)。任何人都可以建议为什么会发生这种情况,或者修复 nginx 或者可能在鱿鱼配置中?
upstream @squid {
server localhost:3128;
}
server {
listen 80;
server_name relay.example.com;
location / {
proxy_pass http://@squid/$scheme://$host$uri;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Request-URI $request_uri;
proxy_redirect off;
}
}
Run Code Online (Sandbox Code Playgroud)
鱿鱼的日志给出:
1423083723.857 0 127.0.0.1 NONE/400 3530 GET /http://www.google.com/ - HIER_NONE/- text/html
Run Code Online (Sandbox Code Playgroud)
和 nginx 用于相同的请求:
12.34.56.78 - - [04/Feb/2015:16:02:03 …Run Code Online (Sandbox Code Playgroud) 我已经在EC2上设置了一个鱿鱼代理,并且试图从公司防火墙后面使用它。将firefox配置为使用我的代理后,我尝试浏览yahoo.com。浏览器似乎挂起,好像正在处理一个非常长时间的请求。检查鱿鱼日志,我看到了:
1431354246.891 11645 xxx.0.xx.xxx TCP_MISS/200 7150 CONNECT www.yahoo.com:443 username HIER_DIRECT/xx.xxx.XX.xx-
Run Code Online (Sandbox Code Playgroud)
到目前为止,我对这些条目中的大多数还没有很好的解释,但是从http://wiki.squid-cache.org/SquidFaq/SquidLogs#access.log中,我发现:
MISS = The response object delivered was the network response object.
Run Code Online (Sandbox Code Playgroud)
这是什么意思?我可以做些什么来连接到外部互联网?
所以我正在尝试为我的抓取工具创建一个代理服务器,我不确定为什么我甚至被自己拒绝了.当我在浏览器中访问任何网站时,在我安装了Squid的计算机上以及所有内容上,它给出了以下错误消息:
ERROR
The requested URL could not be retrieved
While trying to retrieve the URL: http://www.whatismyipaddress.com/
The following error was encountered:
Access Denied.
Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.
Your cache administrator is webmaster.
Generated Sun, 08 Nov 2015 04:03:13 GMT by WIN-AIUOBK0JHPA (squid/2.7.STABLE8)
Run Code Online (Sandbox Code Playgroud)
我在Internet选项中编辑了我的局域网设置以允许代理服务器使用正确的IP地址(当我运行ipconfig时为IPv4),给它打开正确的端口,我也打开了我的端口Windows防火墙.
以下是我的squid.conf文件的部分:
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl …Run Code Online (Sandbox Code Playgroud) 我刚刚在配置了SSL-bump的Ubuntu 16.04.2 LTS上设置了Squid Server 3.5.26.Http和Https工作正常,但任何需要Web套接字的Web服务都会失败,例如速度测试.
我在squid配置中添加了以下行,试图强制直接连接并阻止Web套接字连接的SSL缓存.
#Temporarily allow all connections for debugging
http_access allow all
acl bump-bypass dstdomain 192.168.0.245 .speedtest.net
# URL's contains ws (most web socket urls do)
acl ssl-web-sockets SSL::server_name_regex \/ws
acl step1 at_step SslBump1
ssl_bump peek step1
ssl_bump splice bump-bypass ssl-web-sockets tcp-web-sockets
#I Read that there was a bug in bump that required !explicity
#for splice to work for web sockets
ssl_bump bump !ssl-web-sockets all
#just bump all doesn't work either
#ssl_bump bump all
Run Code Online (Sandbox Code Playgroud)
如果我禁用ssl-bump而不解密加密流量一切正常.
如何配置squid以允许直接Web套接字连接?
更新 …
我的网络中有 SQUID 作为 https 转发代理。我的一个应用程序从网络发送 SAOP 请求。SOAP Web 服务需要客户端证书进行身份验证。我已经为我的应用程序配置了密钥库和信任库。应用程序无需 SQUID 代理即可直接正常工作。
它也适用于 SQUID 隧道(即 ssl_bump splice )。
但我们不想使用拼接。我们需要 SQUID 来解密 SSL 流量并进行身份验证并将身份验证证书(客户端证书)传递到 Web 服务服务器。对于这种情况,SQUID 可能的配置是什么?
有关信息:SQUID 代理可以在不需要客户端证书进行身份验证的 HTTP 和 HTTPS 流量中正常工作。示例“ https://www.google.com ”
在 HAProxy 中,我使用了http-proxy 选项来使其像转发代理一样工作。这似乎工作正常,但对于 HTTPS 流量来说这是不可能的。
那么,HAProxy 配置中是否有任何选项可以像 Squid 一样代理 HTTPS 流量?
我认为问题是option https_proxy不可用。
此配置非常适合 HTTP 协议:
frontend http_proxy
bind :3128
option http_proxy
default_backend proxy_server
backend proxy_server
option http_proxy
Run Code Online (Sandbox Code Playgroud)
注意 - 我已将证书与“ssl crt”以及绑定选项一起使用,但这似乎并未通过 HTTPS 协议进行代理
我有centos 7.6并在上面安装了squid 4.5。
sudo yum -y install squid
Run Code Online (Sandbox Code Playgroud)
我按照此链接进行Basic Authentication了.
没有身份验证鱿鱼工作正常。
这是squid.conf添加部分后的文件# Basic Authentication:
#
# Recommended minimum configuration:
#
# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 0.0.0.1-0.255.255.255 # RFC 1122 "this" network (LAN)
acl localnet src 10.0.0.0/8 # RFC 1918 local private network (LAN)
acl localnet src 100.64.0.0/10 # RFC 6598 shared …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 openssl 构建鱿鱼,但失败了,因为 makethreats warnings as errors
一个例子:gadgets.h -> error 'void RSA_free(RSA*)' is deprecated; Since **Openssl 3.0.0** -Werror=deprecated-declarations ..
我认为-Werror=deprecated-declarations指示 make 将这些警告视为错误。但是在哪个文件中-Werror=deprecated-declarations?我怎样才能抑制/避免它?
我需要带有 openssl 的鱿鱼。