2
0
mirror of https://github.com/koreader/koreader synced 2024-11-10 01:10:34 +00:00

[fix] NetworkMgr: apply HTTP proxy setting on startup (#12260)

Fixes #12244.
This commit is contained in:
Frans de Jonge 2024-08-01 21:03:34 +02:00 committed by GitHub
parent 7ef78e606e
commit 764a482f8c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1225,8 +1225,9 @@ function NetworkMgr:setWirelessBackend(name, options)
require("ui/network/"..name).init(self, options) require("ui/network/"..name).init(self, options)
end end
-- set network proxy if global variable G_defaults:readSetting("NETWORK_PROXY") is defined if G_reader_settings:readSetting("http_proxy_enabled") and G_reader_settings:readSetting("http_proxy") then
if G_defaults:readSetting("NETWORK_PROXY") then NetworkMgr:setHTTPProxy(G_reader_settings:readSetting("http_proxy"))
elseif G_defaults:readSetting("NETWORK_PROXY") then
NetworkMgr:setHTTPProxy(G_defaults:readSetting("NETWORK_PROXY")) NetworkMgr:setHTTPProxy(G_defaults:readSetting("NETWORK_PROXY"))
end end