项目作者: kobehaha

项目描述 :
tcp-proxy
高级语言: Go
项目地址: git://github.com/kobehaha/tcp-proxy-system.git
创建时间: 2017-09-11T15:59:19Z
项目社区:https://github.com/kobehaha/tcp-proxy-system

开源协议:GNU General Public License v3.0

下载


Tcp-Proxy

simple tcp proxy for server

Build Status
Go Report Card
CircleCI Status

Overview

Tcp-proxy is a high-performance proxy for tcp layer by Go, Just like other tcp proxy such as nginx, haproxy. you can use it to split your traffic to a few backends. Tcp-proxy aims to simplify the tcp-proxy solution of Proxy.

Feature

1 Basic Function

  • Support limiting the max count of connections to proxy
  • Support custom load balance algorithm
  • Support dynamic checking backend by heartbeat service

2. Automatic Function

  • Dynamic add/remove backend without restarting or chaning config of proxy [doing]
  • Client’s ip ACL control [doing]

Install

  1. 1 Install Go
  2. 2 git clone https://github.com/kobehaha/tcp-proxy-system.git
  3. 3 cd tcp-proxy-system
  4. 4 make
  5. 5 cd bin
  6. 6 proxyd

Usege

  • default config file

    default config PATH

    1. $(tcp-proxy-system)/config/default.json

    start

    1. tcp-proxy-system/bin/proxyd
  • special config file

    start

    1. proxyd -conf=/etc/config.json

    log

    1. 2017/10/21 23:31:12 success load config file: /etc/default.json
    2. 2017/10/21 23:31:12 server.go:69: start server and server address is :1001
    3. 2017/10/21 23:31:12 server.go:76: proxy server start ok
    4. 2017/10/21 23:31:17 proxy_tcp.go:151: clean backendUrl which is not available -----> 192.168.33.19:8000

Details of Tcp-proxy

  • design (doing)

License

Tcp-proxy is under the GPL license. See the LICENSE directory for details.