Repository files navigation swtc-proxy API服务 - 代理至井通节点
swtc-lib使用websocket,兼容性和规模化有一定的问题
swtc-proxy提供REST服务,代理到井通节点解决上述问题
安全第一, 确保密钥不出本机
尽量保持数据结构 和 swtc-lib 对应一致
所有API应答均为json object, 包括数据和错误
尽量支持可选参数, 几乎所有swtc-lib支持的参数都可以通过query获得支持
集成至 swtc-transaction 和 swtc-api
精简为主, 面向所有用户。 提供缺省配置和docker image
swagger-ui标准文档
kubernetes (通过环境变量设置上游/调试/基于IP的访问限制)
kubectl create -f https://raw.githubusercontent.com/swtcca/swtcproxy/master/kubernetes.yaml
docker (通过环境变量设置上游/调试/基于IP的访问限制)
docker run --rm -e UPSTREAM=wss://s.jingtum.com:5020 -e DEBUG=true -e RATE=100 -d -p 5080:5080 lospringliu/swtcproxy
git clone https://github.com/swtcca/swtcproxy.git
cd swtcproxy
npm install
npm run test
env UPSTREAM=wss://s.jingtum.com:5020 RATE=100 npm run start
本地文档: http://localhost:5080/swagger
相应修改 static/swagger.json 的server.url
git clone https://github.com/swtcca/swtclib.git
cd swtclib/packages/swtc-proxy
npm install
npm run test
npm run start
本地文档: http://localhost:5080/swagger
相应修改 static/swagger.json 的server.url
可以使用 haproxy/nginx 作集群,提供高可用高性能服务
About
simplified proxy app and docker build
Resources
Stars
Watchers
Forks
You can’t perform that action at this time.