mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
http proxy support by setting NETWORK_PROXY variable
This should implement feature request in #919.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user