17 Star 68 Fork 27

yedajiang44 / GatewayBranch

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

GatewayBranch

GatewayBranch 是一个基于 DotNetty 的轻量级网关转发工具

workflow

如何使用

导入命名空间

using GatewayBranch.Core;

添加中间件

services.AddGatewayBranch(hostContext.Configuration);

配置 appsettings.json

  "Gateway": {
    "TcpPort": [2012,2013], // 监听端口集合
    "BrabchServer": [
      {
        "Ip": "127.0.0.1", // 分支服务器Ip或域名
        "Port": 808, // 分支服务器 port
        "NeedReply": true // 如果为 `true` 该分支的下行数据将通过 `TcpPort` 下发至终端,否则将过滤掉
      },
      {
        "Ip": "127.0.0.1",
        "Port": 809,
        "NeedReply": true
      }
    ]
  }

在 docker 中运行

为方便使用,已创建 docker 镜像 yedajiang44/gatewaybranch

  • 下载 docker-compose.yml 文件
  • 执行 docker-compose up -d

注意

如果要映射配置文件,则需要创建相应的文件

路线图

  • 添加 udp 支持
  • 添加连接管理器接口
MIT License Copyright (c) 2020 yedajiang44 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

一个基于 DotNetty 的轻量级跨平台TCP网关的Socket转发工具,支持docker容器化部署 展开 收起
C# 等 3 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C#
1
https://gitee.com/yedajiang44/GatewayBranch.git
git@gitee.com:yedajiang44/GatewayBranch.git
yedajiang44
GatewayBranch
GatewayBranch
main

搜索帮助