惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

月光博客
月光博客
Apple Machine Learning Research
Apple Machine Learning Research
IT之家
IT之家
阮一峰的网络日志
阮一峰的网络日志
雷峰网
雷峰网
S
SegmentFault 最新的问题
量子位
有赞技术团队
有赞技术团队
V
V2EX
宝玉的分享
宝玉的分享
Hugging Face - Blog
Hugging Face - Blog
B
Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Jina AI
Jina AI
C
Check Point Blog
G
Google Developers Blog
博客园 - 叶小钗
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园_首页
T
Tailwind CSS Blog
B
Blog RSS Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
酷 壳 – CoolShell
酷 壳 – CoolShell
U
Unit 42

博客园 - PanPan003

AI coding - rewind、undo 撤销操作 如何省token? - 项目 知识 固化 如何省token?--- RTK ,input 数据压缩 如何省token?--- ignore文件 如何省token?--- token 用量统计 如何省token? - 何时开启新session? 如何省token? - 更便宜的模型 处理低风险任务 如何省token?-- 如何提问?避免直接粘贴 大段文件 如何省token?- Plan ,任务拆分,从小模型开始 如何省token?-rewind(todo) 如何省token?- handoff (todo) 如何省token? - compact,压缩上下文 Skill - superpowers skill - mattpocock OpenCode 安装 claude code 安装 npm config AI - coding - links/summary SSH 本地端口转发 --- VM中ubuntu service 可被 Windows 访问 内网穿透 - devtunnel decimal, double在 c#中的区别 python environment settings xUnit Theory: Working With InlineData, MemberData, ClassData docker network - container networking KEDA — Kubernetes Based Event Driven Auto scaling(转载) rabbit MQ —— ha-sync-mode. message 同步/ 丢失 in new pods rabbit MQ —— ha-mode, message 同步策列:所有nodes or one nodes 博文阅读密码验证 - 博客园 Kubernetes hpa container scale up/ down 原理 in kubernetes
Linux 虚拟机 反向代理 - 到宿主机 -
PanPan003 · 2026-07-24 · via 博客园 - PanPan003
## powershell .psl
$listener = [System.Net.Sockets.TcpListener]::new([System.Net.IPAddress]::Parse('192.168.165.1'), 9001) $listener.Start() Write-Host 'Relay listening on 192.168.165.1:9001 -> 127.0.0.1:9000' while ($true) { $client = $listener.AcceptTcpClient() try { $upstream = [System.Net.Sockets.TcpClient]::new('127.0.0.1', 9000) $clientStream = $client.GetStream() $upstreamStream = $upstream.GetStream() $task1 = $clientStream.CopyToAsync($upstreamStream) $task2 = $upstreamStream.CopyToAsync($clientStream) [System.Threading.Tasks.Task]::WaitAny(@($task1, $task2)) | Out-Null } catch { Write-Host $_.Exception.Message } finally { try { $client.Close() } catch {} try { $upstream.Close() } catch {} } }

公司代理

 ↑

127.0.0.1:9000

 ↑

Windows宿主机

192.168.165.1:9001

 ↑

VMware NAT网络

 ↑

Linux虚拟机

Linux ↔ 9001 ↔ 9000 ↔ Internet

PS C:\****> .\proxy.ps1
Relay listening on 192.168.165.1:9001 -> 127.0.0.1:9000

****@****-VMware-Virtual-Platform:~$ ip route
default via 192.168.165.2 dev ens33 proto dhcp src 192.168.165.128 metric 20100

****@****-VMware-Virtual-Platform:~$ hostname -I
192.168.165.128 172.20.0.1 172.17.0.1 172.19.0.1 172.18.0.1 172.21.0.1 fd00::1

PS C:\Users\****> ssh -N -R 9001:127.0.0.1:9000 [username]@192.168.165.128

****@****-VMware-Virtual-Platform:~$ sudo apt  -o Acquire::http::Proxy="http://127.0.0.1:9001"  -o Acquire::https::Proxy="http://127.0.0.1:9001"  install traceroute

Installing:

  traceroute

Summary:

  Upgrading: 0, Installing: 1, Removing: 0, Not Upgrading: 138

  Download size: 54.4 kB

  Space needed: 167 kB / 61.4 GB available

Get:1 http://archive.ubuntu.com/ubuntu resolute/universe amd64 traceroute amd64 1:2.1.6-1build1 [54.4 kB]

Fetched 54.4 kB in 2s (31.8 kB/s)

Selecting previously unselected package traceroute.

(Reading database… 200630 files and directories currently installed.)

Preparing to unpack …/traceroute_1%3a2.1.6-1build1_amd64.deb…

Unpacking traceroute (1:2.1.6-1build1)…

Setting up traceroute (1:2.1.6-1build1)…

update-alternatives: using /usr/bin/traceroute.db to provide /usr/bin/traceroute (traceroute) in auto mode

update-alternatives: using /usr/bin/traceroute6.db to provide /usr/bin/traceroute6 (traceroute6) in auto mode

update-alternatives: using /usr/bin/lft.db to provide /usr/bin/lft (lft) in auto mode

update-alternatives: using /usr/bin/traceproto.db to provide /usr/bin/traceproto (traceproto) in auto mode

update-alternatives: using /usr/sbin/tcptraceroute.db to provide /usr/sbin/tcptraceroute (tcptraceroute) in auto mode

Processing triggers for man-db (2.13.1-1build1)…

image