1 Star 2 Fork 1

oshine/woo_proxy

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
client.woo 858 Bytes
一键复制 编辑 原始数据 按行查看 历史
oshine 提交于 2023-02-21 21:59 . update
-- program by liyanxi(李焱曦)/oshine
-- power by WOO
-- 注意,注释有的英文有的中文,是在不同是时间写代码导致的,隔一段时间写代码就会忘了使用中文注释,见解下
_DIR = _DIR == '.' and './' or _DIR
print(_DIR,package.path)
local conf = require(_DIR .. '/conf')
_out('===start with conf:===', conf, '\n')
local addr = conf['http/s_sockets4/5_addr']
print('sockets(4/5) and http/s proxy start on:'.. addr..' yes ,all proxy on one port,juuuust capricious')
-- 开启 tcp sockets proxy监听服务
woo.sockets:new():listen('tcp', addr, function(handler)
print('client in...')
-- 启动一个线程来处理,启动线程需要绝对路径,把sockets handler,目录位置传入线程中去
_run(_DIR .. '/client/sockets_handler.woo', handler, _DIR, conf)
end, function(err)
print(err)
end)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/oshine/woo_proxy.git
git@gitee.com:oshine/woo_proxy.git
oshine
woo_proxy
woo_proxy
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385