luvit 使用 http 获取公网地址
2017-04-28 本文已影响49人
自由快挂
获取公网地址
local http = require('http')
local req = http.get('https://api.ipify.org', function ( res )
res:on('data', function (ip)
p("ip", ip)
end)
res:on('end', function ()
p('stream ended')
end)
end)