通过http连接通过本地unix套接字访问远程shell

通过http连接通过本地unix套接字访问远程shell,shell,nginx,websocket,lua,socat,Shell,Nginx,Websocket,Lua,Socat,我需要通过远程主机启动的http连接,通过服务器unix套接字对远程主机进行shell访问 我知道不使用http,直接的方式是如何实现的: 服务器侦听TCP-PORT并将其映射到UNIX-SOCKET: server#socat TCP-LISTEN:12345 UNIX-LISTEN:/tmp/12345.sock 远程主机将Shell映射到已启动的TCP连接: remote#socat EXEC:sh、pty、stderr、setid、sigint、sane TCP:my.server.co

我需要通过远程主机启动的http连接,通过服务器unix套接字对远程主机进行shell访问

我知道不使用http,直接的方式是如何实现的:

  • 服务器侦听TCP-PORT并将其映射到UNIX-SOCKET:
  • server#socat TCP-LISTEN:12345 UNIX-LISTEN:/tmp/12345.sock

  • 远程主机将Shell映射到已启动的TCP连接:
  • remote#socat EXEC:sh、pty、stderr、setid、sigint、sane TCP:my.server.com:12345

  • 要连接远程shell,我可以执行以下操作:
  • server#socat文件:`tty`,原始,echo=0 UNIX-CONNECT:/tmp/12345.sock

    上述3个步骤的模式:

    远程[shell]->tcp:my.server.com:12345:服务器::unix:/tmp/12345.sockhttps:///my.server.com:443/shell服务器应请求打开unix:/tmp/12345.sock/shell]::unix:/tmp/12345.sock