<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Squid on UNIX Publication</title><link>http://unix.pub/tags/Squid/</link><description>Recent content in Squid on UNIX Publication</description><generator>Hugo</generator><language>zh</language><copyright>[unixetc](https://unixetc.com)</copyright><lastBuildDate>Mon, 24 Aug 2026 17:01:00 +0800</lastBuildDate><atom:link href="http://unix.pub/tags/Squid/index.xml" rel="self" type="application/rss+xml"/><item><title>Linux透明代理</title><link>http://unix.pub/docs/LinuxDoc/Linux_Transparent_proxy/</link><pubDate>Fri, 14 Aug 2026 09:17:23 +0800</pubDate><guid>http://unix.pub/docs/LinuxDoc/Linux_Transparent_proxy/</guid><description>&lt;h1 id="linux透明代理"&gt;Linux透明代理&lt;a class="anchor" href="#linux%e9%80%8f%e6%98%8e%e4%bb%a3%e7%90%86"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;h2 id="支持透明代理transparent-proxy-support"&gt;支持透明代理(Transparent proxy support)&lt;a class="anchor" href="#%e6%94%af%e6%8c%81%e9%80%8f%e6%98%8e%e4%bb%a3%e7%90%86transparent-proxy-support"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This feature adds Linux 2.2-like transparent proxy support to current kernels.To use it, enable the socket match and the TPROXY target in your kernel config.You will need policy routing too, so be sure to enable that as well.&lt;/p&gt;
&lt;p&gt;该功能为当前内核增加了类似于 Linux 2.2 的透明代理支持。要使用此功能，您需要在内核配置中启用 socket 匹配（socket match）和 TPROXY 目标（TPROXY target）。同时，您还需要策略路由（policy routing），因此请务必也启用该功能。&lt;/p&gt;
&lt;p&gt;From Linux 4.18 transparent proxy support is also available in nf_tables.&lt;/p&gt;
&lt;p&gt;从 Linux 4.18 开始，nf_tables 也支持透明代理功能。&lt;/p&gt;
&lt;h3 id="让非本地套接字工作making-non-local-sockets-work"&gt;让非本地套接字工作(Making non-local sockets work)&lt;a class="anchor" href="#%e8%ae%a9%e9%9d%9e%e6%9c%ac%e5%9c%b0%e5%a5%97%e6%8e%a5%e5%ad%97%e5%b7%a5%e4%bd%9cmaking-non-local-sockets-work"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The idea is that you identify packets with destination address matching a local socket on your box, set the packet mark to a certain value::&lt;/p&gt;</description></item></channel></rss>