diff --git a/defaults.lua b/defaults.lua index 68e3ae00c..29259495e 100644 --- a/defaults.lua +++ b/defaults.lua @@ -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 -- #################################################################### diff --git a/frontend/ui/networkmgr.lua b/frontend/ui/networkmgr.lua index 68a765eff..293d69a86 100644 --- a/frontend/ui/networkmgr.lua +++ b/frontend/ui/networkmgr.lua @@ -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