我们可以做ProxyTunnel并重定向到其他端口吗?


1

从互联网上了解到我们可以通过HTTP隧道SSH [reference1] [reference2]

一旦安装了Apache服务器

<VirtualHost _default_:80>
    ProxyRequests on
    ProxyVia block
    AllowCONNECT 22
    <Proxy *>
        # Deny all proxying by default ...
        Require all denied
    </Proxy>
    <Proxy 127.0.0.1>
        # Now allow proxying through localhost only
        Require all granted
    </Proxy>
</VirtualHost>

在客户端,我们只需要像下面这样一些额外的配置

host home80
   HostName myserver.com
   ProxyCommand proxytunnel -q -p myserver.com:80 -d 127.0.0.1:22
   Port 80

但是对于我来说,目的端口一直在变化。(例如,目标端口上方是22)

我不想让最终用户继续更改他们的配置,如果我可以将“ 127.0.0.1:22”重定向到“ 127.0.0.1:xxx”,那就很好了

有没有想过我怎么能做到这一点?

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.