[英]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.