http proxy support by setting NETWORK_PROXY variable

This should implement feature request in #919.
pull/955/head
chrox 10 years ago
parent 87e9f34397
commit 3147ffb08a

@ -178,6 +178,11 @@ KOBO_LIGHT_ON_START = -1 -- -1 or 0-100. -1 leaves light as it is, oth
KOBO_SCREEN_SAVER = "" -- image or directory with pictures or "-"
KOBO_SCREEN_SAVER_LAST_BOOK = true -- get screensaver from last book if possible
-- Network proxy settings
-- proxy url should be a string in the format of "http://localhost:3128"
-- proxy authentication is not supported yet.
NETWORK_PROXY = nil
-- ####################################################################
-- following features are not supported right now
-- ####################################################################

@ -83,4 +83,10 @@ function NetworkMgr:getWifiStatus()
return false
end
-- set network proxy if global variable NETWORK_PROXY is defined
if NETWORK_PROXY then
local http = require("socket.http")
http.PROXY = NETWORK_PROXY
end
return NetworkMgr

Loading…
Cancel
Save