mirror of
https://github.com/torappinfo/uweb.git
synced 2024-08-14 23:54:59 +00:00
enhance :0cc cookie copy
This commit is contained in:
parent
6a726e893c
commit
cb565e5567
12 changed files with 167 additions and 152 deletions
|
@ -77,14 +77,14 @@ Access-Control-Allow-Origin;https://www.bing.com;Access-Control-Allow-Credential
|
|||
104.21.8.195;Access-Control-Allow-Origin;https://www.bing.com;Access-Control-Allow-Credentials;true uweb.torapp.eu.org</p>
|
||||
</li>
|
||||
</ul>
|
||||
<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 descendant 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>
|
||||
[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>
|
||||
|
||||
</div>
|
||||
<p>Last Modified: 7 April 2023<br>
|
||||
add bing.js for cf & deno<br>
|
||||
<p>Last Modified: 8 April 2023<br>
|
||||
add cloudflare/bing.js<br>
|
||||
<pre></pre>
|
||||
</p>
|
||||
|
||||
|
|
|
@ -49,8 +49,8 @@
|
|||
</ul>
|
||||
<p>Click the following links to install menus popped by long pressing the bookmark button (with star as icon):<br>
|
||||
<a href="i:0gdefault.link:../searchurl/txt/link.cfg">Select All:CTRL-A/undo:CTRL-Z/Redo:CTRL-Y</a><br>
|
||||
<a href="i:0gdefault.link::Extend cookies::0000%0A">Extend site cookies to 10 years</a><br>
|
||||
<a href="i:0gdefault.link::Clear cookies::00000%0A">Clear site cookies</a></p>
|
||||
<a href="i:0gdefault.link::Extend cookies::0cc;Max-Age=315360000%0A">Extend site cookies to 10 years</a><br>
|
||||
<a href="i:0gdefault.link::Clear cookies::0cc;Max-Age=0%0A">Clear site cookies</a></p>
|
||||
<p><a href="i:0gdefault.link::vpn:i:1dandroid.net.vpn.SETTINGS:::%0A">VPN</a></p>
|
||||
<p><a href="i:0gdefault.link::profile_config::cprofile . files .conf%0A">Switch configuration</a></p>
|
||||
<p><a href="i:0gdefault.link::Wait msg:i:1w%0A">Wait for network msg</a></p>
|
||||
|
@ -78,10 +78,6 @@ noproxy::010:</p>
|
|||
<h3 id="special-links-beginning-with-">special links beginning with ':'</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<p>:0000<br>
|
||||
Extend cookie expiracy to 70 years, may be denied by server.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>:0003<br>
|
||||
Toggle fullscreen mode</p>
|
||||
</li>
|
||||
|
@ -106,8 +102,8 @@ Config http proxy, ":010:" to disable any proxy.</p>
|
|||
Socks proxy</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>:0cc[url1]:[url2]<br>
|
||||
cookie copy from url1 to url2</p>
|
||||
<p>:0cc[url1]:[url2][:;[cookie attributes]]<br>
|
||||
cookie copy from url1 to url2, the last part "[:;[cookie attributes]]" is optionable.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 id="commands">commands</h4>
|
||||
|
@ -302,8 +298,8 @@ use "i:0mi:92Host;209.216.230.240::https://news.ycombinator.com" to vi
|
|||
</ul>
|
||||
|
||||
</div>
|
||||
<p>Last Modified: 1 April 2023<br>
|
||||
use [ipv6] in hosts<br>
|
||||
<p>Last Modified: 10 April 2023<br>
|
||||
enhance :0cc cookie copy<br>
|
||||
<pre>i:56 urls support CTRL_A to CTRL-Z
|
||||
</pre>
|
||||
</p>
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
<script>
|
||||
async function getMagicUrl() {
|
||||
let v = localStorage.GoGoUrl;
|
||||
if(v) return v;
|
||||
if(v && v.startsWith("http")) return v;
|
||||
return "https://mybing2.xn--xyza.top/";
|
||||
}
|
||||
</script>
|
||||
|
|
27
en/searchurl/cloudflare/redirect.js
Normal file
27
en/searchurl/cloudflare/redirect.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
export default {
|
||||
async fetch(req, _env) {
|
||||
let url = req.url;
|
||||
let iSlash = url.indexOf('/',11);
|
||||
let nUrl = url.substring(iSlash+1);
|
||||
return goUrl(req, nUrl);
|
||||
}
|
||||
}
|
||||
|
||||
function goUrl(request, url) {
|
||||
let fp = {
|
||||
method: request.method,
|
||||
headers: {}
|
||||
}
|
||||
let reqHeaders = new Headers(request.headers);
|
||||
let dropHeaders = ["cookie","user-agent","accept","accept-language"];
|
||||
let he = reqHeaders.entries();
|
||||
for (let h of he) {
|
||||
let key = h[0],
|
||||
value = h[1];
|
||||
if (dropHeaders.includes(key)) {
|
||||
fp.headers[key] = value;
|
||||
}
|
||||
}
|
||||
return fetch(url, fp);
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { serve } from "https://deno.land/std@0.140.0/http/server.ts";
|
||||
import { serve } from "https://deno.land/std/http/server.ts";
|
||||
async function handler(req: Request): Promise<Response> {
|
||||
let url = req.url;
|
||||
let iSlash = url.indexOf('/',11);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
<url>
|
||||
<loc>/en/_posts/</loc>
|
||||
<lastmod>2023-04-07T18:05:06+08:00</lastmod>
|
||||
<lastmod>2023-04-10T08:20:10+08:00</lastmod>
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="zh"
|
||||
|
@ -29,7 +29,7 @@
|
|||
/>
|
||||
</url><url>
|
||||
<loc>/en/</loc>
|
||||
<lastmod>2023-04-07T18:05:06+08:00</lastmod>
|
||||
<lastmod>2023-04-10T08:20:10+08:00</lastmod>
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="zh"
|
||||
|
@ -42,7 +42,7 @@
|
|||
/>
|
||||
</url><url>
|
||||
<loc>/en/links/</loc>
|
||||
<lastmod>2023-04-01T08:54:03+08:00</lastmod>
|
||||
<lastmod>2023-04-10T08:20:10+08:00</lastmod>
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="zh"
|
||||
|
@ -55,10 +55,10 @@
|
|||
/>
|
||||
</url><url>
|
||||
<loc>/en/tags/adblock/</loc>
|
||||
<lastmod>2023-04-07T18:05:06+08:00</lastmod>
|
||||
<lastmod>2023-04-08T17:53:21+08:00</lastmod>
|
||||
</url><url>
|
||||
<loc>/en/adblock_domain/</loc>
|
||||
<lastmod>2023-04-07T18:05:06+08:00</lastmod>
|
||||
<lastmod>2023-04-08T17:53:21+08:00</lastmod>
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="zh"
|
||||
|
@ -71,7 +71,7 @@
|
|||
/>
|
||||
</url><url>
|
||||
<loc>/en/tags/</loc>
|
||||
<lastmod>2023-04-07T18:05:06+08:00</lastmod>
|
||||
<lastmod>2023-04-08T17:53:21+08:00</lastmod>
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="zh"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue