gotcpforward

command module
v1.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2023 License: AGPL-3.0 Imports: 11 Imported by: 0

README

Go tcp forward

大家不要被这个简单的名字糊弄了。什么tcpforward, 它还是一个威力强大的连接池子。 因为驱动tcp转发的机制,是基于连接池的。

借用什么黄焖鸡的广告词,”做鸡我们是专业的“,做池子我们也是专业的。

因为是tcp协议通吃,所以只要是基于tcp的应用,比如postgres数据库,mysql数据库,redis数据库,等等各种tcp协议的应用,甚至可以是一个什么tcp游戏服务器,http协议服务器。 所有的只要是基于tcp的。它都能处理。

连接池,默认不开启。你可以手动加参数开启。

高级版有更多特性。【保活,主动链接,连接池动态扩容缩容,分布式等等】

支持作者

Buy me a cup of coffee for $3

买一杯咖啡,请作者只需要$3 美元

ko-fi

This application can forward tcp connection to upstream.

I use it to forward traffic to my kubernetes .

I use linux systemd to manage the tcp forward.

User request => gotcpforward => my http service api hosted inside k8s

build

CGO_ENABLED=0 go build -v -a -ldflags ' -s -w  -extldflags "-static"' .

use

  -l string
    	listen host:port
  -r string
    	remote host:port

Example use, forward local port to remote server port

./gotcpforward -l :3306 -r 10.1.23.43:3316

License

    Copyright (C) 2000-2022 cnmade

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published
    by the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
muxcmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL