...
存在操作不方便,不支持交互式命令,能利用漏洞进入服务器后台,获取root权限等问题
NetDispatch
存在连接丢失,服务端程序奔溃退出等问题服务端程序崩溃退出等问题
...
本地设备的webssh功能
增加jsoncmd的解析命令设备端GatewayServer需增加jsoncmd的解析命令
代码块 |
---|
int CWebSSH::Handle(HTTPServerRequest &request, CJSRPCResponseMaker &response, Poco::URI &uri) { response.BeginResult(); response.BeginObj(NULL); response.AddMemberString("url", " http://192.168.1.198:8080"); response.EndObj(); response.EndResult(); return 0; } const char *CWebSSH::GetName() { return "webssh"; } |
效果如下前端效果如下
...
本地webssh已经修改成功,需要新增omc上的远程webssh功能
部署frp功能
代码块 |
---|
# 服务端 docker run --restart=always --network host -d -v /etc/frp/frps.toml:/etc/frp/frps.toml --name frps snowdreamtech/frps # 客户端 docker run --restart=always --network host -d -v /etc/frp/frpc.toml:/etc/frp/frpc.toml --name frpc snowdreamtech/frpc |
...
代码块 |
---|
bindAddr = "0.0.0.0" bindPort = 9000 quicBindPort = 9000 transport.maxPoolCount = 2000 transport.tcpMux = true transport.tcpMuxKeepaliveInterval = 60 transport.tcpKeepalive = 7200 transport.tls.force = false webServer.addr = "0.0.0.0" webServer.port = 9003 webServer.user = "admin" webServer.password = "msj123" webServer.pprofEnable = false log.to = "./frps.log" log.level = "info" log.maxDays = 3 log.disablePrintColor = false auth.method = "token" auth.token = "msj123" allowPorts = [ { start = 60000, end = 65535 } ] maxPortsPerClient = 1024 udpPacketSize = 1500 natholeAnalysisDataReserveHours = 168 |
客户端 x86客户端 /etc/frp/frpc.toml
代码块 |
---|
serverAddr = "49.234.66.123" serverPort = 9000 auth.method = "token" auth.token = "msj123" webServer.addr = "0.0.0.0" webServer.port = 9003 webServer.user = "admin" webServer.password = "msj123" webServer.pprofEnable = false [[proxies]] name = "192.168.1.27-ssh" type = "tcp" localIP = "192.168.1.27" localPort = 22 remotePort = 60120 |
...