标签: polipo

使用 curl 通过代理 (polipo) 访问受基本身份验证保护的网站

我正在尝试下载通过基本身份验证保护的文件:

curl "http://User:Pass@example.com/blub/bla.bin"
Run Code Online (Sandbox Code Playgroud)

这工作正常。

一旦我告诉 curl 使用我本地安装的 polipo 它就会失败:

$ http_proxy="http://127.0.0.1:8123" curl "http://XXXXX:Pass@example.com/blub/bla.bin"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<title>Proxy error: 504 Host XXXXX lookup failed: Host not found.</title>
</head><body>
<h1>504 Host XXXXX lookup failed: Host not found</h1>
<p>The following error occurred while trying to access <strong>http://XXXXX:Pass@example.com/blub/bla.bin</strong>:<br><br>
<strong>504 Host XXXXX lookup failed: Host not found</strong></p>
<hr>Generated Wed, 12 Mar 2014 22:46:10 CET by Polipo on <em>hostname:8123</em>.
</body></html>
$
Run Code Online (Sandbox Code Playgroud)

这是由于 Polipo 或 curl 中的错误引起的吗?(还是我做错了?)

编辑:http_proxy="http://127.0.0.1:8123" curl -u …

authentication proxy curl polipo

6
推荐指数
2
解决办法
8万
查看次数

如何使用单个命令启动多个进程?

我用pianobar播放器。但在启动它之前,我需要运行torpolipo。两者都是连续的(一直运行直到被中断)。基本上我正在寻找的是一个单一的命令,它会产生torpolipo处理(不需要它们的输出),然后在前台打开钢琴栏。

编辑:结果tor需要几秒钟才能启动,这就是为什么建议的解决方案起初不起作用。我发布这个以防有人遇到同样的问题:

function piano {
    tor &
    polipo &
    sleep 3
    pianobar &&
    killall tor
    killall polipo
}
Run Code Online (Sandbox Code Playgroud)

shell process tor polipo

2
推荐指数
1
解决办法
198
查看次数

标签 统计

polipo ×2

authentication ×1

curl ×1

process ×1

proxy ×1

shell ×1

tor ×1