使用正在使用的VS代码的SSH连接的透明代理
如标题所说,我正在寻找一种通过HTTP/Socks5代理使用SSH的方法。代理服务提供商软件是ClashforWindows
。
某些符号
c
是运行与代码的Windows 11主设备,并启用了远程SSH扩展名。s1
,s2
是远程服务器,它位于Intranet网络下的实验室中。S1
是Arduino上的Web服务器。S2
是安装了Windows 10服务器的服务器。尽管实验室有自己的公共IPv4地址,但它被管理员阻止,这意味着我无法通过公共地址达到它。P
是代理服务器。
c
,clashforwindows
上的当前情况
已安装,并在127.0.0.1:7890启用了代理。 HTTP和Socks5都可以使用,因为我在使用Switchyomega附加组件上使用它们在Edge浏览器上。
为了举一个当前情况的示例,假设s1
具有IP 10.0.0.7和s2
具有IP 10.0.0.8。
目前,我可以使用c
上的浏览器来通过代理服务器访问s1
部署的网站。也就是说,c< - > p< - > S1
正常工作。
但是,即使我已经在VS Code设置中设置了代理,我也无法使用c
上的VS代码来建立SSH连接。我还尝试在clashforwindows
的设置中启用系统代理。 VS代码中代理设置的详细信息可以在下面的图中看到。
解决
- 如何实现
c< - > p< - > S2
? - SSH连接是否有使用HTTP/Socks5代理的障碍?
As the title said, I'm looking for a method to use SSH via a http/socks5 proxy. The proxy service provider software is ClashForWindows
.
Some notations
C
is a Windows 11 Home device running VS Code, with remote-SSH extension installed and enabled.S1
,S2
are the remote servers, which is located in a lab under an intranet network.S1
is a web server on Arduino.S2
is a server with Windows 10 Server installed. Though the lab has its own public IPv4 address, it is blocked by the admin, which means I could not reach it by means of the public address.P
is the proxy server.
Current situation
On C
, ClashForWindows
is installed and the proxy is enabled on 127.0.0.1:7890. Both http and socks5 are available since I'm using them on Edge browser with SwitchyOmega add-on.
To give an example of current situation, let's say S1
has an IP 10.0.0.7 and S2
has an IP 10.0.0.8.
Currently, I could use the browser on C
to visit the website deployed on S1
through the proxy server. That is to say, C <--> P <--> S1
is working properly.
However, I cannot use the VS Code on C
to establish SSH connection with S2
, even though I have set proxy in VS Code settings. I've also tried to enable system proxy in settings of ClashForWindows
. Details of proxy settings in VS Code can be seen in the picture below.
Problems to solve
- How to achieve something like
C <--> P <--> S2
? - Are there any barriers for SSH connections to use a http/socks5 proxy ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用下面的命令启动VSCODE
代码-proxy-server =“ xxx.xx.xx.xx:port”
add命令in desktop for vscode
/usr/ share/applications/code.desktop
exec =/usr/usr/share/share/code/code/code/code -proxy-server = “ xx.xxxx:xxx” - nity-launch%f
start vscode with below command
code --proxy-server="xxx.xx.xx.xx:port"
add command in desktop for vscode
/usr/share/applications/code.desktop
Exec=/usr/share/code/code --proxy-server="xx.x.x.xx:xxx" --unity-launch %F