enhance hosts to add attributes for domains

This commit is contained in:
James Feng Cao 2023-04-03 08:22:41 +08:00
parent 23e9a9179d
commit ed7de221d0
7 changed files with 56 additions and 36 deletions

View File

@ -1,15 +1,15 @@
### 超微浏览器 (uweb browser): 微、威、快、高效、极致优化
<a href="README.md" onclick="{let u=location.href; if(u.endsWith('index.html'))location='../../en/readme/index.html'}">English</a>
<a href="zh/donate.md" onclick="{let u=location.href; if(u.endsWith('index.html'))location='../searchurl/donate.html'}">捐赠</a>
<a href="README.md" onclick="{let u=location.href; if(u.endsWith('index.html')){location='../../en/readme/index.html';return false;}}">English</a>
<a href="zh/donate.md" onclick="{let u=location.href; if(u.endsWith('index.html')){location='../searchurl/donate.html';return false;}}">捐赠</a>
[Amazon appstore](https://www.amazon.com/TorApp-Info-uweb-browser-for-geeks/dp/B098QPR6N5)
<a href="en/download.md" onclick="{let u=location.href; if(u.endsWith('index.html'))location='../../en/changelog/index.html'}">Downloads</a>
<a href="en/download.md" onclick="{let u=location.href; if(u.endsWith('index.html')){location='../../en/changelog/index.html';return false;}}">Downloads</a>
[超微浏览器下载及使用技巧](https://uwebzh.netlify.app/zh/)
(Mirrors: [gitlab](https://jamesfengcao.gitlab.io/uweb/zh/) [repo](https://repo.or.cz/uweb.git/blob_plain/HEAD:/zh/index.html) [codeberg](https://jamesfengcao.codeberg.page/zh/) [netlify](https://uwebzh.netlify.app/zh/) [stormkit](https://uweb.stormkit.dev/zh/) [surge](https://uweb.surge.sh/zh/) [github](https://torappinfo.github.io/uweb/zh/) [epizy](http://uweb.epizy.com/) [pages](https://uwebzh.pages.dev/zh/) [bitbucket](https://torappinfo.bitbucket.io/zh/) [vercel](https://uweb-zh.vercel.app/zh/))
(Mirrors: [gitlab](https://jamesfengcao.gitlab.io/uweb/zh/) [repo](https://repo.or.cz/uweb.git/blob_plain/HEAD:/zh/index.html) [codeberg](https://jamesfengcao.codeberg.page/zh/) [netlify](https://uwebzh.netlify.app/zh/) [stormkit](https://uweb.stormkit.dev/zh/) [surge](https://uweb.surge.sh/zh/) [github](https://torappinfo.github.io/uweb/zh/) [torapp](https://torapp.eu.org) [epizy](http://uweb.epizy.com/) [pages](https://muweb.pages.dev/zh/) [render](https://uweb.onrender.com) [bitbucket](https://torappinfo.bitbucket.io/zh/) [vercel](https://uweb.vercel.app/zh/))
- <span style="color:red">国内可以直接使用<a href="https://uwebzh.netlify.app/zh/tips/index.html" onclick="{let u=location.href; if(u.endsWith('index.html'))location='../tips/index.html'}">newbing/chatgpt</a></span>
- <span style="color:red">国内可以直接使用<a href="https://uwebzh.netlify.app/zh/tips/index.html" onclick="{let u=location.href; if(u.endsWith('index.html')){location='../tips/index.html';return false;}}">newbing/chatgpt</a></span>
- 微不到200K。
- 威支持使用js脚本、url服务、shell命令、内部功能链接定制菜单按钮手势; 远程数据皆可成网站。html5应用增强可匹配本地应用。
- 便捷图书pdf/djvu/txt/词典mdict,kiwix/命令行/APP/webapp(web extensions)可作为搜索引擎使用。

View File

@ -46,14 +46,17 @@ Long pressing the bookmark button in uweb browser will popup menus defined in fi
<pubDate>Mon, 20 Mar 2023 00:00:00 +0000</pubDate>
<guid>/en/adblock_domain/</guid>
<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]
Here is an example line with ipv4:
<description>The enhanced 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 enhanced file &amp;quot;hosts&amp;quot; defines IP addresses/attributes for domains. Each line has the following format:
[IP address/attributes][single space][domain name]
where &amp;quot;[IP address/attributes]&amp;quot; could be:
ipv4 address such as:
172.67.157.211 torapp.eu.org
or with ipv6:
ipv6 address, Ex.:
[2606:4700:3037::6815:8c3] torapp.eu.org
&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.</description>
empty, that would lift all server-imposed limitations. Ex.:
[single space]gitee.com
&amp;quot;default.hosts&amp;quot; blocks whole domain trees including all descedant domains.</description>
</item>
<item>

View File

@ -49,21 +49,32 @@
<li><a href="../tags/adblock">adblock</a> </li>
</ul>
<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>Here is an example line with ipv4:<br>
<p>The enhanced 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 <span style="color:red">enhanced</span> file <a href="file:///data/data/info.torapp.uweb/files/hosts">&quot;hosts&quot;</a> defines IP addresses/attributes for domains. Each line has the following format:<br>
[IP address/attributes][single space][domain name]</p>
<p>where &quot;[IP address/attributes]&quot; could be:</p>
<ul>
<li>
<p>ipv4 address such as:<br>
172.67.157.211 torapp.eu.org</p>
<p>or with ipv6:<br>
</li>
<li>
<p>ipv6 address, Ex.:<br>
[2606:4700:3037::6815:8c3] torapp.eu.org</p>
</li>
<li>
<p>empty, that would lift all server-imposed limitations. Ex.:<br>
[single space]gitee.com</p>
</li>
</ul>
<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: 1 April 2023<br>
use [ipv6] in hosts<br>
<p>Last Modified: 3 April 2023<br>
enhance hosts file to add attributes to domains<br>
<pre></pre>
</p>

View File

@ -46,14 +46,17 @@ Long pressing the bookmark button in uweb browser will popup menus defined in fi
<pubDate>Mon, 20 Mar 2023 00:00:00 +0000</pubDate>
<guid>/en/adblock_domain/</guid>
<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]
Here is an example line with ipv4:
<description>The enhanced 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 enhanced file &amp;quot;hosts&amp;quot; defines IP addresses/attributes for domains. Each line has the following format:
[IP address/attributes][single space][domain name]
where &amp;quot;[IP address/attributes]&amp;quot; could be:
ipv4 address such as:
172.67.157.211 torapp.eu.org
or with ipv6:
ipv6 address, Ex.:
[2606:4700:3037::6815:8c3] torapp.eu.org
&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.</description>
empty, that would lift all server-imposed limitations. Ex.:
[single space]gitee.com
&amp;quot;default.hosts&amp;quot; blocks whole domain trees including all descedant domains.</description>
</item>
<item>

View File

@ -3,7 +3,7 @@
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>/en/_posts/</loc>
<lastmod>2023-04-02T10:37:42+08:00</lastmod>
<lastmod>2023-04-03T08:21:31+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
@ -29,7 +29,7 @@
/>
</url><url>
<loc>/en/</loc>
<lastmod>2023-04-02T10:37:42+08:00</lastmod>
<lastmod>2023-04-03T08:21:31+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
@ -55,10 +55,10 @@
/>
</url><url>
<loc>/en/tags/adblock/</loc>
<lastmod>2023-04-01T15:05:21+08:00</lastmod>
<lastmod>2023-04-03T08:21:31+08:00</lastmod>
</url><url>
<loc>/en/adblock_domain/</loc>
<lastmod>2023-04-01T15:05:21+08:00</lastmod>
<lastmod>2023-04-03T08:21:31+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
@ -71,7 +71,7 @@
/>
</url><url>
<loc>/en/tags/</loc>
<lastmod>2023-04-01T15:05:21+08:00</lastmod>
<lastmod>2023-04-03T08:21:31+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"

View File

@ -12,14 +12,17 @@
<pubDate>Mon, 20 Mar 2023 00:00:00 +0000</pubDate>
<guid>/en/adblock_domain/</guid>
<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]
Here is an example line with ipv4:
<description>The enhanced 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 enhanced file &amp;quot;hosts&amp;quot; defines IP addresses/attributes for domains. Each line has the following format:
[IP address/attributes][single space][domain name]
where &amp;quot;[IP address/attributes]&amp;quot; could be:
ipv4 address such as:
172.67.157.211 torapp.eu.org
or with ipv6:
ipv6 address, Ex.:
[2606:4700:3037::6815:8c3] torapp.eu.org
&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.</description>
empty, that would lift all server-imposed limitations. Ex.:
[single space]gitee.com
&amp;quot;default.hosts&amp;quot; blocks whole domain trees including all descedant domains.</description>
</item>
</channel>

View File

@ -4,7 +4,7 @@
<sitemap>
<loc>en/sitemap.xml</loc>
<lastmod>2023-04-02T10:37:42+08:00</lastmod>
<lastmod>2023-04-03T08:21:31+08:00</lastmod>
</sitemap>