服务器url存入PATH变量

This commit is contained in:
MrZ626
2021-01-27 21:31:13 +08:00
parent 7217df1829
commit b7575ddc4e
2 changed files with 6 additions and 3 deletions

View File

@@ -547,7 +547,7 @@ do--httpRequest & wsConnect
if client then if client then
function httpRequest(tick,path,method,header,body) function httpRequest(tick,path,method,header,body)
local task,err=client.httpraw{ local task,err=client.httpraw{
url="http://krakens.tpddns.cn:10026"..path, url="http://"..PATH.url..":"..PATH.port..path,
method=method or"GET", method=method or"GET",
header=header, header=header,
body=body, body=body,
@@ -566,8 +566,8 @@ do--httpRequest & wsConnect
return return
end end
local task,err=client.wsraw{ local task,err=client.wsraw{
url="ws://krakens.tpddns.cn:10026"..path, url="ws://"..PATH.url..":"..PATH.port..path,
origin="krakens.tpddns.cn", origin=PATH.url,
header=header, header=header,
} }
if task then if task then

View File

@@ -141,6 +141,9 @@ for i=1,#MODOPT do
M.color=COLOR[M.color] M.color=COLOR[M.color]
end end
PATH={--Network API paths PATH={--Network API paths
url="hdustea.3322.org",
port="10026",
api="/tech/api/v1", api="/tech/api/v1",
appInfo="/app/info", appInfo="/app/info",
users="/users", users="/users",