summaryrefslogtreecommitdiff
path: root/xmake/modules/net/proxy.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2021-04-23 22:35:03 +0800
committerruki <[email protected]>2021-04-23 22:35:03 +0800
commit0d91ee8156a64729aed54a64d5300db5fe438fe4 (patch)
tree32669b558543dbce0de4673230ad478bcc95d3bf /xmake/modules/net/proxy.lua
parent9638fe2dad5b4f1803fdcea51bb6303da19de326 (diff)
improve comments
Diffstat (limited to 'xmake/modules/net/proxy.lua')
-rw-r--r--xmake/modules/net/proxy.lua16
1 files changed, 15 insertions, 1 deletions
diff --git a/xmake/modules/net/proxy.lua b/xmake/modules/net/proxy.lua
index 5f093b9c5..e216931dd 100644
--- a/xmake/modules/net/proxy.lua
+++ b/xmake/modules/net/proxy.lua
@@ -35,6 +35,17 @@ function _proxy_hosts()
end
-- get proxy pac file
+--
+-- pac.lua
+--
+-- @code
+-- function main(url, host)
+-- if host:find("bintray.com") then
+-- return true
+-- end
+-- end
+-- @endcode
+--
function _proxy_pac()
local proxy_pac = _g._PROXY_PAC
if proxy_pac == nil then
@@ -65,6 +76,9 @@ function _host_pattern(pattern)
end
-- get proxy configuration from the given url, [protocol://]host[:port]
+--
+-- @see https://github.com/xmake-io/xmake/issues/854
+--
function get(url)
-- enable proxy for the given url and configuration pattern
@@ -90,7 +104,7 @@ function get(url)
end
if not proxy_pac and not proxy_hosts then
return global.get("proxy")
- end
+ end
return
end