add global redirect url support

This commit is contained in:
James Feng Cao 2023-04-12 08:07:52 +08:00
parent 96b13242b5
commit e35f094c97
11 changed files with 120 additions and 123 deletions

View file

@ -5,7 +5,20 @@
<link>/en/_posts/</link>
<description>Recent content in _posts on uweb browser: unlimited power</description>
<generator>Hugo -- gohugo.io</generator>
<lastBuildDate>Sat, 01 Apr 2023 00:00:00 +0000</lastBuildDate><atom:link href="/en/_posts/index.xml" rel="self" type="application/rss+xml" />
<lastBuildDate>Tue, 11 Apr 2023 00:00:00 +0000</lastBuildDate><atom:link href="/en/_posts/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Resource redirection</title>
<link>/en/redirect/</link>
<pubDate>Tue, 11 Apr 2023 00:00:00 +0000</pubDate>
<guid>/en/redirect/</guid>
<description>Global redirection Global redirection is enabled with the setting option &amp;quot;Resource redirection&amp;quot;.
When a valid global redirection url is set, the &amp;quot;default.redirect&amp;quot; has no effect, and any url resource is fetched with the new url by appending the original url to the global redirection url.
&amp;quot;default.redirect&amp;quot; (valid only without global redirection url) Click the following links to append mirrors to the file &amp;quot;default.redirect&amp;quot;:
google recaptcha mirror
Each line of the file &amp;quot;default.</description>
</item>
<item>
<title>Offline resources</title>
<link>/en/offlinecache/</link>
@ -194,22 +207,6 @@ Toggle all checkboxes in forms
Enable selection</description>
</item>
<item>
<title>Resource redirection</title>
<link>/en/redirect/</link>
<pubDate>Mon, 25 Apr 2022 00:00:00 +0000</pubDate>
<guid>/en/redirect/</guid>
<description>Click the following links to append mirrors to the file &amp;quot;default.redirect&amp;quot;:
github mirror:fastgit
github mirror 2
google recaptcha mirror
Each line of the file &amp;quot;default.redirect&amp;quot; has the following format:
[domain name]:[regular expression]:[replacement expression]
in which &amp;quot;[regular expression]&amp;quot; is as defined by java language, and cannot have &amp;quot;:&amp;quot; inside; if empty, it defaults to be same as &amp;quot;[domain name]&amp;quot;.
Ways to enable redirection: Long the image button。 Long pressing the setting button, enable the option &amp;quot;url redirection&amp;quot;.</description>
</item>
<item>
<title>Text selection</title>
<link>/en/pccopy/</link>

View file

@ -51,8 +51,8 @@
<p><a href="https://releases.pagure.org/uweb/">pagure</a></p>
<h4 id="main-featuresreadmeindexhtml"><a href="../readme/index.html">Main features</a></h4>
<h4 id="change-logs">Change logs</h4>
<p>988: <a href="../adblock_domain/index.html">hosts</a> file to support response headers.<br>
987: enhance <a href="../adblock_domain/index.html">hosts</a> file to support domain attributes, such as lifting limitations with empty ip address.<br>
<p>991: <a href="../redirect/index.html">global url redirection</a> support.<br>
988: <a href="../adblock_domain/index.html">hosts</a> file to support response headers.<br>
985: <a href="../links/index.html">Special urls</a> to support shortcut keys such as ctrl-a to ctrl-z.<br>
983: support <a href="../adblock_domain/index.html">&quot;hosts&quot;</a> file domain name resolving (no root needed), only single space allowed as separator for ip address and domain name.<br>
975: <a href="../bookmark/index.html">Bookmarks</a> to support styling for markdown etc.<br>
@ -78,8 +78,8 @@
</ul>
</div>
<p>Last Modified: 3 April 2023<br>
bingAI to support cors with cookies<br>
<p>Last Modified: 12 April 2023<br>
global redirection support in config.js<br>
<pre></pre>
</p>

View file

@ -95,6 +95,12 @@
</li>
<li class="post">
<a href="redirect/index.html">
<span>Resource redirection</span>
</a>
</li>
<li class="post">
<a href="offlinecache/index.html">
<span>Offline resources</span>
@ -167,12 +173,6 @@
</a>
</li>
<li class="post">
<a href="redirect/index.html">
<span>Resource redirection</span>
</a>
</li>
<li class="post">
<a href="pccopy/index.html">
<span>Text selection</span>

View file

