lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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/"}
>