1 Star 0 Fork 0

fengzhitalker / EasyProxy

加入 Gitee
与超过 1000 万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README.md

EasyProxy

A simple proxy server.

Introduction

+----------+                                           +------------+
|  client  |<--------+                                 |            |
+----------+         +-------->+-----+<--------------->|   server   |
                               |     |                 |            |
+----------+                   |     |                 +------------+
|  client  |<----------------->|     |
+----------+                   |     |
                               |     |                 +------------+
+----------+                   |  L  |                 |            |
|  client  |<----------------->|  B  |<--------------->|   server   |
+----------+                   |  S  |                 |            |
                               |     |                 +------------+
+----------+                   |     |
|  client  |<----------------->|     |
+----------+                   |     |                 +------------+
                               |     |                 |            |
+----------+        +--------->+-----+<--------------->|   server   |
|  client  |<-------+                                  |            |
+----------+                                           +------------+

As the chart above, easyproxy act as the LBS server. If you meet the situation that cannot access some service directly or need a server as a gateway, you may use this to proxy.

Usage

go get github.com/xsank/EasyProxy
go run build.go build
  • The sample config is about mysql proxy, so you can access the mysql database actually at backend through the localhost 9527, you can easily modify the default.json to change the service. Any protocol based on TCP would work well such as:mysql, ssh, svn...
  • For keep simple, easyproxy only support poll,random,iphash strategies, and the default strategy is poll,the easyproxy would add more if there is a demand.
  • Besides, you can curl localhost:7259/statistic to get the current connection status. If you want to know more runtime debug info about the proxy, you can curl http://localhost:7259/debug/pprof to get more details.
  • You can change the number of MAX processorsand and the heartbeat time based on your requirements.

License

Easyproxy is distributed under MIT License.

简介

Make tcp proxy easy to use. 展开 收起
Go
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Go
1
https://gitee.com/fengzhitalker/EasyProxy.git
git@gitee.com:fengzhitalker/EasyProxy.git
fengzhitalker
EasyProxy
EasyProxy
master

搜索帮助

10d9f8b4 4838521 8bde8327 4838521