mirror of
https://github.com/torappinfo/uweb.git
synced 2024-08-14 23:54:59 +00:00
46 lines
1.9 KiB
HTML
46 lines
1.9 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
|
|
<link rel="stylesheet" href="/uwebzh/style.css" type="text/css" />
|
|
<title>Blocking domain trees</title>
|
|
<script type="text/javascript">
|
|
function nav2(page){
|
|
let href = location.href;
|
|
for(let i=href.length-1;i>0;i--){
|
|
if('/'==href.charAt(i) && '/'==href.charAt(i-3))
|
|
location.href = href.substring(0,i+1)+page;
|
|
}
|
|
return false;
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<header class='header'>
|
|
<a class="logo" href="javascript:void(0)" onclick="return nav2('index.html')">Home</a> <a class="logo" href="javascript:void(0)" onclick="return nav2('tags/index.html')">Tags</a>
|
|
<nav>
|
|
</nav>
|
|
</header>
|
|
<br />
|
|
|
|
<div class="container">
|
|
<h1 class="title">Blocking domain trees
|
|
<br>
|
|
<span class="subtitle"></span>
|
|
</h1>
|
|
<ul class="tags">
|
|
|
|
<li><a href="../tags/adblock">adblock</a> </li>
|
|
|
|
</ul>
|
|
<p><a href="file:///sdcard/uweb/default.hosts">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>
|
|
[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>
|
|
|
|
</body>
|
|
</html>
|