mirror of
https://github.com/torappinfo/uweb.git
synced 2024-08-14 23:54:59 +00:00
hosts to support both ip address and response headers
This commit is contained in:
parent
e8b5f412f0
commit
95c5410f00
6 changed files with 26 additions and 22 deletions
|
@ -48,8 +48,8 @@ Long pressing the bookmark button in uweb browser will popup menus defined in fi
|
||||||
<guid>/en/adblock_domain/</guid>
|
<guid>/en/adblock_domain/</guid>
|
||||||
<description>The enhanced hosts files &quot;hosts&quot; and &quot;default.hosts&quot; take effect when the setting option &quot;using hosts&quot; is checked.
|
<description>The enhanced hosts files &quot;hosts&quot; and &quot;default.hosts&quot; take effect when the setting option &quot;using hosts&quot; is checked.
|
||||||
The enhanced file &quot;hosts&quot; defines IP addresses/attributes for domains. Each line has the following format:
|
The enhanced file &quot;hosts&quot; defines IP addresses/attributes for domains. Each line has the following format:
|
||||||
[IP address/attributes][single space][domain name]
|
[[IP address][attributes]][single space][domain name]
|
||||||
where &quot;[IP address/attributes]&quot; could be:
|
where &quot;[[IP address][attributes]]&quot; could be:
|
||||||
ipv4 address such as:
|
ipv4 address such as:
|
||||||
172.67.157.211 torapp.eu.org
|
172.67.157.211 torapp.eu.org
|
||||||
ipv6 address, Ex.:
|
ipv6 address, Ex.:
|
||||||
|
|
|
@ -51,8 +51,8 @@
|
||||||
</ul>
|
</ul>
|
||||||
<p>The enhanced hosts files "hosts" and "default.hosts" take effect when the setting option "using hosts" is checked.</p>
|
<p>The enhanced hosts files "hosts" and "default.hosts" take effect when the setting option "using hosts" is checked.</p>
|
||||||
<p>The <span style="color:red">enhanced</span> file <a href="file:///data/data/info.torapp.uweb/files/hosts">"hosts"</a> defines IP addresses/attributes for domains. Each line has the following format:<br>
|
<p>The <span style="color:red">enhanced</span> file <a href="file:///data/data/info.torapp.uweb/files/hosts">"hosts"</a> defines IP addresses/attributes for domains. Each line has the following format:<br>
|
||||||
[IP address/attributes][single space][domain name]</p>
|
[[IP address][attributes]][single space][domain name]</p>
|
||||||
<p>where "[IP address/attributes]" could be:</p>
|
<p>where "[[IP address][attributes]]" could be:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<p>ipv4 address such as:<br>
|
<p>ipv4 address such as:<br>
|
||||||
|
@ -65,22 +65,26 @@
|
||||||
<li>
|
<li>
|
||||||
<p>empty, that would lift all server-imposed limitations. Ex.:<br>
|
<p>empty, that would lift all server-imposed limitations. Ex.:<br>
|
||||||
[single space]gitee.com</p>
|
[single space]gitee.com</p>
|
||||||
|
<p>which will make all git repositories on the domain visitable as websites with raw file access url.</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>response headers, separeded by ';', Ex.:<br>
|
||||||
|
Access-Control-Allow-Origin;*;Access-Control-Allow-Credentials;true mybing2.xn--xyza.top</p>
|
||||||
|
<p>which makes "mybing2.xn--xyza.top" to accept CORS requests with cookies.</p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<p>IP address and response headers, separeded by ';', Ex.:<br>
|
||||||
|
172.64.80.1;Access-Control-Allow-Origin;https://www.bing.com;Access-Control-Allow-Credentials;true wild-cake-ff77.jamesfengcao.workers.dev</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>which will make all git repositories on the domain visitable as websites with raw file access url.</p>
|
|
||||||
<ul>
|
|
||||||
<li>response headers, separeded by ';', Ex.:<br>
|
|
||||||
Access-Control-Allow-Origin;*;Access-Control-Allow-Credentials;true mybing2.xn--xyza.top</li>
|
|
||||||
</ul>
|
|
||||||
<p>which makes "mybing2.xn--xyza.top" to accept CORS requests with cookies.</p>
|
|
||||||
<p><a href="file:///data/data/info.torapp.uweb/files/default.hosts">"default.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 "yahoo.com" and "finance.yahoo.com". If the length of the last 2 segments is less than 7, such as "com.pl", then it is treated as one segment, so domains like "xxx.xxx.com.pl" are also valid in the hosts file.</p>
|
<p><a href="file:///data/data/info.torapp.uweb/files/default.hosts">"default.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 "yahoo.com" and "finance.yahoo.com". If the length of the last 2 segments is less than 7, such as "com.pl", then it is treated as one segment, so domains like "xxx.xxx.com.pl" are also valid in the hosts file.</p>
|
||||||
<p>Each line of the hosts file has the following format:<br>
|
<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 "http(s)://"]<br>
|
[rootDomain][space][regex for domain prefix before rootDomain][space][regex for the whole url without "http(s)://"]<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>
|
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>
|
</div>
|
||||||
<p>Last Modified: 3 April 2023<br>
|
<p>Last Modified: 7 April 2023<br>
|
||||||
bingAI to support cors with cookies<br>
|
hosts to support both ip address and response headers<br>
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
|
@ -48,8 +48,8 @@ Long pressing the bookmark button in uweb browser will popup menus defined in fi
|
||||||
<guid>/en/adblock_domain/</guid>
|
<guid>/en/adblock_domain/</guid>
|
||||||
<description>The enhanced hosts files &quot;hosts&quot; and &quot;default.hosts&quot; take effect when the setting option &quot;using hosts&quot; is checked.
|
<description>The enhanced hosts files &quot;hosts&quot; and &quot;default.hosts&quot; take effect when the setting option &quot;using hosts&quot; is checked.
|
||||||
The enhanced file &quot;hosts&quot; defines IP addresses/attributes for domains. Each line has the following format:
|
The enhanced file &quot;hosts&quot; defines IP addresses/attributes for domains. Each line has the following format:
|
||||||
[IP address/attributes][single space][domain name]
|
[[IP address][attributes]][single space][domain name]
|
||||||
where &quot;[IP address/attributes]&quot; could be:
|
where &quot;[[IP address][attributes]]&quot; could be:
|
||||||
ipv4 address such as:
|
ipv4 address such as:
|
||||||
172.67.157.211 torapp.eu.org
|
172.67.157.211 torapp.eu.org
|
||||||
ipv6 address, Ex.:
|
ipv6 address, Ex.:
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||||
<url>
|
<url>
|
||||||
<loc>/en/_posts/</loc>
|
<loc>/en/_posts/</loc>
|
||||||
<lastmod>2023-04-03T17:48:42+08:00</lastmod>
|
<lastmod>2023-04-07T15:29:47+08:00</lastmod>
|
||||||
<xhtml:link
|
<xhtml:link
|
||||||
rel="alternate"
|
rel="alternate"
|
||||||
hreflang="zh"
|
hreflang="zh"
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
/>
|
/>
|
||||||
</url><url>
|
</url><url>
|
||||||
<loc>/en/</loc>
|
<loc>/en/</loc>
|
||||||
<lastmod>2023-04-03T17:49:38+08:00</lastmod>
|
<lastmod>2023-04-07T15:29:47+08:00</lastmod>
|
||||||
<xhtml:link
|
<xhtml:link
|
||||||
rel="alternate"
|
rel="alternate"
|
||||||
hreflang="zh"
|
hreflang="zh"
|
||||||
|
@ -55,10 +55,10 @@
|
||||||
/>
|
/>
|
||||||
</url><url>
|
</url><url>
|
||||||
<loc>/en/tags/adblock/</loc>
|
<loc>/en/tags/adblock/</loc>
|
||||||
<lastmod>2023-04-03T17:48:42+08:00</lastmod>
|
<lastmod>2023-04-07T15:29:47+08:00</lastmod>
|
||||||
</url><url>
|
</url><url>
|
||||||
<loc>/en/adblock_domain/</loc>
|
<loc>/en/adblock_domain/</loc>
|
||||||
<lastmod>2023-04-03T17:48:42+08:00</lastmod>
|
<lastmod>2023-04-07T15:29:47+08:00</lastmod>
|
||||||
<xhtml:link
|
<xhtml:link
|
||||||
rel="alternate"
|
rel="alternate"
|
||||||
hreflang="zh"
|
hreflang="zh"
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
/>
|
/>
|
||||||
</url><url>
|
</url><url>
|
||||||
<loc>/en/tags/</loc>
|
<loc>/en/tags/</loc>
|
||||||
<lastmod>2023-04-03T17:48:42+08:00</lastmod>
|
<lastmod>2023-04-07T15:29:47+08:00</lastmod>
|
||||||
<xhtml:link
|
<xhtml:link
|
||||||
rel="alternate"
|
rel="alternate"
|
||||||
hreflang="zh"
|
hreflang="zh"
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
<guid>/en/adblock_domain/</guid>
|
<guid>/en/adblock_domain/</guid>
|
||||||
<description>The enhanced hosts files &quot;hosts&quot; and &quot;default.hosts&quot; take effect when the setting option &quot;using hosts&quot; is checked.
|
<description>The enhanced hosts files &quot;hosts&quot; and &quot;default.hosts&quot; take effect when the setting option &quot;using hosts&quot; is checked.
|
||||||
The enhanced file &quot;hosts&quot; defines IP addresses/attributes for domains. Each line has the following format:
|
The enhanced file &quot;hosts&quot; defines IP addresses/attributes for domains. Each line has the following format:
|
||||||
[IP address/attributes][single space][domain name]
|
[[IP address][attributes]][single space][domain name]
|
||||||
where &quot;[IP address/attributes]&quot; could be:
|
where &quot;[[IP address][attributes]]&quot; could be:
|
||||||
ipv4 address such as:
|
ipv4 address such as:
|
||||||
172.67.157.211 torapp.eu.org
|
172.67.157.211 torapp.eu.org
|
||||||
ipv6 address, Ex.:
|
ipv6 address, Ex.:
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<sitemap>
|
<sitemap>
|
||||||
<loc>en/sitemap.xml</loc>
|
<loc>en/sitemap.xml</loc>
|
||||||
|
|
||||||
<lastmod>2023-04-03T17:49:38+08:00</lastmod>
|
<lastmod>2023-04-07T15:29:47+08:00</lastmod>
|
||||||
|
|
||||||
</sitemap>
|
</sitemap>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue