简体   繁体   English

用于ubuntu的squid代理基本身份验证

[英]squid proxy basic authentication for ubuntu

I have set up squid proxy with Basic authentication for Ubuntu using credentials and tested with browser working fine with username and password. 我已经使用凭据为Ubuntu设置了具有基本身份验证的squid代理,并在使用用户名和密码的浏览器正常工作的情况下进行了测试。

Now I want to connect it through command line. 现在,我想通过命令行将其连接。 Using MacOs command lineand trying to connect to a remote terminal to a ssh port set up 使用MacOs命令行并尝试将远程终端连接到ssh端口设置

CONNECT 192.111.222.33:22 HTTP/1.0 Proxy-Authorization: Basic <usernamepasswordencodedinbase64format> and press enter twice 

getting this error 得到这个错误

HTTP/1.0 400 Bad Request Server: squid/3.1.19 Mime-Version: 1.0 Date: Wed, 03 Jun 2015 13:38:35 GMT Content-Type: text/html Content-Length: 3740 X-Squid-Error: ERR_INVALID_REQ 0 Vary: Accept-Language Content-Language: en X-Cache: MISS from localhost X-Cache-Lookup: NONE from localhost:3128 Via: 1.0 localhost (squid/3.1.19) HTTP / 1.0 400错误的请求服务器:squid / 3.1.19 Mime版本:1.0日期:2015年6月3日星期三13:38:35 GMT内容类型:text / html内容长度:3740 X-Squid错误:ERR_INVALID_REQ 0变化:接受语言内容语言:zh X缓存:来自本地主机的MISS X缓存查找:来自本地主机的无:3128通过:1.0本地主机(squid / 3.1.19)

Connection: close

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ERROR: The requested URL could not be retrieved</title>

<ul>
<li id="missing-method"><p>Missing or unknown request method.</p></li>
<li id="missing-url"><p>Missing URL.</p></li>
<li id="missing-protocol"><p>Missing HTTP Identifier (HTTP/1.0).</p></li>
<li><p>Request is too large.</p></li>
<li><p>Content-Length missing for POST or PUT requests.</p></li>
<li><p>Illegal character in hostname; underscores are not allowed.</p></li>
<li><p>HTTP/1.1 <q>Expect:</q> feature is being asked from an HTTP/1.0 software.</p></li>
</ul>

Please Help 请帮忙

I just need to press enter key and type this Proxy-Authorization: Basic instead of the same line which was a mistake done because of bad information. 我只需要按Enter键,然后输入以下Proxy-Authorization:Basic而不是同一行,这是由于信息错误而导致的错误。 so it will be like 所以会像

CONNECT 192.111.222.33:22 HTTP/1.0  press enter 
Proxy-Authorization: Basic <usernamepasswordencodedinbase64format> and press enter

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Squid 4.5 的基本身份验证 - /usr/lib64/squid/basic_ncsa_auth 文件未找到 - Basic Authentication of Squid 4.5 - /usr/lib64/squid/basic_ncsa_auth file not found 通过互联网进行Squid服务器(NAT后面)的基本身份验证 - Basic Authentication in Squid Server(behind NAT) over internet Java中具有代理的HTTP基本身份验证 - HTTP Basic Authentication in Java with Proxy 代理apache的基本身份验证(httpd) - Basic authentication for proxy apache (httpd) 使用netcat构建的代理不允许http基本身份验证 - Proxy built with netcat not allowing http basic authentication 使用apache mod proxy删除基本身份验证标头 - Remove basic authentication header with apache mod proxy Python HTTPS客户端,通过代理进行基本身份验证 - Python HTTPS client with basic authentication via proxy 通过反向代理的OrganizationServiceProxy-基本身份验证 - OrganizationServiceProxy via reverse proxy - Basic authentication 通过具有 Windows (NTLM) 身份验证的代理访问具有基本身份验证的 Web 服务 - Access Web Service with Basic authentication through a proxy with Windows (NTLM) authentication S3和具有基本认证的apache mod_proxy - S3 and apache mod_proxy with basic authentication
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM