优化
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# db_tunnel
|
||||
结合TELEPORT堡垒机使用的DB SSH数据库隧道工具
|
||||
数据库配置文件、tp_decrypt bin请放到/etc或者与bin文件同一路径
|
||||
数据库配置文件请放到/etc或者与bin文件同一路径
|
||||
|
||||
# build
|
||||
git clone https://git.aixiao.me/aixiao/db_tunnel.git
|
||||
|
||||
BIN
bin/db_tunnel
BIN
bin/db_tunnel
Binary file not shown.
@@ -86,10 +86,12 @@ func Tunnel(username string, password string, serverAddr string, remoteAddr stri
|
||||
}
|
||||
|
||||
var connect int // 连接数
|
||||
connect = 0
|
||||
|
||||
for {
|
||||
|
||||
connect++
|
||||
fmt.Println("当前连接数:", connect)
|
||||
|
||||
// 设置本地
|
||||
localConn, err := localListener.Accept()
|
||||
@@ -323,7 +325,7 @@ func main() {
|
||||
time.Sleep(time.Second * 5)
|
||||
cmd.Wait()
|
||||
}
|
||||
os.Exit(0)
|
||||
//os.Exit(0)
|
||||
} else {
|
||||
fmt.Printf("[*] Service running in PID: %d PPID: %d\n", os.Getpid(), os.Getppid())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user