supports user defined extra http request headers

This commit is contained in:
James Feng Cao 2023-03-04 06:57:28 +08:00
parent b0147c8c85
commit 0d9d30d783
15 changed files with 62 additions and 35 deletions

View file

@ -21,11 +21,12 @@
<pubDate>Mon, 16 Jan 2023 00:00:00 +0000</pubDate>
<guid>/en/bookmark/</guid>
<description>Wait for url from other devices
<description>AI, chatgpt etc.
rebbe freegpt Wait for url from other devices
berify: reverse image search for video
Tips File handling and styling with home.css &amp;quot;home.css&amp;quot; (in current folder, parent folder or the &amp;quot;bookmark&amp;quot; folder) styles bookmarks, search engines and the folder itself. The file is in html format instead of CSS, so it needs &amp;quot;&amp;lt;style&amp;gt;&amp;quot; tag for CSS.
Install markdeep styling for markdown files
Bookmarks with secrets (POST instead of GET) The search engine (&amp;quot;.search&amp;quot;) file can be used as bookmarks with secret.</description>
Bookmarks with secrets (POST instead of GET) The search engine (&amp;quot;.</description>
</item>
<item>
@ -240,8 +241,9 @@ If a new button is defined (file name &amp;quot;20&amp;quot; exists), uweb also
[Engine name]:[url without &#39;%s&#39; inside]
[Engine name]:[url with &#39;%s&#39; as keyword]
[Engine name]:POST:[post params with &#39;%s&#39; as keyword]:[url]
Limitations (they are here for performance reasons):
The first engine in the file must be the first type that has no &#39;%s&#39; in the engine url. Internal scheme engine urls (such as i:, d:, c:) must have &#39;%s&#39;, since &#39;%s&#39; format is more general (only type 2 is allowed, since POST makes no sense for internal schemes).</description>
[Engine name]:[Extra request headers]:[post params with &#39;%s&#39; as keyword]:[url]
[Extra request headers] Ex. &amp;quot;X-Forwarded-For;8.8.8.8&amp;quot; Limitations (they are here for performance reasons):
The first engine in the file must be the first type that has no &#39;%s&#39; in the engine url.</description>
</item>
<item>

View file

@ -47,7 +47,12 @@
<ul class="tags">
</ul>
<p><a href="i:1w">Wait for url from other devices</a><br>
<p>AI, chatgpt etc.</p>
<ul>
<li><a href="https://rebbe.io">rebbe</a></li>
<li><a href="https://freegpt.one">freegpt</a></li>
</ul>
<p><a href="i:1w">Wait for url from other devices</a><br>
<a href="https://berify.com">berify: reverse image search for video</a></p>
<h3 id="tips">Tips</h3>
<h4 id="file-handling-and-styling-with-homecss">File handling and styling with home.css</h4>

View file

@ -21,11 +21,12 @@
<pubDate>Mon, 16 Jan 2023 00:00:00 +0000</pubDate>
<guid>/en/bookmark/</guid>
<description>Wait for url from other devices
<description>AI, chatgpt etc.
rebbe freegpt Wait for url from other devices
berify: reverse image search for video
Tips File handling and styling with home.css &amp;quot;home.css&amp;quot; (in current folder, parent folder or the &amp;quot;bookmark&amp;quot; folder) styles bookmarks, search engines and the folder itself. The file is in html format instead of CSS, so it needs &amp;quot;&amp;lt;style&amp;gt;&amp;quot; tag for CSS.
Install markdeep styling for markdown files
Bookmarks with secrets (POST instead of GET) The search engine (&amp;quot;.search&amp;quot;) file can be used as bookmarks with secret.</description>
Bookmarks with secrets (POST instead of GET) The search engine (&amp;quot;.</description>
</item>
<item>
@ -373,8 +374,9 @@ If a new button is defined (file name &amp;quot;20&amp;quot; exists), uweb also
[Engine name]:[url without &#39;%s&#39; inside]
[Engine name]:[url with &#39;%s&#39; as keyword]
[Engine name]:POST:[post params with &#39;%s&#39; as keyword]:[url]
Limitations (they are here for performance reasons):
The first engine in the file must be the first type that has no &#39;%s&#39; in the engine url. Internal scheme engine urls (such as i:, d:, c:) must have &#39;%s&#39;, since &#39;%s&#39; format is more general (only type 2 is allowed, since POST makes no sense for internal schemes).</description>
[Engine name]:[Extra request headers]:[post params with &#39;%s&#39; as keyword]:[url]
[Extra request headers] Ex. &amp;quot;X-Forwarded-For;8.8.8.8&amp;quot; Limitations (they are here for performance reasons):
The first engine in the file must be the first type that has no &#39;%s&#39; in the engine url.</description>
</item>
<item>

View file

@ -136,11 +136,12 @@ Ex. &quot;:p x&quot; or &quot;:px&quot; for screen width and infinite height (as
Extract remote content (tar/tgz/zip) under the folder [path]. If [path] ends with &quot;/&quot;, then put unzipped file under the folder &quot;[path]/[file name stem]&quot; (for zipped files only, not for tar/tgz).</p>
</li>
<li>
<p>i:0m[bookmarklet index|prefix|?postfix|/.../localfile|c[cssFlag]]:[url]<br>
<p>i:0m[bookmarklet index|prefix|?postfix|/.../localfile|H[headers]|c[cssFlag]]:[url]<br>
Visiting url and execute the uweb browser internal bookmarklet that keeps valid for all urls under the path of [url].</p>
<ul>
<li>[bookmarklet index] must have two/three digits. The first two digits are used as index of bootmarklet. For example, &quot;00&quot; as the first local bookmarklet; &quot;01&quot; as the first remote script; then &quot;02&quot; as the second local bookmarklet, ... The third digit is uplevel, 1 to make bookmarklet valid for parent path of [url].</li>
<li>c[cssFlag]: For example, &quot;c12&quot; will apply the third and fourth global CSS (12=2^2+2^3).</li>
<li>H[headers]: Ex. &quot;HX-Forwarded-For;8.8.8.8&quot; adds extra http request header &quot;X-Forwarded-For:8.8.8.8&quot;.</li>
<li>[?postfix]: the real visited url is &quot;[url]+[?postfix]&quot;.</li>
<li>[/.../localfile]: load the local html/js file that processes [url]. The first character of the local html file must be &quot;&lt;&quot;.</li>
<li>All other cases will be treated as [prefix], the real visited url is &quot;[prefix]+[url]&quot;.</li>

View file

@ -52,7 +52,11 @@
<p>Any &quot;.search&quot; file can be opened as search engine file, each line of which has one of the following formats:<br>
[Engine name]:[url without '%s' inside]<br>
[Engine name]:[url with '%s' as keyword]<br>
[Engine name]:POST:[post params with '%s' as keyword]:[url]</p>
[Engine name]:POST:[post params with '%s' as keyword]:[url]<br>
[Engine name]:[Extra request headers]:[post params with '%s' as keyword]:[url]</p>
<ul>
<li>[Extra request headers] Ex. &quot;X-Forwarded-For;8.8.8.8&quot;</li>
</ul>
<p>Limitations (they are here for performance reasons):</p>
<ul>
<li>The first engine in the file must be the first type that has no '%s' in the engine url.</li>

View file

@ -1,4 +1,3 @@
<style>a{color:inherit;text-decoration:inherit;}</style>
<script>
if(location.href.endsWith('/')){
window.onload=function (){

View file

@ -16,8 +16,9 @@
[Engine name]:[url without &#39;%s&#39; inside]
[Engine name]:[url with &#39;%s&#39; as keyword]
[Engine name]:POST:[post params with &#39;%s&#39; as keyword]:[url]
Limitations (they are here for performance reasons):
The first engine in the file must be the first type that has no &#39;%s&#39; in the engine url. Internal scheme engine urls (such as i:, d:, c:) must have &#39;%s&#39;, since &#39;%s&#39; format is more general (only type 2 is allowed, since POST makes no sense for internal schemes).</description>
[Engine name]:[Extra request headers]:[post params with &#39;%s&#39; as keyword]:[url]
[Extra request headers] Ex. &amp;quot;X-Forwarded-For;8.8.8.8&amp;quot; Limitations (they are here for performance reasons):
The first engine in the file must be the first type that has no &#39;%s&#39; in the engine url.</description>
</item>
</channel>