Add configuration option for IPv4/IPv6 connections

This commit is contained in:
Lothrik
2022-02-03 22:00:09 -08:00
parent d4c323d0d5
commit f224ded54f
4 changed files with 68 additions and 44 deletions

View File

@@ -4,7 +4,7 @@
-- Module: Update Check
-- Checks for updates
--
local proxyURL = ...
local connectionProtocol, proxyURL = ...
local xml = require("xml")
local sha1 = require("sha1")
@@ -22,6 +22,9 @@ local function downloadFileText(source, file)
local escapedUrl = source..easy:escape(file)
easy:setopt_url(escapedUrl)
easy:setopt(curl.OPT_ACCEPT_ENCODING, "")
if connectionProtocol then
easy:setopt(curl.OPT_IPRESOLVE, connectionProtocol)
end
if proxyURL then
easy:setopt(curl.OPT_PROXY, proxyURL)
end