2018年6月26日

Node.js做的代理转发服务器

摘要: 可以代理苹果ID服务器 代码更新。下面这个可以记录到文件里面去 阅读全文

posted @ 2018-06-26 14:02 &大飞 阅读(230) 评论(0) 推荐(0)

nodejs使用nginx端口转发,端口映射,反向代理,子域名映射到不同端口

摘要: 工作中经常使用nginx将端口映射到另一个端口,或者子域名分别映射到不同端口。 查看nginx.conf,可以知道我们可以将配置文件放在conf.d目录下.参考链接 在conf.d中新建一个file.conf文件,文件名可以自己起,需要以.conf为后缀。 下面的代码将8090端口转发到90端口 或 阅读全文

posted @ 2018-06-26 13:57 &大飞 阅读(1437) 评论(0) 推荐(0)

node.js实现端口转发

摘要: 本文为大家分享的是node.js端口转发实现代码,供大家参考,具体内容如下 #!/sbin/node var net = require('net'); function proxyPort(srcport,destServer,destport) { var server = net.create 阅读全文

posted @ 2018-06-26 13:54 &大飞 阅读(893) 评论(0) 推荐(0)

nodejs 转发websocket (websocket proxy)

摘要: const http = require('http') const server = http.createServer((req, res) =>{ res.end('hello world'); }).listen(8080) server.on('upgrade', (req, client, head) => { const headers = _getProxyHea... 阅读全文

posted @ 2018-06-26 13:48 &大飞 阅读(350) 评论(0) 推荐(0)

导航