[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How to authenticate against the proxy with socket.http?
- From: Pan Shi Zhu <pan.shizhu@...>
- Date: Wed, 17 Mar 2010 10:32:03 +0800
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/"}