函数:ts.setHttpProxy 设置 http 代理服务器(仅支持 iOS)

函数名称:设置 http 代理服务器

函数功能:设置 http 代理服务器

ts.so 版本:仅支持 v1.2.4 及其以上版本

函数方法

ts.setHttpProxy(IP,port)

参数 类型 必填 说明
IP string 代理服务器 IP 地址
port string 端口号

函数用例

local ts = require("ts")
IP = "123.43.123.1"
port="8008"
ts.setHttpProxy(IP,port) --—开启
ts.setHttpProxy("127.0.0.1","") --— 关闭

注意事项

此函数只针对 ts.so 中 httpGet 和 httpPost 函数生效,并不是设置手机设置中的代理。

Copyright 北京帮你玩科技有限公司 2023 all right reserved,powered by Gitbook该文章修订时间: 2024-03-06 17:50:18

results matching ""

    No results matching ""