@ -5,7 +5,20 @@
<link>/en/</link>
<description>Recent content on uweb browser: unlimited power</description>
<generator>Hugo -- gohugo.io</generator>
<lastBuildDate>Sat, 01 Apr 2023 00:00:00 +0000</lastBuildDate><atom:link href="/en/index.xml" rel="self" type="application/rss+xml" />
<lastBuildDate>Tue, 11 Apr 2023 00:00:00 +0000</lastBuildDate><atom:link href="/en/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Resource redirection</title>
<link>/en/redirect/</link>
<pubDate>Tue, 11 Apr 2023 00:00:00 +0000</pubDate>
<guid>/en/redirect/</guid>
<description>Global redirection Global redirection is enabled with the setting option &amp;quot;Resource redirection&amp;quot;.
When a valid global redirection url is set, the &amp;quot;default.redirect&amp;quot; has no effect, and any url resource is fetched with the new url by appending the original url to the global redirection url.
&amp;quot;default.redirect&amp;quot; (valid only without global redirection url) Click the following links to append mirrors to the file &amp;quot;default.redirect&amp;quot;:
google recaptcha mirror
Each line of the file &amp;quot;default.</description>
</item>
<item>
<title>Offline resources</title>
<link>/en/offlinecache/</link>
@ -196,10 +209,12 @@ github
sourceforge
powerfolder
pagure
Main features Change logs 988: hosts file to support response headers.
987: enhance hosts file to support domain attributes, such as lifting limitations with empty ip address.
Main features Change logs 991: global url redirection support.
988: hosts file to support response headers.
985: Special urls to support shortcut keys such as ctrl-a to ctrl-z.
983: support &amp;quot;hosts&amp;quot; file domain name resolving (no root needed), only single space allowed as separator for ip address and domain name.</description>
983: support &amp;quot;hosts&amp;quot; file domain name resolving (no root needed), only single space allowed as separator for ip address and domain name.
975: Bookmarks to support styling for markdown etc.
971: multiple type profiles: switch any data including website logins, user configurations orthogonally.</description>
</item>
<item>
@ -334,22 +349,6 @@ Performance
Remote javascript is defined in default.rjs. Click the following link to install. (Force exit and re-launch the app, then long press the &amp;quot;search&amp;quot; button to popup the menu.</description>
</item>
<item>
<title>Resource redirection</title>
<link>/en/redirect/</link>
<pubDate>Mon, 25 Apr 2022 00:00:00 +0000</pubDate>
<guid>/en/redirect/</guid>
<description>Click the following links to append mirrors to the file &amp;quot;default.redirect&amp;quot;:
github mirror:fastgit
github mirror 2
google recaptcha mirror
Each line of the file &amp;quot;default.redirect&amp;quot; has the following format:
[domain name]:[regular expression]:[replacement expression]
in which &amp;quot;[regular expression]&amp;quot; is as defined by java language, and cannot have &amp;quot;:&amp;quot; inside; if empty, it defaults to be same as &amp;quot;[domain name]&amp;quot;.
Ways to enable redirection: Long the image button。 Long pressing the setting button, enable the option &amp;quot;url redirection&amp;quot;.</description>
</item>
<item>
<title>Text selection</title>
<link>/en/pccopy/</link>

View file

@ -49,14 +49,16 @@
<li><a href="../tags/redirection">redirection</a> </li>
</ul>
<p>Click the following links to append mirrors to the file &quot;default.redirect&quot;:<br>
<a href="i:0gdefault.redirect::github.com::hub.fastgit.xyz%0A">github mirror:fastgit</a><br>
<a href="i:0gdefault.redirect::github.com::hub.0z.gs%0A">github mirror 2</a></p>
<p><a target="_self" href="i:0gdefault.redirect:../../zh/searchurl/txt/redirect.cfg">google recaptcha mirror</a></p>
<h4 id="global-redirection">Global redirection</h4>
<p><a href="i:60/data/data/info.torapp.uweb/files/config.html:https://jamesfengcao.codeberg.page/en/searchurl/config.html">Global redirection</a> is enabled with the setting option &quot;Resource redirection&quot;.</p>
<p>When a valid global redirection url is set, the &quot;default.redirect&quot; has no effect, and any url resource is fetched with the new url by appending the original url to the global redirection url.</p>
<h4 id="defaultredirect-valid-only-without-global-redirection-url">&quot;default.redirect&quot; (valid only without global redirection url)</h4>
<p>Click the following links to append mirrors to the file &quot;default.redirect&quot;:<br>
<a target="_self" href="i:0gdefault.redirect:../../zh/searchurl/txt/redirect.cfg">google recaptcha mirror</a></p>
<p>Each line of the file &quot;default.redirect&quot; has the following format:<br>
[domain name]:[regular expression]:[replacement expression]</p>
<p>in which &quot;[regular expression]&quot; is as defined by java language, and cannot have &quot;:&quot; inside; if empty, it defaults to be same as &quot;[domain name]&quot;.</p>
<h4 id="ways-to-enable-redirection">Ways to enable redirection:</h4>
<h5 id="ways-to-enable-domain-redirection">Ways to enable domain redirection:</h5>
<ul>
<li><a href="../urls/index.html">Long the image button</a></li>
<li>Long pressing the setting button, enable the option &quot;url redirection&quot;.</li>
@ -64,8 +66,8 @@
</ul>
</div>
<p>Last Modified: 20 February 2023<br>
use relative path<br>
<p>Last Modified: 12 April 2023<br>
global redirection support in config.js<br>
<pre></pre>
</p>

View file

@ -1,4 +1,4 @@
let labels = ["Redirect url","Default font","Cursive","Fantasy","Fixed","Sans-Serif","Serif"];
let labels = ["Global redirect url","Default font","Cursive","Fantasy","Fixed","Sans-Serif","Serif"];
let names = ["redirecturl","font","cursive","fantasy","fixed","sansserif","serif"];
let d=document;

View file

@ -3,7 +3,7 @@
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>/en/_posts/</loc>
<lastmod>2023-04-10T08:20:10+08:00</lastmod>
<lastmod>2023-04-12T08:05:59+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
@ -14,6 +14,48 @@
hreflang="en"
href="/en/_posts/"
/>
</url><url>
<loc>/en/tags/redirection/</loc>
<lastmod>2023-04-12T08:05:59+08:00</lastmod>
</url><url>
<loc>/en/redirect/</loc>
<lastmod>2023-04-12T08:05:59+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
href="/zh/redirect/"
/>
<xhtml:link
rel="alternate"
hreflang="en"
href="/en/redirect/"
/>
</url><url>
<loc>/en/tags/</loc>
<lastmod>2023-04-12T08:05:59+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
href="/zh/tags/"
/>
<xhtml:link
rel="alternate"
hreflang="en"
href="/en/tags/"
/>
</url><url>
<loc>/en/</loc>
<lastmod>2023-04-12T08:05:59+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
href="/zh/"
/>
<xhtml:link
rel="alternate"
hreflang="en"
href="/en/"
/>
</url><url>
<loc>/en/offlinecache/</loc>
<lastmod>2023-04-01T21:06:06+08:00</lastmod>
@ -27,19 +69,6 @@
hreflang="en"
href="/en/offlinecache/"
/>
</url><url>
<loc>/en/</loc>
<lastmod>2023-04-10T08:20:10+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
href="/zh/"
/>
<xhtml:link
rel="alternate"
hreflang="en"
href="/en/"
/>
</url><url>
<loc>/en/links/</loc>
<lastmod>2023-04-10T08:20:10+08:00</lastmod>
@ -69,19 +98,6 @@
hreflang="en"
href="/en/adblock_domain/"
/>
</url><url>
<loc>/en/tags/</loc>
<lastmod>2023-04-08T17:53:21+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
href="/zh/tags/"
/>
<xhtml:link
rel="alternate"
hreflang="en"
href="/en/tags/"
/>
</url><url>
<loc>/en/search/</loc>
<lastmod>2023-03-20T22:39:44+08:00</lastmod>
@ -97,7 +113,7 @@
/>
</url><url>
<loc>/en/topposts/</loc>
<lastmod>2023-04-03T17:49:38+08:00</lastmod>
<lastmod>2023-04-12T07:51:47+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
@ -194,7 +210,7 @@
/>
</url><url>
<loc>/en/changelog/</loc>
<lastmod>2023-04-03T17:49:38+08:00</lastmod>
<lastmod>2023-04-12T07:51:47+08:00</lastmod>
</url><url>
<loc>/en/sitemap/</loc>
<lastmod>2023-02-01T09:52:11+08:00</lastmod>
@ -286,22 +302,6 @@
hreflang="en"
href="/en/rjs/"
/>
</url><url>
<loc>/en/tags/redirection/</loc>
<lastmod>2023-02-20T21:49:51+08:00</lastmod>
</url><url>
<loc>/en/redirect/</loc>
<lastmod>2023-02-20T21:49:51+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="zh"
href="/zh/redirect/"
/>
<xhtml:link
rel="alternate"
hreflang="en"
href="/en/redirect/"
/>
</url><url>
<loc>/en/tags/clipboard/</loc>
<lastmod>2023-02-20T21:46:50+08:00</lastmod>

View file

@ -5,7 +5,16 @@
<link>/en/tags/</link>
<description>Recent content in Tags on uweb browser: unlimited power</description>
<generator>Hugo -- gohugo.io</generator>
<lastBuildDate>Mon, 20 Mar 2023 00:00:00 +0000</lastBuildDate><atom:link href="/en/tags/index.xml" rel="self" type="application/rss+xml" />
<lastBuildDate>Tue, 11 Apr 2023 00:00:00 +0000</lastBuildDate><atom:link href="/en/tags/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>redirection</title>
<link>/en/tags/redirection/</link>
<pubDate>Tue, 11 Apr 2023 00:00:00 +0000</pubDate>
<guid>/en/tags/redirection/</guid>
<description></description>
</item>
<item>
<title>adblock</title>
<link>/en/tags/adblock/</link>
@ -33,15 +42,6 @@
<description></description>
</item>
<item>
<title>redirection</title>
<link>/en/tags/redirection/</link>
<pubDate>Mon, 25 Apr 2022 00:00:00 +0000</pubDate>
<guid>/en/tags/redirection/</guid>
<description></description>
</item>
<item>
<title>clipboard</title>
<link>/en/tags/clipboard/</link>

View file

@ -5,21 +5,18 @@
<link>/en/tags/redirection/</link>
<description>Recent content in redirection on uweb browser: unlimited power</description>
<generator>Hugo -- gohugo.io</generator>
<lastBuildDate>Mon, 25 Apr 2022 00:00:00 +0000</lastBuildDate><atom:link href="/en/tags/redirection/index.xml" rel="self" type="application/rss+xml" />
<lastBuildDate>Tue, 11 Apr 2023 00:00:00 +0000</lastBuildDate><atom:link href="/en/tags/redirection/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Resource redirection</title>
<link>/en/redirect/</link>
<pubDate>Mon, 25 Apr 2022 00:00:00 +0000</pubDate>
<pubDate>Tue, 11 Apr 2023 00:00:00 +0000</pubDate>
<guid>/en/redirect/</guid>
<description>Click the following links to append mirrors to the file &amp;quot;default.redirect&amp;quot;:
github mirror:fastgit
github mirror 2
<description>Global redirection Global redirection is enabled with the setting option &amp;quot;Resource redirection&amp;quot;.
When a valid global redirection url is set, the &amp;quot;default.redirect&amp;quot; has no effect, and any url resource is fetched with the new url by appending the original url to the global redirection url.
&amp;quot;default.redirect&amp;quot; (valid only without global redirection url) Click the following links to append mirrors to the file &amp;quot;default.redirect&amp;quot;:
google recaptcha mirror
Each line of the file &amp;quot;default.redirect&amp;quot; has the following format:
[domain name]:[regular expression]:[replacement expression]
in which &amp;quot;[regular expression]&amp;quot; is as defined by java language, and cannot have &amp;quot;:&amp;quot; inside; if empty, it defaults to be same as &amp;quot;[domain name]&amp;quot;.
Ways to enable redirection: Long the image button。 Long pressing the setting button, enable the option &amp;quot;url redirection&amp;quot;.</description>
Each line of the file &amp;quot;default.</description>
</item>
</channel>

View file

@ -64,10 +64,12 @@ github
sourceforge
powerfolder
pagure
Main features Change logs 988: hosts file to support response headers.
987: enhance hosts file to support domain attributes, such as lifting limitations with empty ip address.
Main features Change logs 991: global url redirection support.
988: hosts file to support response headers.
985: Special urls to support shortcut keys such as ctrl-a to ctrl-z.
983: support &amp;quot;hosts&amp;quot; file domain name resolving (no root needed), only single space allowed as separator for ip address and domain name.</description>
983: support &amp;quot;hosts&amp;quot; file domain name resolving (no root needed), only single space allowed as separator for ip address and domain name.
975: Bookmarks to support styling for markdown etc.
971: multiple type profiles: switch any data including website logins, user configurations orthogonally.</description>
</item>
<item>

View file

@ -4,7 +4,7 @@
<sitemap>
<loc>en/sitemap.xml</loc>
<lastmod>2023-04-10T08:20:10+08:00</lastmod>
<lastmod>2023-04-12T08:05:59+08:00</lastmod>
</sitemap>