supports hosts

master
James Feng Cao 2 years ago
parent ddc9c8c16d
commit 4e8ff416e7

@ -316,13 +316,15 @@ Swiping on the top part of content window (near the top address bar by default)
</item>
<item>
<title>Blocking domain trees</title>
<title>Hosts files</title>
<link>/en/adblock_domain/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>/en/adblock_domain/</guid>
<description>hosts blocks whole domain trees including all descedant domains. The domains in the hosts file must be 2 or 3 segment domains, such as &amp;quot;yahoo.com&amp;quot; and &amp;quot;finance.yahoo.com&amp;quot;. If the length of the last 2 segments is less than 7, such as &amp;quot;com.pl&amp;quot;, then it is treated as one segment, so domains like &amp;quot;xxx.xxx.com.pl&amp;quot; are also valid in the hosts file.
Each line of the hosts file has the following format:</description>
<description>The hosts files &amp;quot;hosts&amp;quot; and &amp;quot;default.hosts&amp;quot; take effect when the setting option &amp;quot;using hosts&amp;quot; is checked.
The file &amp;quot;hosts&amp;quot; defines IP addresses for domains. Each line has the following format:
[IP address][single space][domain name]
&amp;quot;default.hosts&amp;quot; blocks whole domain trees including all descedant domains. The domains in the hosts file must be 2 or 3 segment domains, such as &amp;quot;yahoo.com&amp;quot; and &amp;quot;finance.yahoo.com&amp;quot;. If the length of the last 2 segments is less than 7, such as &amp;quot;com.</description>
</item>
</channel>

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="../style.css" type="text/css" />
<title>Blocking domain trees</title>
<title>Hosts files</title>
<script type="text/javascript">
function findLang(){
let href = location.href;
@ -40,7 +40,7 @@
<br />
<div class="container">
<h1 class="title">Blocking domain trees
<h1 class="title">Hosts files
<br>
<span class="subtitle"></span>
</h1>
@ -49,14 +49,17 @@
<li><a href="../tags/adblock">adblock</a> </li>
</ul>
<p><a href="file:///data/data/info.torapp.uweb/files/default.hosts">hosts</a> blocks whole domain trees including all descedant domains. The domains in the hosts file must be 2 or 3 segment domains, such as &quot;yahoo.com&quot; and &quot;finance.yahoo.com&quot;. If the length of the last 2 segments is less than 7, such as &quot;com.pl&quot;, then it is treated as one segment, so domains like &quot;xxx.xxx.com.pl&quot; are also valid in the hosts file.</p>
<p>The hosts files &quot;hosts&quot; and &quot;default.hosts&quot; take effect when the setting option &quot;using hosts&quot; is checked.</p>
<p>The file <a href="file:///data/data/info.torapp.uweb/files/hosts">&quot;hosts&quot;</a> defines IP addresses for domains. Each line has the following format:<br>
[IP address][single space][domain name]</p>
<p><a href="file:///data/data/info.torapp.uweb/files/default.hosts">&quot;default.hosts&quot;</a> blocks whole domain trees including all descedant domains. The domains in the hosts file must be 2 or 3 segment domains, such as &quot;yahoo.com&quot; and &quot;finance.yahoo.com&quot;. If the length of the last 2 segments is less than 7, such as &quot;com.pl&quot;, then it is treated as one segment, so domains like &quot;xxx.xxx.com.pl&quot; are also valid in the hosts file.</p>
<p>Each line of the hosts file has the following format:<br>
[rootDomain][space][regex for domain prefix before rootDomain][space][regex for the whole url without &quot;http(s)://&quot;]<br>
The first part [rootDomain] is required and the others are optional. regex is java-grammar regular expression. If the second regex is used, it is recommended to merge the first regex to the second one for performance.</p>
</div>
<p>Last Modified: 24 September 2022<br>
fix typos from torinfo.uweb to torapp.uweb<br>
<p>Last Modified: 20 March 2023<br>
supports hosts<br>
<pre></pre>
</p>

@ -76,7 +76,7 @@
</div>
<p>Last Modified: 20 March 2023<br>
add revision history<br>
supports hosts<br>
<pre></pre>
</p>

@ -102,7 +102,7 @@
</div>
<p>Last Modified: 20 March 2023<br>
refine markdeep.html<br>
supports hosts<br>
<pre></pre>
</p>

@ -223,7 +223,7 @@
<li class="post">
<a href="adblock_domain/index.html">
<span>Blocking domain trees</span>
<span>Hosts files</span>
</a>
</li>

@ -452,13 +452,15 @@ newbing/chatgpt for censored area Powerful: any native functionality with html5
</item>
<item>
<title>Blocking domain trees</title>
<title>Hosts files</title>
<link>/en/adblock_domain/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>/en/adblock_domain/</guid>
<description>hosts blocks whole domain trees including all descedant domains. The domains in the hosts file must be 2 or 3 segment domains, such as &amp;quot;yahoo.com&amp;quot; and &amp;quot;finance.yahoo.com&amp;quot;. If the length of the last 2 segments is less than 7, such as &amp;quot;com.pl&amp;quot;, then it is treated as one segment, so domains like &amp;quot;xxx.xxx.com.pl&amp;quot; are also valid in the hosts file.
Each line of the hosts file has the following format:</description>
<description>The hosts files &amp;quot;hosts&amp;quot; and &amp;quot;default.hosts&amp;quot; take effect when the setting option &amp;quot;using hosts&amp;quot; is checked.
The file &amp;quot;hosts&amp;quot; defines IP addresses for domains. Each line has the following format:
[IP address][single space][domain name]
&amp;quot;default.hosts&amp;quot; blocks whole domain trees including all descedant domains. The domains in the hosts file must be 2 or 3 segment domains, such as &amp;quot;yahoo.com&amp;quot; and &amp;quot;finance.yahoo.com&amp;quot;. If the length of the last 2 segments is less than 7, such as &amp;quot;com.</description>
</item>
</channel>

@ -297,7 +297,7 @@ use &quot;i:0mi:92Host;209.216.230.240::https://news.ycombinator.com&quot; to vi
</div>
<p>Last Modified: 20 March 2023<br>
add revision history<br>
supports hosts<br>
<pre>Add &#39;clear cookie
enhance i:0m
</pre>

@ -29,7 +29,7 @@
/>
</url><url>
<loc>/en/</loc>
<lastmod>2023-03-20T11:56:16+08:00</lastmod>
<lastmod>2023-03-20T22:29:46+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
@ -42,7 +42,7 @@
/>
</url><url>
<loc>/en/_posts/</loc>
<lastmod>2023-03-20T11:54:34+08:00</lastmod>
<lastmod>2023-03-20T22:29:46+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
@ -94,7 +94,7 @@
/>
</url><url>
<loc>/en/tags/</loc>
<lastmod>2023-03-04T09:42:31+08:00</lastmod>
<lastmod>2023-03-20T22:29:46+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
@ -505,31 +505,31 @@
/>
</url><url>
<loc>/en/tags/adblock/</loc>
<lastmod>2022-09-24T14:05:13+08:00</lastmod>
<lastmod>2023-03-20T22:29:46+08:00</lastmod>
</url><url>
<loc>/en/adblock_domain/</loc>
<lastmod>2022-09-24T14:05:13+08:00</lastmod>
<loc>/en/categories/</loc>
<xhtml:link
rel="alternate"
hreflang="zh"
href="/zh/adblock_domain/"
href="/zh/categories/"
/>
<xhtml:link
rel="alternate"
hreflang="en"
href="/en/adblock_domain/"
href="/en/categories/"
/>
</url><url>
<loc>/en/categories/</loc>
<loc>/en/adblock_domain/</loc>
<lastmod>2023-03-20T22:29:46+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
href="/zh/categories/"
href="/zh/adblock_domain/"
/>
<xhtml:link
rel="alternate"
hreflang="en"
href="/en/categories/"
href="/en/adblock_domain/"
/>
</url><url>
<loc>/en/unlist/</loc>

@ -41,7 +41,7 @@
<li class="post">
<a href="../../adblock_domain">
<span>Blocking domain trees</span>
<span>Hosts files</span>
</a>
</li>

@ -6,13 +6,15 @@
<description>Recent content in adblock on uweb browser: unlimited power</description>
<generator>Hugo -- gohugo.io</generator><atom:link href="/en/tags/adblock/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Blocking domain trees</title>
<title>Hosts files</title>
<link>/en/adblock_domain/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>/en/adblock_domain/</guid>
<description>hosts blocks whole domain trees including all descedant domains. The domains in the hosts file must be 2 or 3 segment domains, such as &amp;quot;yahoo.com&amp;quot; and &amp;quot;finance.yahoo.com&amp;quot;. If the length of the last 2 segments is less than 7, such as &amp;quot;com.pl&amp;quot;, then it is treated as one segment, so domains like &amp;quot;xxx.xxx.com.pl&amp;quot; are also valid in the hosts file.
Each line of the hosts file has the following format:</description>
<description>The hosts files &amp;quot;hosts&amp;quot; and &amp;quot;default.hosts&amp;quot; take effect when the setting option &amp;quot;using hosts&amp;quot; is checked.
The file &amp;quot;hosts&amp;quot; defines IP addresses for domains. Each line has the following format:
[IP address][single space][domain name]
&amp;quot;default.hosts&amp;quot; blocks whole domain trees including all descedant domains. The domains in the hosts file must be 2 or 3 segment domains, such as &amp;quot;yahoo.com&amp;quot; and &amp;quot;finance.yahoo.com&amp;quot;. If the length of the last 2 segments is less than 7, such as &amp;quot;com.</description>
</item>
</channel>

@ -4,7 +4,7 @@
<sitemap>
<loc>en/sitemap.xml</loc>
<lastmod>2023-03-20T11:56:16+08:00</lastmod>
<lastmod>2023-03-20T22:29:46+08:00</lastmod>
</sitemap>

@ -250,7 +250,7 @@ use &quot;i:0mi:92Host;209.216.230.240::https://news.ycombinator.com&quot; to vi
</div>
<p>Last Modified: 20 March 2023<br>
use relative path<br>
supports hosts<br>
<pre></pre>
</p>

Loading…
Cancel
Save