<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://qingliezhiquan.com/mediawiki/index.php?action=history&amp;feed=atom&amp;title=WSL2_proxy_%E7%9A%84%E6%96%B9%E6%B3%95</id>
	<title>WSL2 proxy 的方法 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://qingliezhiquan.com/mediawiki/index.php?action=history&amp;feed=atom&amp;title=WSL2_proxy_%E7%9A%84%E6%96%B9%E6%B3%95"/>
	<link rel="alternate" type="text/html" href="https://qingliezhiquan.com/mediawiki/index.php?title=WSL2_proxy_%E7%9A%84%E6%96%B9%E6%B3%95&amp;action=history"/>
	<updated>2026-08-11T09:01:05Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://qingliezhiquan.com/mediawiki/index.php?title=WSL2_proxy_%E7%9A%84%E6%96%B9%E6%B3%95&amp;diff=7991&amp;oldid=prev</id>
		<title>Mwroot: Created page with &quot;== 查 IP == 在 PowerShell 里运行 ipconfig。  == Host 机 == * Proxy 软件开启允许局域网连入 * 开防火墙允许 WSL 流量接入本机 * 把那条系统自建的 WSL 入站规则先删掉 &lt;syntaxhighlight lang=&quot;bash&quot; line&gt; New-NetFirewallRule -Name &quot;WSL-Allow-Inbound&quot; -DisplayName &quot;WSL-Proxy&quot; -InterfaceAlias &quot;vEthernet (WSL)&quot; -Direction Inbound -Action Allow &lt;/syntaxhighlight&gt; * .wslconfig 里写入 &lt;syntaxhighlight lang=&quot;bash&quot; line&gt; dnsTunneling=false &lt;...&quot;</title>
		<link rel="alternate" type="text/html" href="https://qingliezhiquan.com/mediawiki/index.php?title=WSL2_proxy_%E7%9A%84%E6%96%B9%E6%B3%95&amp;diff=7991&amp;oldid=prev"/>
		<updated>2025-09-29T02:31:53Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== 查 IP == 在 PowerShell 里运行 ipconfig。  == Host 机 == * Proxy 软件开启允许局域网连入 * 开防火墙允许 WSL 流量接入本机 * 把那条系统自建的 WSL 入站规则先删掉 &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt; New-NetFirewallRule -Name &amp;quot;WSL-Allow-Inbound&amp;quot; -DisplayName &amp;quot;WSL-Proxy&amp;quot; -InterfaceAlias &amp;quot;vEthernet (WSL)&amp;quot; -Direction Inbound -Action Allow &amp;lt;/syntaxhighlight&amp;gt; * .wslconfig 里写入 &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt; dnsTunneling=false &amp;lt;...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== 查 IP ==&lt;br /&gt;
在 PowerShell 里运行 ipconfig。&lt;br /&gt;
&lt;br /&gt;
== Host 机 ==&lt;br /&gt;
* Proxy 软件开启允许局域网连入&lt;br /&gt;
* 开防火墙允许 WSL 流量接入本机&lt;br /&gt;
* 把那条系统自建的 WSL 入站规则先删掉&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
New-NetFirewallRule -Name &amp;quot;WSL-Allow-Inbound&amp;quot; -DisplayName &amp;quot;WSL-Proxy&amp;quot; -InterfaceAlias &amp;quot;vEthernet (WSL)&amp;quot; -Direction Inbound -Action Allow&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* .wslconfig 里写入&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
dnsTunneling=false&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Guest 机 ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
# .bashrc 里设开关&lt;br /&gt;
host_ip=$(awk &amp;#039;/nameserver/ {print $2}&amp;#039; /etc/resolv.conf 2&amp;gt;/dev/null)&lt;br /&gt;
alias pon=&amp;#039;export {http,https,ftp,all}_proxy=&amp;quot;http://$host_ip:12345&amp;quot;&amp;#039;&lt;br /&gt;
alias poff=&amp;#039;unset {http,https,ftp,all}_proxy&amp;#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 检测成功与否 ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; line&amp;gt;&lt;br /&gt;
wget www.google.com&lt;br /&gt;
curl -Iv https://www.google.com&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mwroot</name></author>
	</entry>
</feed>