Coder Social home page Coder Social logo

firstboot / rein Goto Github PK

View Code? Open in Web Editor NEW
72.0 72.0 26.0 20.44 MB

This program is used to efficiently redirect connections(TCP proxy to redirect) from one IP address/port combination to another. It is useful when operating virtual servers, dockers, firewalls and the like. Simple deployment. It creates a tunnel from a public endpoint to a locally running service.It was developed by golang.

License: MIT License

Go 97.28% Makefile 2.54% Batchfile 0.18%

rein's People

Contributors

firstboot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rein's Issues

有个问题

发现配置文件不能添加注释,如果配置了很多端口没有添加注释的话看配置文件会不太方便

没有异常处理机制,暂时不推荐使用--严重bug

在服务器上部署服务端
{
"inps": [
{"ctrl": "0.0.0.0:40001"},
{"ctrl": "0.0.0.0:40002"},
{"ctrl": "0.0.0.0:40003"},
{"ctrl": "0.0.0.0:40004"},
{"ctrl": "0.0.0.0:40005"}
]
}
然后启动,
随便一台机器。然后执行telnet x.x.x.x 40001
然后直接Ctrl+c,就能直接杀死服务端的rein程序。
报错日志

2023/06/09 11:12:36 connRecvDealOnce link in ok ...
panic: runtime error: slice bounds out of range
goroutine 21 [running]:
main.coroutineInpsObj.run(0x800, 0xc000074370, 0xd)
/home/rein/src/coroutine_inps.go:105 +0x884
created by main.commandDealObj.modelInpsDeal
/home/rein/src/command_deal.go:174 +0x25a

发现一个问题

1、当其中一个连接发生错误的时候会造成整理程序挂掉,从而影响了其它正常的连接,这样很不人道。
2、没有后台启动方式,有些不太好
3、修改配置后能否做到不重启?

使用 nc -zv 命令测试 inps 的17500端口导致 inps 直接崩掉

故障描述

服务器端使用inps 模式,工作在17500端口。当使用 nc -zv <server_ip>:17500 测试服务器端的端口是否可达时,第一次返回 Connection to x.x.x.x port 17500 [tcp/*] succeeded! 当再次使用同样的nc 命令测试时,直接返回connectx to x.x.x.x port 17500 (tcp) failed: Connection refused,此时inps 服务器端出现如下错误,导致直接崩溃:

2020/03/30 22:49:26 flag: 0 n: 0 buffers: 1
2020/03/30 22:49:26 flag: -1 n: 0 buffers: 1
2020/03/30 22:49:26 srvConnRight: c00001ccc0 close.
2020/03/30 22:49:26 srvConnLeft: c00001ccb0 close.

2020/03/30 22:49:58 netListen.Accept ok!, conn id: c0000f2100
2020/03/30 22:49:58 ctrlServConn link in ok ...
2020/03/30 22:49:58 conn: c00001d0d0 close.
2020/03/30 22:49:58 connRecvDealOnce link in ok ...
panic: runtime error: slice bounds out of range

goroutine 6 [running]:
main.coroutineInpsObj.run(0x800, 0xc0000123f0, 0xd)
/home/rein/src/coroutine_inps.go:105 +0x884
created by main.commandDealObj.modelInpsDeal
/home/rein/src/command_deal.go:174 +0x25a

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.