鱿鱼:转发到另一个代理(身份验证细节父代理) [英] Squid: forward to another proxy (with authentication details for the parent proxy)

查看:127
本文介绍了鱿鱼:转发到另一个代理(身份验证细节父代理)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

总之,我正在寻找一种简单的方法来执行以下操作(请在code样品如果可能的话):

In short, I am looking for a simple way to do the following (please give code samples if possible):


  • 设置和我的电脑上启动一个代理服务器(比如地址是10.10.200.200:6767),可以捕获从我的手机所有的web请求

  • 从一次电话请求到达这个代理,它会添加自定义的身份验证信息(my_username / MY_PASSWORD),并将其转发给代理机构(比如地址是10.1.2.3:80)

  • 我不需要在我的本地代理(10.10.200.200)任何缓存/加速。它只是需要赶上请求并转发。

现在,更多的细节充分说明我的情况:

在我院,需要身份验证通过代理,这样我们就可以连接到互联网。我通常进入我的LDAP用户名/密码进行身份验证弹出出现时。

In my institute, authentication is needed to pass through a proxy so that we can connect to the internet. I normally enter my ldap username/password to authenticate when the pop up appears.

现在,我想我的手机连接到无线网络学院,但我的手机不具备认证与代理的选项。只有一个代理服务器地址可以指定。所以,我打算建立一个本地代理我的电脑上可以捕捉到我的手机的所有请求,加认证的详细信息,并通过我的电脑把它传递给我的代理机构

Now, I want to connect my phone to the institute WiFi but my phone does not have the option of authentication with proxy. Only a proxy address can be specified. So, I am planning to set up a local proxy on my computer to catch all requests from my phone, add authentication details and pass it to my institute proxy through my computer.

我安装squid3(在Ubuntu),但看着配置文件,我迷路了。我尝试使用Google,但它看起来太复杂了。

希望有人能提供帮助。

推荐答案

我鱿鱼教程想通,要做到这一点最简单的配置是:

I figured from squid tutorials that the simplest configuration to do this is:

http_access allow all
http_port 3128

coredump_dir /var/spool/squid3
refresh_pattern ^ftp:       1440    20% 10080
refresh_pattern ^gopher:    1440    0%  1440
refresh_pattern -i (/cgi-bin/|\?) 0 0%  0
refresh_pattern (Release|Packages(.gz)*)$      0       20%     2880
refresh_pattern .       0   20% 4320

cache_peer 10.1.2.3 parent 80 0 no-query default login=my_username:my_password
never_direct allow all

这几行应该让你在本地机器上转发到另一个代理服务器(相应地更改IP地址)的所有请求工作的代理服务器。 但是,请注意在上面的脚本中,我已经停用​​任何访问控制/过滤器,所以潜在的,任何人都可以连接并使用你的代理。您需要添加额外的code,以限制进入只有一些设备。

These lines should get you a working proxy server on your local machine that forwards all requests to another proxy server (change ip addresses accordingly). However, please note that in the above script, I have disabled any access control/filters, so potentially, anybody can connect and use your proxy. You need to add additional code to restrict entry to only some devices.

这篇关于鱿鱼:转发到另一个代理(身份验证细节父代理)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