From 0d9d30d783d2fecb581c12dd772a5280d980c42a Mon Sep 17 00:00:00 2001
From: James Feng Cao
Date: Sat, 4 Mar 2023 06:57:28 +0800
Subject: [PATCH] supports user defined extra http request headers
---
en/_posts/index.xml | 10 ++++++----
en/bookmark/index.html | 7 ++++++-
en/index.xml | 10 ++++++----
en/links/index.html | 3 ++-
en/searchcat/index.html | 6 +++++-
en/searchurl/txt/markdeep.html | 1 -
en/tags/search-engine/index.xml | 5 +++--
index.html | 11 ++++++++++-
zh/_posts/index.xml | 1 +
zh/bookmark/index.html | 1 +
zh/cmds/index.html | 3 ++-
zh/index.xml | 15 ++++++++-------
zh/search/index.html | 6 +++---
zh/searchurl/uas.html | 4 ++--
zh/topposts/index.xml | 14 +++++++-------
15 files changed, 62 insertions(+), 35 deletions(-)
diff --git a/en/_posts/index.xml b/en/_posts/index.xml
index e38f3f29..56a1e4e5 100644
--- a/en/_posts/index.xml
+++ b/en/_posts/index.xml
@@ -21,11 +21,12 @@
Mon, 16 Jan 2023 00:00:00 +0000
/en/bookmark/
- Wait for url from other devices
+ 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 "home.css" (in current folder, parent folder or the "bookmark" folder) styles bookmarks, search engines and the folder itself. The file is in html format instead of CSS, so it needs "<style>" tag for CSS.
Install markdeep styling for markdown files
-Bookmarks with secrets (POST instead of GET) The search engine (".search") file can be used as bookmarks with secret.
+Bookmarks with secrets (POST instead of GET) The search engine (".
-
@@ -240,8 +241,9 @@ If a new button is defined (file name "20" exists), uweb also
[Engine name]:[url without '%s' inside]
[Engine name]:[url with '%s' as keyword]
[Engine name]:POST:[post params with '%s' as keyword]:[url]
-Limitations (they are here for performance reasons):
-The first engine in the file must be the first type that has no '%s' in the engine url. Internal scheme engine urls (such as i:, d:, c:) must have '%s', since '%s' format is more general (only type 2 is allowed, since POST makes no sense for internal schemes).
+[Engine name]:[Extra request headers]:[post params with '%s' as keyword]:[url]
+[Extra request headers] Ex. "X-Forwarded-For;8.8.8.8" Limitations (they are here for performance reasons):
+The first engine in the file must be the first type that has no '%s' in the engine url.
-
diff --git a/en/bookmark/index.html b/en/bookmark/index.html
index 52d8fa71..f97bafb4 100644
--- a/en/bookmark/index.html
+++ b/en/bookmark/index.html
@@ -47,7 +47,12 @@
-
Wait for url from other devices
+
AI, chatgpt etc.
+
+Wait for url from other devices
berify: reverse image search for video
Tips
File handling and styling with home.css
diff --git a/en/index.xml b/en/index.xml
index 3775c29e..9cc662a9 100644
--- a/en/index.xml
+++ b/en/index.xml
@@ -21,11 +21,12 @@
Mon, 16 Jan 2023 00:00:00 +0000
/en/bookmark/
- Wait for url from other devices
+ 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 "home.css" (in current folder, parent folder or the "bookmark" folder) styles bookmarks, search engines and the folder itself. The file is in html format instead of CSS, so it needs "<style>" tag for CSS.
Install markdeep styling for markdown files
-Bookmarks with secrets (POST instead of GET) The search engine (".search") file can be used as bookmarks with secret.
+Bookmarks with secrets (POST instead of GET) The search engine (".
-
@@ -373,8 +374,9 @@ If a new button is defined (file name "20" exists), uweb also
[Engine name]:[url without '%s' inside]
[Engine name]:[url with '%s' as keyword]
[Engine name]:POST:[post params with '%s' as keyword]:[url]
-Limitations (they are here for performance reasons):
-The first engine in the file must be the first type that has no '%s' in the engine url. Internal scheme engine urls (such as i:, d:, c:) must have '%s', since '%s' format is more general (only type 2 is allowed, since POST makes no sense for internal schemes).
+[Engine name]:[Extra request headers]:[post params with '%s' as keyword]:[url]
+[Extra request headers] Ex. "X-Forwarded-For;8.8.8.8" Limitations (they are here for performance reasons):
+The first engine in the file must be the first type that has no '%s' in the engine url.
-
diff --git a/en/links/index.html b/en/links/index.html
index da3b1be1..f8ce756a 100644
--- a/en/links/index.html
+++ b/en/links/index.html
@@ -136,11 +136,12 @@ Ex. ":p x" or ":px" for screen width and infinite height (as
Extract remote content (tar/tgz/zip) under the folder [path]. If [path] ends with "/", then put unzipped file under the folder "[path]/[file name stem]" (for zipped files only, not for tar/tgz).
-i:0m[bookmarklet index|prefix|?postfix|/.../localfile|c[cssFlag]]:[url]
+
i:0m[bookmarklet index|prefix|?postfix|/.../localfile|H[headers]|c[cssFlag]]:[url]
Visiting url and execute the uweb browser internal bookmarklet that keeps valid for all urls under the path of [url].
- [bookmarklet index] must have two/three digits. The first two digits are used as index of bootmarklet. For example, "00" as the first local bookmarklet; "01" as the first remote script; then "02" as the second local bookmarklet, ... The third digit is uplevel, 1 to make bookmarklet valid for parent path of [url].
- c[cssFlag]: For example, "c12" will apply the third and fourth global CSS (12=2^2+2^3).
+- H[headers]: Ex. "HX-Forwarded-For;8.8.8.8" adds extra http request header "X-Forwarded-For:8.8.8.8".
- [?postfix]: the real visited url is "[url]+[?postfix]".
- [/.../localfile]: load the local html/js file that processes [url]. The first character of the local html file must be "<".
- All other cases will be treated as [prefix], the real visited url is "[prefix]+[url]".
diff --git a/en/searchcat/index.html b/en/searchcat/index.html
index c4c4af87..c3a2bbb6 100644
--- a/en/searchcat/index.html
+++ b/en/searchcat/index.html
@@ -52,7 +52,11 @@
Any ".search" file can be opened as search engine file, each line of which has one of the following formats:
[Engine name]:[url without '%s' inside]
[Engine name]:[url with '%s' as keyword]
-[Engine name]:POST:[post params with '%s' as keyword]:[url]
+[Engine name]:POST:[post params with '%s' as keyword]:[url]
+[Engine name]:[Extra request headers]:[post params with '%s' as keyword]:[url]
+
+- [Extra request headers] Ex. "X-Forwarded-For;8.8.8.8"
+
Limitations (they are here for performance reasons):
- The first engine in the file must be the first type that has no '%s' in the engine url.
diff --git a/en/searchurl/txt/markdeep.html b/en/searchurl/txt/markdeep.html
index e81ac55e..7657b0d7 100644
--- a/en/searchurl/txt/markdeep.html
+++ b/en/searchurl/txt/markdeep.html
@@ -1,4 +1,3 @@
-