summaryrefslogtreecommitdiff
path: root/xmake/modules/net/proxy.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2026-03-30 23:59:50 +0800
committerruki <[email protected]>2026-03-30 23:59:50 +0800
commit90f05f17328ccac2764fb80895ef72c4510d91f6 (patch)
treed32f59d711b5ae9597ccf29f448b6b2c0322c8fc /xmake/modules/net/proxy.lua
parent701d59c83a64bf5aa73f2bc386a0cdba087349c4 (diff)
add more comments
Diffstat (limited to 'xmake/modules/net/proxy.lua')
-rw-r--r--xmake/modules/net/proxy.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/xmake/modules/net/proxy.lua b/xmake/modules/net/proxy.lua
index 812fdc536..1ab9779e6 100644
--- a/xmake/modules/net/proxy.lua
+++ b/xmake/modules/net/proxy.lua
@@ -93,7 +93,11 @@ function _is_callable(func)
end
end
--- get proxy mirror url
+-- get proxy mirror url for the given url
+--
+-- @param url the original url
+-- @return the mirrored url
+--
function mirror(url)
local proxy_pac = _proxy_pac()
if proxy_pac and proxy_pac.mirror then
@@ -142,8 +146,10 @@ function _global_proxy()
return proxy
end
--- get proxy configuration from the given url, [protocol://]host[:port]
+-- get proxy configuration for the given url
--
+-- @param url the target url
+-- @return the proxy string, e.g. "socks5://127.0.0.1:1080", or nil
-- @see https://github.com/xmake-io/xmake/issues/854
--
function config(url)