<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>mac &#8211; 编码无悔 /  Intent &amp; Focused</title>
	<atom:link href="https://www.codelast.com/tag/mac/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.codelast.com</link>
	<description>最优化之路</description>
	<lastBuildDate>Mon, 27 Apr 2020 17:50:55 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>[原创] Mac终端使用Privoxy代理</title>
		<link>https://www.codelast.com/%e5%8e%9f%e5%88%9b-mac%e7%bb%88%e7%ab%af%e4%bd%bf%e7%94%a8privoxy%e4%bb%a3%e7%90%86/</link>
					<comments>https://www.codelast.com/%e5%8e%9f%e5%88%9b-mac%e7%bb%88%e7%ab%af%e4%bd%bf%e7%94%a8privoxy%e4%bb%a3%e7%90%86/#comments</comments>
		
		<dc:creator><![CDATA[learnhard]]></dc:creator>
		<pubDate>Sat, 27 Oct 2018 05:31:55 +0000</pubDate>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[原创]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[Privoxy]]></category>
		<category><![CDATA[代理]]></category>
		<category><![CDATA[终端]]></category>
		<guid isPermaLink="false">https://www.codelast.com/?p=10192</guid>

					<description><![CDATA[<p>
与<a href="https://www.codelast.com/?p=10185" target="_blank" rel="noopener noreferrer"><span style="background-color:#ffa07a;">Ubuntu系统下的配置</span></a>过程比较相似，先安装Privoxy：</p>
<blockquote>
<p>
		brew install privoxy</p>
</blockquote>
<p>再修改其配置文件&#160;<span style="color:#0000ff;">/usr/local/etc/privoxy/config</span>，在文件末尾添加如下内容：<br />
<span id="more-10192"></span></p>
<pre style="color: rgb(0, 0, 32); background: rgb(246, 248, 255);">
forward-socks5 / <span style="color: rgb(0, 140, 0);">127</span><span style="color: rgb(32, 0, 128); font-weight: bold;">.</span><span style="color: rgb(0, 140, 0);">0</span><span style="color: rgb(32, 0, 128); font-weight: bold;">.</span><span style="color: rgb(0, 140, 0);">0</span><span style="color: rgb(32, 0, 128); font-weight: bold;">.</span><span style="color: rgb(0, 140, 0);">1</span><span style="color: rgb(48, 128, 128);">:</span><span style="color: rgb(0, 140, 0);">1080</span> <span style="color: rgb(32, 0, 128); font-weight: bold;">.</span> <span style="color: rgb(89, 89, 121);"># SOCKS5代理地址</span>
listen-address <span style="color: rgb(0, 140, 0);">127</span><span style="color: rgb(32, 0, 128); font-weight: bold;">.</span><span style="color: rgb(0, 140, 0);">0</span><span style="color: rgb(32, 0, 128); font-weight: bold;">.</span><span style="color: rgb(0, 140, 0);">0</span><span style="color: rgb(32, 0, 128); font-weight: bold;">.</span><span style="color: rgb(0, 140, 0);">1</span><span style="color: rgb(48, 128, 128);">:</span><span style="color: rgb(0, 140, 0);">8080</span> <span style="color: rgb(89, 89, 121);"># HTTP代理地址</span>
forward <span style="color: rgb(0, 140, 0);">10</span><span style="color: rgb(32, 0, 128); font-weight: bold;">.</span><span style="color: rgb(48, 128, 128);">*</span><span style="color: rgb(32, 0, 128); font-weight: bold;">.</span><span style="color: rgb(48, 128, 128);">*</span><span style="color: rgb(32, 0, 128); font-weight: bold;">.</span></pre>&#8230; <a href="https://www.codelast.com/%e5%8e%9f%e5%88%9b-mac%e7%bb%88%e7%ab%af%e4%bd%bf%e7%94%a8privoxy%e4%bb%a3%e7%90%86/" class="read-more">Read More </a>]]></description>
										<content:encoded><![CDATA[<p>
与<a href="https://www.codelast.com/?p=10185" target="_blank" rel="noopener noreferrer"><span style="background-color:#ffa07a;">Ubuntu系统下的配置</span></a>过程比较相似，先安装Privoxy：</p>
<blockquote>
<p>
		brew install privoxy</p>
</blockquote>
<p>再修改其配置文件&nbsp;<span style="color:#0000ff;">/usr/local/etc/privoxy/config</span>，在文件末尾添加如下内容：<br />
<span id="more-10192"></span></p>
<pre style="color: rgb(0, 0, 32); background: rgb(246, 248, 255);">
forward-socks5 / <span style="color: rgb(0, 140, 0);">127</span><span style="color: rgb(32, 0, 128); font-weight: bold;">.</span><span style="color: rgb(0, 140, 0);">0</span><span style="color: rgb(32, 0, 128); font-weight: bold;">.</span><span style="color: rgb(0, 140, 0);">0</span><span style="color: rgb(32, 0, 128); font-weight: bold;">.</span><span style="color: rgb(0, 140, 0);">1</span><span style="color: rgb(48, 128, 128);">:</span><span style="color: rgb(0, 140, 0);">1080</span> <span style="color: rgb(32, 0, 128); font-weight: bold;">.</span> <span style="color: rgb(89, 89, 121);"># SOCKS5代理地址</span>
listen-address <span style="color: rgb(0, 140, 0);">127</span><span style="color: rgb(32, 0, 128); font-weight: bold;">.</span><span style="color: rgb(0, 140, 0);">0</span><span style="color: rgb(32, 0, 128); font-weight: bold;">.</span><span style="color: rgb(0, 140, 0);">0</span><span style="color: rgb(32, 0, 128); font-weight: bold;">.</span><span style="color: rgb(0, 140, 0);">1</span><span style="color: rgb(48, 128, 128);">:</span><span style="color: rgb(0, 140, 0);">8080</span> <span style="color: rgb(89, 89, 121);"># HTTP代理地址</span>
forward <span style="color: rgb(0, 140, 0);">10</span><span style="color: rgb(32, 0, 128); font-weight: bold;">.</span><span style="color: rgb(48, 128, 128);">*</span><span style="color: rgb(32, 0, 128); font-weight: bold;">.</span><span style="color: rgb(48, 128, 128);">*</span><span style="color: rgb(32, 0, 128); font-weight: bold;">.</span><span style="color: rgb(48, 128, 128);">*</span><span style="color: rgb(64, 1, 90);">/</span> <span style="color: rgb(32, 0, 128); font-weight: bold;">.</span> <span style="color: rgb(89, 89, 121);"># 内网地址不走代理</span>
forward <span style="color: rgb(32, 0, 128); font-weight: bold;">.</span>abc<span style="color: rgb(32, 0, 128); font-weight: bold;">.</span>com<span style="color: rgb(64, 1, 90);">/</span> <span style="color: rgb(32, 0, 128); font-weight: bold;">.</span> <span style="color: rgb(89, 89, 121);"># 指定域名不走代理</span></pre>
<p><span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a><br />
然后以&nbsp;root 启动Privoxy（如果之前已经启动过，可以先 kill -9&nbsp;杀掉原来的进程再启动）：</p>
<pre style="color: rgb(0, 0, 32); background: rgb(246, 248, 255);">
sudo privoxy <span style="color: rgb(64, 1, 90);">/usr/local/etc/privoxy/config</span></pre>
<p>
<span style="background-color: rgb(255, 255, 255); font-family: Verdana; font-size: 16px; white-space: pre;">再检查一下Privoxy是否启动成功了：</span></p>
<blockquote>
<div>
		<span style="background-color: rgb(255, 255, 255); font-family: Verdana; font-size: 16px; white-space: pre;">codelast@codelast:~$ ps -ef | grep privoxy</span></div>
<div>
		<span style="background-color: rgb(255, 255, 255); font-family: Verdana; font-size: 16px; white-space: pre;">&nbsp; 501&nbsp; 1391&nbsp; &nbsp; &nbsp;1&nbsp; &nbsp;0&nbsp; 1:08PM ??&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0:00.02 privoxy /usr/local/etc/privoxy/config</span></div>
<div>
		<span style="background-color: rgb(255, 255, 255); font-family: Verdana; font-size: 16px; white-space: pre;">&nbsp; 501&nbsp; 1442&nbsp; 1363&nbsp; &nbsp;0&nbsp; 1:23PM ttys003&nbsp; &nbsp; 0:00.00 grep privoxy</span></div>
</blockquote>
<p>然后set两个环境变量：</p>
<pre style="color: rgb(0, 0, 32); background: rgb(246, 248, 255);">
<span style="color: rgb(119, 121, 187); font-weight: bold;">export</span> <span style="color: rgb(0, 125, 69);">http_proxy</span><span style="color: rgb(48, 128, 128);">=</span><span style="color: rgb(16, 96, 182);">&quot;127.0.0.1:8080&quot;</span>
<span style="color: rgb(119, 121, 187); font-weight: bold;">export</span> <span style="color: rgb(0, 125, 69);">https_proxy</span><span style="color: rgb(48, 128, 128);">=</span><span style="color: rgb(16, 96, 182);">&quot;127.0.0.1:8080&quot;</span></pre>
<p><span style="background-color: rgb(255, 255, 255); font-family: Verdana; font-size: 16px; white-space: pre;">现在终端就可以利用由sock5代理转成的http代理，来无障碍地访问各网站了。</span></p>
<p><span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a><br />
<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;版权声明&nbsp;<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;<br />
转载需注明出处：<u><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><em><span style="color: rgb(0, 0, 255);"><strong style="font-size: 16px;"><span style="font-family: arial, helvetica, sans-serif;">codelast.com</span></strong></span></em></a></u>&nbsp;<br />
感谢关注我的微信公众号（微信扫一扫）：</p>
<p style="border: 0px; font-size: 13px; margin: 0px 0px 9px; outline: 0px; padding: 0px; color: rgb(77, 77, 77);">
	<img decoding="async" alt="wechat qrcode of codelast" src="https://www.codelast.com/codelast_wechat_qr_code.jpg" style="width: 200px; height: 200px;" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codelast.com/%e5%8e%9f%e5%88%9b-mac%e7%bb%88%e7%ab%af%e4%bd%bf%e7%94%a8privoxy%e4%bb%a3%e7%90%86/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
