DNSNAT介绍
官网:http://dnsnat.com
dnsnat是一款具备内网穿透和动态域名解析功能的软件。相比其它内网代理,dnsnat灵活、易用、免费。无需配置和注册就可通过dnsnat生成的域名可以远程访问内网的code-server、ssh、aria等网络应用。本程序简单易用,可做到一键部署。使您内网的服务通过公网随时随地的访问。
一条命令安装部署
1 2 3 4 5 6 7 8
| demonelf@dnsnat ~ $curl http://uanet.cn/nat.sh | sh -s manjaro
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 301 100 301 0 0 2155 0 --:--:-- --:--:-- --:--:-- 2165 [2022-12-12 16:36:35] [INFO] status: [connected] [2022-12-12 16:36:35] [INFO] code : [https://code-manjaro.uanet.cn] [2022-12-12 16:36:35] [INFO] ssh : [ssh -C -o ProxyCommand="socat - PROXY:uanet.cn:%h:%p,proxyport=2222" root@manjaro]
|
通过网页开启远程开发

远程登陆内网ssh
1 2 3 4
| ~ ❯ ssh -C -o ProxyCommand="socat - PROXY:uanet.cn:%h:%p,proxyport=2222" demonelf@manjaro
demonelf@dnsnat ~ $uname -a Linux dnsnat 5.8.10
|
更多参考:
1 2 3 4 5 6 7 8
| ssh -C -o ProxyCommand="corkscrew uanet.cn 2222 %h %p" root@domain ssh -C -o ProxyCommand="socat - PROXY:uanet.cn:%h:%p,proxyport=2222" root@domain ssh -C -o ProxyCommand="proxytunnel -p uanet.cn:2222 -d %h:%p" root@domain ssh -C -o ProxyCommand="ncat --proxy-type http --proxy uanet.cn:2222" root@domain ssh -C -o ProxyCommand="nc -X connect -x uanet.cn:2222 %h %p" root@domain
相关文档: https://www.jianshu.com/p/f6990f3a52eb
|
通过vscode-remote远程
参考:龙翔天翼:vscode 通过代理连接远程服务器(win10)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| Host 192.168.180.40 HostName 192.168.180.40 Compression yes User root
Host macmini HostName macmini Compression yes User dnsnat ProxyCommand socat - PROXY:uanet.cn:%h:%p,proxyport=2222 Host dnsnat HostName dnsnat Compression yes User demonelf ProxyCommand socat - PROXY:uanet.cn:%h:%p,proxyport=2222
|

声明
本程序仅为代理功能,所以不承担任何法律责任。
知乎
https://zhuanlan.zhihu.com/p/488974941