[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How to authenticate against the proxy with socket.http?
- From: WU Jun <quark@...>
- Date: Wed, 17 Mar 2010 10:43:02 +0800
It won't work.
LuaSocket just has no http proxy auth impl.
On 03/17/2010 10:32 AM, Pan Shi Zhu wrote:
> I don't know lua-sockets, but if it works like the Python lib, you
> should set the http_proxy environment variable in your bash shell
> (export http_proxy="http://username:password@proxyhost:8080/").
>
> not in your lua script.
>
> If lua-sockets does not support proxy at all, then you'll have to
> write your own code to support proxy.
>
>> #!/bin/lua
>> local http = require("socket.http")
>> PROXY="http://username:password@proxyhost:8080/"
>> local a,b,c,d=http.request{url="http://www.google.com/"}
>