Quantcast
Channel: 看得透又看得远者prevail. ppt.cc/flUmLx ppt.cc/fqtgqx ppt.cc/fZsXUx ppt.cc/fhWnZx ppt.cc/fnrkVx ppt.cc/f2CBVx
Viewing all 20523 articles
Browse latest View live

mac系统的一些增强工具

$
0
0


QuickLook 增强

macOS 上的 QuickLook 很好用,Windows 也有相应的软件,也叫 QuickLook
QuickLook 还支持插件,我搜集了一些,brew 一并装上
brew cask install qlcolorcode qlstephen qlmarkdown quicklook-json qlimagesize webpquicklook suspicious-package quicklookase qlvideo quicklook-csv quicklookapk

Alfred3

快捷启动效率神器,相似于 Windows 端的 Wox,但是更加 nb(因为 Wox 的插件没有那么多)

Dr.Cleaner

可在 App Store 中下载,用于清理垃圾

Mounty

NTFS 格式磁盘在 macOS 中默认是只读模式,Mounty 可以将其挂载为读写模式

Snipaste

Windows 上的截图神器,现在也有 macOS 版了,依旧好用

Unsplash Wallpapers

可在 App Store 中下载,Unsplash 官方壁纸应用

Keka

解压缩软件,自带的解压缩支持不全面(如 7z 和 rar),Keka 开源,功能也很全,支持压缩排除 macOS 系统文件 (.DS_store 和__MACOSX)
在 App Store 中有售,但官网免费
建议 zip 文件依旧用系统工具解压,Keka 有可能会乱码

LICEcap

GIF 录制工具,Windows 版也有

Itsycal

在菜单栏显示日历

ImageOptim

图片压缩工具

KeePassXC

Keepass 的非官方 macOS 版,Keepass 是一个密码管理软件
目前为止,总到来说,macOS 与 Windows 各有各的好,有一些 Windows 有但 macOS 没有(如 Everything 的全盘极速秒搜,Listary 的目录跳转,xshell&xftp 远程管理,autohotkey,WGestures 全局鼠标手势… 可能比较习惯了吧,慢慢找 macOS 代替品),而 macOS 的终端比 Windows 好用太多,Alfred3 也很好用,当然 macOS 上还有许多很好用的软件,我并没有提及,参考少数派AppSo 等平台
还有就是明显发觉 macOS 平台的很多好用的收费软件,而 Windows 就没有这种感觉.

一个基于rust的静态博客生成器:Mono_Blog

$
0
0


Yet another static site generator for who cares hyphenation in Western words and space between CJK and Western parts.
MonoBlog insert U+2009 between Chinese and Western parts across inline tags, insert U+00AD in the appropriate place inside Western words according to Liang's Hyphenation algorithm and LaTeX's corpus.

Usage

Process file in arg, or data from stdin
$ mblog ulysses.md
or
$ cat ulysses.md | mblog

Format

Front matter and body are just plain markdown. Posts are joined with newline, which is the default format exported from Ulysses.

新软件Intra应对dns污染

$
0
0
问:DNS污染,一直以来,都是翻墙听众最大的挑战之一,因为纵使中国当局无封锁特定网站的链接,但中国当局只要污染DNS记录,仍可导致未能抵达相关网址,或被中国当局的古怪安排,被硬送到去另一个网址。而称为Intra的DNS软件可以解决问题,到底可以怎样解决?

李建军:谷歌母公司Alphabet有份投资的旗下创业公司,开发了Intra软件,这软件的主要目的,就是要解决DNS污染问题。现时DNS污染这样容易,因为浏览时与DNS的通讯,都是未经加密,而未经加密的通讯十分容易下手。而Intra是为解决政府言论审查问题而开发的软件,透过加密与DNS之间的通讯,令当局不可以向用户提供错误的DNS资讯。只要当局未有用防火墙程序,阻止你与个别网站主机间的通讯,就可以成功浏览你要的网站。这解决了部分翻墙时面对的问题,特别是翻墙时纵使用了VPN仍然未能抵达正确网址的问题。因为DNS污染有时会影响VPN以至其他翻墙软件的翻墙能力,毕竟作业系统内的DNS快取被中国当局污染,仍会令浏览器不能抵达正确主机。

较早前,Intra的开发公司,已经将Intra交付委内瑞拉的社运人士使用,并且成功避过委内瑞拉的审查系统成功翻墙,因此,Intra现时推出新版,先让Android桌面电脑、平板电脑和手机使用,相信日后会有其他作业系统平台的版本可供下载。

问:Intra官方网页中,表示如果在使用VPN,就不应同时启动Intra的保护功能,那到底应否在使用VPN时启动Intra?

李建军:这视乎你用VPN翻墙时有无受DNS污染困扰,如果你用VPN翻墙,并无受VPN污染困扰,那你没有必要在VPN翻墙时同时启动Intra,因为有可能会令VPN运作受到影响;但如果你用VPN翻墙时,仍然出现DNS污染的问题,你可以尝试同时启动Intra,看看你的作业系统DNS快取记录,是否得到适当的更正。

问:Intra官方网页指,由于Intra依靠谷歌的基建,因此有可能未能成功使用,那是甚么原因?
李建军:若当局封锁的谷歌IP,恰好是Intra正使用的IP,那就会使用失败,如果遇上这种情况,那就只能采用VPN手段翻墙,因为中国在防火墙层面,都拦截相当数量的谷歌IP,以防听众能使用谷歌的服务。

问:现时传闻谷歌正开发新的搜寻引擎去配合中国政府的审查,这会否影响Intra这软件在未来的稳定性?
李建军:现时Intra是归入谷歌的母公司Alphabet旗下的一个创业计划,加上Intra本身是开放源码软件,故此谷歌在中国的发展,应不会影响Intra技术本身的发展,或被谷歌滥用作为协助中国的网络审查之用,所以在现阶段,听众都可以放心继续使用Intra软件,对抗中国当局的DNS污染。

问:由于目前Intra只有Android版本,除使用Android作业系统的手机,其他电脑都无法享受Intra的好处,那在甚么时候,iOS以及其他作业系统平台,都可以用到Intra,用来对抗中国当局的DNS污染?

李建军:我虽然相信Intra都会开发其他作业系统平台的版本,但因Intra是开放源码项目,除了Windows在移植代码上会比较麻烦,Android本身是其中一种Linux作业系统,因此Linux版本应很快能够被移植过来。而iOS和Mac,都因为本身的UNIX核心,Linux程式要移植相对容易;相信只要技术成熟,在不久将来亦会有Linux、MacOS和iOS的版本。

项目地址:https://github.com/Jigsaw-Code/Intra

macOS Setup Guide

$
0
0
Installing Development environment on macOS 

This guide covers the basics of setting up a development environment on a new Mac. Whether you are an experienced programmer or not, this guide is intended for everyone to use as a reference for setting up your environment or installing languages/libraries.
Some of the environments we will set up are Node (JavaScript), PythonC++ and Ruby. Even if you don't program in all of them, they are useful to have as many command-line tools rely on them. We'll also show you some useful daily use applications. As you read and follow these steps, feel free to post any feedback or comments you may have.


中美相談甚歡 川普:不會加徵關稅 美企可出貨給華為

$
0
0

fuck it,这个川普真是商人出身,利益为重,打压共匪的意识形态根本不是他的考虑范围。他之所以又允许美企可出貨給華為,为的是不让美企的产品积压,不让美企的营收受影响,不让美企的利润受影响,从而不让美国的经济受影响,美国经济搞好了,更有利于他连任。唉,共匪再次获得喘息之机会。不过川普有没想到他这是在养虎为患呢?? 美国等着被共匪在将来反噬吧,这个鼠目寸光的川金毛,就跟当年美国放弃蒋介石的国民政府,转而支持共匪一样。

如何判断是否有公网ip,外网ip有什么用

$
0
0
很多人不知道公网ip是什么,以为公网ip就是宽带运营商给你的固定ip
简单解释如下:
公网IP:全球唯一IP地址。(公网ip可能是动态ip,比如pppoe拨号获取的ip,也可能是固定ip,比如专线宽带)
内网IP:简单就是局域网的ip,比如家里的局域网每台电脑分配的ip,
如果上面看不明白,看下面解释:
公网ip,就是你路由器有一扇门,打开这门(端口映射)这你就可以直接外网访问到家里的nas了。
没公网ip,就是没这扇门,没门,那你外网自然没办法访问家里的nas了,只能通过中转,比如去趟群晖家里再通过群晖家里回到你家,这样访问速度和稳定性就看群晖家多不多人了。
公网ip有什么用?
有了公网ip,那你就可以路由器做端口映射,这样你外网就快速稳定的访问了。
以下IP段的地址都是内网IP地址。
(1)10.0.0.0 到 10.255.255.255
(2)172.16.0.0 到172.31.255.255
(3)192.168.0.0 到192.168.255.255
如果你路由器WAN口获取的ip地址如上面,那么肯定就是内网ip了
1,登录自己的路由看WAN口的状态可以看到获取的ip地址
2,登录http://www.ip138.com 网站看获取的IP地址
3,登录http://ip.qq.com 看获取的IP地址
4,登录万网http://www.net.cn/static/customercare/yourip.asp 查看获得的IP地址
(如万网获取IP是二个,则是IP经运营商转换的内网环境)
5,登录多个知名查IP网站查看IP地址结果对比,只要其中有一个结果IP不一致,即可说明是内网IP。注意,ip查询网站只是获得到你本地出口的IP,即使它是经过转发的IP。
解决办法:
1、没公网ip
只能通过中转,比如群晖或者花生壳内网版本来中转。
电话给你的运营商要求开通,一般说家里有小孩,需要做监控就会帮你开通,不开通那么就开骂,天天去骂,反正当泻火,一般会奏效。
2、有公网ip
如果是光纤猫拨号的,最好设置成路由器拨号,这样才可以端口映射,除非你你有光纤猫的超级账号和密码,可以自己登陆光纤猫做端口映射,不然最好是叫运营商设置成桥接,用自己家里的路由器拨号。

一个新型的dns proxy server程序-CoreDNS

$
0
0
CoreDNS is a DNS server that chains plugins 
CoreDNS is a DNS server/forwarder, written in Go, that chains plugins. Each plugin performs a DNS function.
CoreDNS is a Cloud Native Computing Foundation graduated project.
CoreDNS is a fast and flexible DNS server. The key word here is flexible: with CoreDNS you are able to do what you want with your DNS data by utilizing plugins. If some functionality is not provided out of the box you can add it by writing a plugin.
CoreDNS can listen for DNS requests coming in over UDP/TCP (go'old DNS), TLS (RFC 7858), also called DoT, DNS over HTTP/2 - DoH - (RFC 8484) and gRPC (not a standard).
Currently CoreDNS is able to:
  • Serve zone data from a file; both DNSSEC (NSEC only) and DNS are supported (file and auto).
  • Retrieve zone data from primaries, i.e., act as a secondary server (AXFR only) (secondary).
  • Sign zone data on-the-fly (dnssec).
  • Load balancing of responses (loadbalance).
  • Allow for zone transfers, i.e., act as a primary server (file).
  • Automatically load zone files from disk (auto).
  • Caching of DNS responses (cache).
  • Use etcd as a backend (replace SkyDNS) (etcd).
  • Use k8s (kubernetes) as a backend (kubernetes).
  • Serve as a proxy to forward queries to some other (recursive) nameserver (forward).
  • Provide metrics (by using Prometheus) (metrics).
  • Provide query (log) and error (errors) logging.
  • Support the CH class: version.bind and friends (chaos).
  • Support the RFC 5001 DNS name server identifier (NSID) option (nsid).
  • Profiling support (pprof).
  • Rewrite queries (qtype, qclass and qname) (rewrite and template).
And more. Each of the plugins is documented. See coredns.io/plugins for all in-tree plugins, and coredns.io/explugins for all out-of-tree plugins.

Compilation from Source

To compile CoreDNS, we assume you have a working Go setup. See various tutorials if you don’t have that already configured.
First, make sure your golang version is 1.12 or higher as go mod support is needed. See here for go mod details. Then, check out the project and run make to compile the binary:
$ git clone https://github.com/coredns/coredns
$ cd coredns
$ make

This should yield a coredns binary.

Compilation with Docker

CoreDNS requires Go to compile. However, if you already have docker installed and prefer not to setup a Go environment, you could build CoreDNS easily:
$ docker run --rm -i -t -v $PWD:/go/src/github.com/coredns/coredns \
-w /go/src/github.com/coredns/coredns golang:1.12 make
The above command alone will have coredns binary generated.

Examples

When starting CoreDNS without any configuration, it loads the whoami plugin and starts listening on port 53 (override with -dns.port), it should show the following:
.:53
2016/09/18 09:20:50 [INFO] CoreDNS-001
CoreDNS-001
Any query sent to port 53 should return some information; your sending address, port and protocol used.
If you have a Corefile without a port number specified it will, by default, use port 53, but you can override the port with the -dns.port flag:
./coredns -dns.port 1053, runs the server on port 1053.
Start a simple proxy. You'll need to be root to start listening on port 53.
Corefile contains:
.:53 {
forward . 8.8.8.8:53
log
}
Just start CoreDNS: ./coredns. Then just query on that port (53). The query should be forwarded to 8.8.8.8 and the response will be returned. Each query should also show up in the log which is printed on standard output.
Serve the (NSEC) DNSSEC-signed example.org on port 1053, with errors and logging sent to standard output. Allow zone transfers to everybody, but specifically mention 1 IP address so that CoreDNS can send notifies to it.
example.org:1053 {
file /var/lib/coredns/example.org.signed {
transfer to *
transfer to 2001:500:8f::53
}
errors
log
}
Serve example.org on port 1053, but forward everything that does not match example.org to a recursive nameserver and rewrite ANY queries to HINFO.
.:1053 {
rewrite ANY HINFO
forward . 8.8.8.8:53

file /var/lib/coredns/example.org.signed example.org {
transfer to *
transfer to 2001:500:8f::53
}
errors
log
}
IP addresses are also allowed. They are automatically converted to reverse zones:
10.0.0.0/24 {
whoami
}
Means you are authoritative for 0.0.10.in-addr.arpa..
This also works for IPv6 addresses. If for some reason you want to serve a zone named 10.0.0.0/24 add the closing dot: 10.0.0.0/24. as this also stops the conversion.
This even works for CIDR (See RFC 1518 and 1519) addressing, i.e. 10.0.0.0/25, CoreDNS will then check if the in-addr request falls in the correct range.
Listening on TLS and for gRPC? Use:
tls://example.org grpc://example.org {
whoami
}
Specifying ports works in the same way:
grpc://example.org:1443 {
# ...
}
When no transport protocol is specified the default dns:// is assumed.

Community

We're most active on Github (and Slack):
More resources can be found:

Deployment

Examples for deployment via systemd and other use cases can be found in the deployment repository.
------
Scripts, utilities, and examples for deploying CoreDNS.

MacOS

The default settings will proxy all requests to hostnames not found in your host file to Google's DNS-over-HTTPS.
To install:
  • Run brew tap "coredns/deployment""https://github.com/coredns/deployment"
  • Run brew install coredns
  • Run sudo brew services start coredns
  • test with dig google.com @127.0.0.1 and you should see SERVER: 127.0.0.1#53(127.0.0.1)
Using CoreDNS as your default resolver:
  • Open Network Preferences
  • Select your interface i.e Wi-Fi
  • Click Advanced
  • Select the DNS tab
  • Click the + below the DNS Servers list box
  • Type 127.0.0.1 and hit enter
  • Click OK
  • Click Apply

Debian

On a debian system:
  • Run dpkg-buildpackage -us -uc -b --target-arch ARCH Where ARCH can be any of the released architectures, like "amd64" or "arm".
  • Most users will just run: dpkg-buildpackage -us -uc -b
To install:
  • Run dpkg -i coredns_0.9.10-0~9.20_amd64.deb.
This installs the coredns binary in /usr/bin, adds a coredns user (homedir set to /var/lib/coredns) and a small Corefile /etc/coredns.

-------

DNS over HTTPS

Using Google’s dns.google.com with CoreDNS.

Since almost a year Google has a DNS service that can be queried over HTTPS: https://dns.google.com. This means your queries are encrypted and can only be seen by you (and Google(!)). Seeing all the press about the UK’s snooper’s charter I though I should implement this as a plugin in CoreDNS.
I’m (obviously) going to use this myself; which is perfect as it protects me and it allows me to use CoreDNS as a DNS proxy in my home network.
A note worthy other implementation is “dingo”: https://github.com/pforemski/dingo.
Also note that this a different protocol than “DNS over TLS” which has similar goals and is being standardized by the IETF.
Currently you’ll need to compile CoreDNS from source to play with this or wait until CoreDNS-004 is released.
The configuration on the CoreDNS side is pretty straight forward. The following Corefile is all you’ll need:
. {
proxy . 8.8.8.8 {
protocol https_google
}
cache
log
errors
}
Next start CoreDNS, and query it.
% ./coredns
.:53
2016/11/26 17:11:07 [INFO] CoreDNS-003
CoreDNS-003
::1 - [26/Nov/2016:17:13:10 +0000] "MX IN miek.nl. udp false 4096" NOERROR 246 149.791162ms
::1 - [26/Nov/2016:17:13:11 +0000] "MX IN miek.nl. udp false 4096" NOERROR 170 156.432µs
The only unencrypted DNS used is from your laptop/phone/computer to CoreDNS, the rest is encrypted.
By default, dns.google.com will be re-resolved every 30 seconds using 8.8.8.8 and 8.8.4.4 (you can override these defaults). This is the only query not encrypted, but this will probably lead to a very boring browser history.

在mac系统上,DNS over HTTPS的实现-cloudflared

$
0
0
混淆才是王道,虽然这样会让网管很头疼,但在严重审查的地区,还是值得一试的。尽管现在人们对于 DoH (DNS over HTTPS)的态度还颇有争议,但还是有很多互联网机构支持了它——直接使用 HTTP/2 或者 HTTPS 协议进行请求,这下你就很难专门把 DNS 流量单独分离出来进行干扰了。

尤其对于自建 DNS 服务器来说,甚至可以直接隐藏在网站之后!

要使用 DoH,使用 brew install cloudflare/cloudflare/cloudflared 即可安装,运行命令  sudo cloudflared proxy-dns 来临时启动它进行测试,你可以看到它使用了两个上游服务器:
INFO[0000] Adding DNS upstream                           url="https://1.1.1.1/dns-query"

INFO[0000] Adding DNS upstream                           url="https://1.0.0.1/dns-query"

结果还是正常返回了,第一次查询时间稳定在 300ms 以内,服务本身自带了缓存功能,第二次查询之类的自然就是 0ms 了。

测试成功后,需要给 cloudflared 进行配置,这样它才能以服务的形式自动启动:
mkdir -p /usr/local/etc/cloudflared
nano /usr/local/etc/cloudflared/config.yml
内容如下:
proxy-dns: true
proxy-dns-upstream:
 - https://1.1.1.1/dns-query
 - https://1.0.0.1/dns-query

你可以看到,在/usr/local/etc/cloudflared/config.yml文件中我们给了这两个默认的上游服务器,你也可以在这里添加更多。

总之,在创建好配置文件之后,我们再来执行命令将服务安装到系统当中:
sudo cloudflared service install

INFO[0000] Applied configuration from /usr/local/etc/cloudflared/config.yml

INFO[0000] Installing Argo Tunnel as an user launch agent

INFO[0000] Outputs are logged in /tmp/com.cloudflare.cloudflared.out.log and /tmp/com.cloudflare.cloudflared.err.log

现在,你就可以按 ctrl + c 停掉刚刚测试用的临时服务了,然后用命令启动系统服务: sudo launchctl start com.cloudflare.cloudflared

或运行:
$ sudo cloudflared

INFO[0000] Build info: {GoOS:darwin GoVersion:go1.11.1 GoArch:amd64} 

INFO[0000] Version 2019.6.0                             

INFO[0000] Flags                                         proxy-dns=true proxy-dns-upstream="https://1.1.1.1/dns-query, https://1.0.0.1/dns-query"

INFO[0000] Adding DNS upstream                           url="https://1.1.1.1/dns-query"

INFO[0000] Adding DNS upstream                           url="https://1.0.0.1/dns-query"

INFO[0000] Starting DNS over HTTPS proxy server          addr="dns://localhost:53"

INFO[0000] cloudflared will not automatically update when run from the shell. To enable auto-updates, run cloudflared as a service: https://developers.cloudflare.com/argo-tunnel/reference/service/ 

INFO[0000] Starting metrics server                       addr="127.0.0.1:59130"

系统配置:
现在,我们已经启动了DoH(dns proxy server通常会占用本地的 53 端口)你只需要配置本地机器的 dns server为127.0.0.1即可。

使用 DoH 速度快些但干扰严重——这也可能和 DoH 公共服务器还不是很多有关(毕竟很容易就给你干掉 IP 了),总之,这种手段是自建dns服务器绝佳的选择,简单、快捷,还很轻松。

行文仓促,我目前已经在使用 argo tunnel,也就是 cloudflared 了,自带 DNS 缓存,即使不使用前置 DNS 缓存也能很好的运行。

ref: https://developers.cloudflare.com/argo-tunnel/reference/service/
---------

确实可行,看看能维持多久。


使用dingo + unbound建立自用无污染的dns server

$
0
0

go环境准备

由于dingo使用golang编写,要编译dingo我们需要先准备好golang环境。当然你也可以到github上下载预编译好的release,即可跳过编译过程。

编译dingo




git clone https://github.com/pforemski/dingo


cd dingo


go build


在当前目录下就会出现可执行文件-dingo。运行:


./dingo --help会出现dingo的参数说明.



至此dingo编译完成。


启动dingo服务



dingo启动命令:





./dingo -gdns:server=你的反代ip -gdns:host=你的反代域名 -bind 127.0.0.1 -port 5353





用nginx配置dns.google.com的反代



dingo使用的是google的httpdns,但在国内是无法访问到dns.google.com的,以下为nginx配置,仅供参考(仅包含反代部分)





location / {


proxy_set_header Host 'dns.google.com';


proxy_redirectoff;


proxy_set_header X_FORWARDED_PROTO https;


proxy_pass https://dns.google.com;


}

安装unbound
如果没有什么特殊需求的话(比如edns-client-subnet),直接用软件包管理工具安装unbound即可。


brew install unbound


安装完成后注意修改/etc/default/unbound文件:


- RESOLVCONF_FORWARDERS=true


+ RESOLVCONF_FORWARDERS=false


配置unbound



wget ftp://FTP.INTERNIC.NET/domain/named.cache -O/etc/unbound/root.hints


unbound-control-setup # 生成unbound-control证书文件


参考配置文件,具体参数作用可以查看官方文档


# Unbound configuration file for Debian.



#



# See the unbound.conf(5) man page.



#



# See /usr/share/doc/unbound/examples/unbound.conf for a commented



# reference config file.



#



# The following line includes additional configuration files from the



# /etc/unbound/unbound.conf.d directory.



server:



num-threads: 1 # 使用cpu cores



interface: 0.0.0.0 # 监听地址



port: 53 # 监听端口



interface: ::0



so-rcvbuf: 4m



so-sndbuf: 4m



so-reuseport: yes # 多线程设置为yes



msg-cache-size: 64m



rrset-cache-size: 128m



cache-max-ttl: 3600



outgoing-num-tcp: 256



incoming-num-tcp: 1024



do-ip4: yes



do-ip6: no



do-udp: yes



do-tcp: yes



tcp-upstream: no



access-control: 127.0.0.1 allow ##



access-control: 10.0.0.0/24 allow ## ACL



access-control: 192.168.56.0/24 allow ##



root-hints: "/etc/unbound/root.hints"



hide-identity: yes



hide-version: yes



harden-glue: yes



module-config: "iterator"



unwanted-reply-threshold: 10000000



do-not-query-localhost: no



prefetch: yes



minimal-responses: no



logfile: "/var/log/unbound.log"



log-queries: yes



include: "/etc/unbound/unbound.conf.d/*.conf"# 包含unbound.conf.d目录下的conf文件



forward-zone: ##



name: "."##



forward-addr: 127.0.0.1@5353 ## 转发请求到dingo



forward-first: no ##






remote-control: # unbound-control命令相关配置



control-enable: yes



control-interface: 127.0.0.1



control-port: 8953



control-key-file: "/etc/unbound/unbound_control.key"



control-cert-file: "/etc/unbound/unbound_control.pem"



server-key-file: "/etc/unbound/unbound_server.key"



server-cert-file: "/etc/unbound/unbound_server.pem"






将本地机器的dns server的地址修改为127.0.0.1






unbound的配置文档:
Unbound documentation


------------------------








使用 Unbound和dnscrypt-proxy搭建更好用的 DNS 服务器




准备工作



需要的程序:


  • unbound

  • dnscrypt-proxy

  • makefile

  • git




Unbound 配置



修改文件 /etc/unbound/unbound.conf。没有这个文件的话,一般需要找一下软件包里提供的配置 example 文件复制过去。这里列出的仅包含需要修改的部分,其他的按照默认配置一般没有问题。






num-threads:2# 线程数可以修改为物理核心数
interface:0.0.0.0# 侦听所有 IPv4 地址
interface: ::0# 侦听所有 IPv6 地址
# 如果只需要本机使用,则一个 interface: 127.0.0.1 即可
so-rcvbuf:4m
so-sndbuf:4m # 本机使用的话,这俩 buf 可以取消注释
so-reuseport:yes# 如果开了多线程,就写 yes
msg-cache-size:64m # 本机可以设置 4m 或者更小
rrset-cache-size:128m # 本机可以设置 4m 或者更小
cache-max-ttl:3600# 建议设置一个不太大的值...专治各种运营商 DNS 缓存不服
outgoing-num-tcp:256# 限制每个线程向上级查询的 TCP 并发数
incoming-num-tcp:1024# 限制每个线程接受查询的 TCP 并发数
# 下面这四个不需要解释了吧,不想用那个就写 no
do-ip4:yes
do-ip6:yes
do-udp:yes
do-tcp:yes
tcp-upstream:no# 默认是 no,隧道状态比较稳的话也不需要写 yes。一些情况下强制使用 tcp 连上游的话写 yes
access-control:0.0.0.0/0 allow # 本机用的话建议设置 127.0.0.0/8 allow,局域网用适当调整
root-hints:"/etc/unbound/root.hints"# 没有的话在 ftp://FTP.INTERNIC.NET/domain/named.cache 下载一份
hide-identity:yes# 不返回对 id.server 和 hostname.bind 的查询。
hide-version:yes# 不返回对 version.server 和 version.bind 的查询。
# 不过下面有 identity 和 version 的自定义选项,不隐藏这些的话,修改下选项还可以卖个萌(´・ω・`)
harden-glue:yes# 建议打开
module-config:"iterator"# 禁用 DNSSEC 检查,如果上游不支持 DNSSEC 就关掉。注意这个选项有可能在其他 include 的文件里
unwanted-reply-threshold:10000000# 针对各种网络不服,数值为建议值,具体可以自己修改看看效果
do-not-query-localhost:no# 一般是为了防止扯皮丢包开着,不过等下要用 DNSCrypt 所以关掉
prefetch:yes# 蛮好用的,开着吧
minimal-responses:yes# 省带宽,开着吧。本机用可以关掉
# 关键部分来了,把默认查询全部丢给 DNSCrypt。使用 [地址]@[端口] 指定查询地址和端口,默认端口 53。
# 然后把国内的地址丢给国内的缓存服务器。这两个选项的顺序不能错哟。
# 如果使用隧道查询,把这个地址改为隧道对端的地址,或者一个国外的 DNS 服务器都可以,例如 8.8.8.8。
# 具体看是在对端开 DNS 还是直接用国外的服务器。后者的话,前面 outgoing-interface 可以直接设置隧道本地端的地址,不过要配合 dnsmasq-china-list 的话,还是写路由表比较合适,否则不够灵活。
include:"/etc/unbound/accelerated-domains.china.unbound.conf"
forward-zone:
name:"."
forward-addr:127.0.0.1@5353

DNSCrypt-proxy的配置

修改文件/usr/local/etc/dnscrypt-proxy.toml:

DNSCRYPT_PROXY_LOCAL_ADDRESS=127.0.0.1:5353 # 设置侦听在 127.0.0.1端口 5353
DNSCRYPT_PROXY_RESOLVER_NAME=cisco # cisco 其实蛮快的,但是慢的话就去用个别的吧。d0wn 的那堆服务器真的不稳定,和名字一个样...
127.0.0.1:5353 就是上面 unbound 配置里 DNSCrypt 的监听地址。
如果需要 edns-client-subnet 支持的话,需要手动编译源码安装。命令
# 克隆源码
svn co http://unbound.nlnetlabs.nl/svn/branches/edns-subnet/
# 编译安装
./configure --enable-subnet --with-libevent && make&& sudo make install
配置文件的格式
# 默认向所有服务器发送 edns-client-subnet
send-client-subnet: 0.0.0.0/0
如果只对特定权威 DNS 发送 edns-client-subnet 请求,则按照此格式写多行 IP.
--------------------

Dnscrypt-Proxy的搭建

Let’s start by installing dnscrypt-proxy. This is a client that will take care 
to forward securely all the DNS requests your devices are going to do
to your server. 
It uses either its own protocol (dnscrypt) or DoH.
I’m choosing Dnscrypt-proxy because it provides a fair range of servers
in all the world provided by the community or by big players (like google,
cloudflare, etc …).
One of the contributor provides a PPA to help us install and keep the
program up-to-date.
  1. sudo add-apt-repository ppa:shevchuk/dnscrypt-proxy
  2. sudo apt install dnscrypt-proxy
Once installed, the service will start automatically with your machine.

Configuration

To make thing simple in the guide, I’m using the DNS server of Cloudflare.
In case you don’t want to use their servers,  you have the full list of available
servers on the application website. Keep in mind you can choose more than
one.
Open the file /etc/dnscrypt-proxy/dnscrypt-proxy.toml in your favorite editor.
Find the general section and change the server_name variable.
  1. server_names = ['cloudflare']
Once done, restart the service.
  1. sudo systemctl restart dnscrypt-proxy
By default, the program use the socket library of systemd to listen
127.0.2.1:53.
And that’s it for dnscrypt-proxy.

使用 IPSec 连接带有 chnroutes 的隧道

$
0
0
位于大陆的服务器 A 和位于海外的服务器 B,A 与 B 之间使用隧道互联成内网,服务器 A 配置 chnroutes 以在必要的时候通过海外服务器访问网络,并在服务器 A 上配置 IPSec 服务器,从而使终端用户能够在任何网络环境下安全接入内网。大致描述如下:
需要加速海外访问时:终端用户 <- -="" ipsec="" vpn="">服务器 A <- -="">服务器 B <->互联网->->->
需要访问大陆网域时:终端用户 <- -="" ipsec="" vpn="">服务器 A <->互联网->->
此场景适用于互联网公司为员工提供快速、安全、便捷的工作网络环境,对于个人用户来说负担较大,不建议使用。

配置隧道

最简单的方案在服务器 A 和 B 上配置 GRE 隧道即可,步骤简单不再赘述。需要注意的是为了能让客户端的内网地址能够访问到隧道的对端,也就是服务器 B 端,服务器 B 上配置隧道时 peer 的参数应当是包含服务器 A 和 VPN 客户端 IP 的 IP 段,例如 ip addr add 10.7.0.1 peer 10.7.0.2/24 dev gre0
隧道打通后,服务器 A 的路由配置为:
  • 到服务器 B 的公网 IP 路由经服务器 A 的公网网关出站
  • 默认出口路由为隧道对端
  • 注意设置内网之间的路由
  • chnroutes 配置到大陆的流量经由服务器 A 的公网网关出站

配置 IPSec

安装 strongswan
# apt-get install strongswan
修改 /etc/ipsec.conf
config setup
charonstart=yes
nat_traversal=yes
uniqueids=never# 修改为 yes 可以限制为单个设备连接

conn ios
keyexchange=ikev1
authby=xauthpsk
xauth=server
left=%defaultroute
leftsubnet=0.0.0.0/0
leftfirewall=yes
right=%any
rightsubnet=10.7.0.64/26# 在配置的隧道网段中选择一个小段以避免地址冲突
rightsourceip=10.7.0.65/26# rightsubnet 和 rightsourceip 按情况
pfs=no
auto=add
修改 /etc/ipsec.secrets
: PSK "Your pre-shared key"# 预共享密钥,注意修改引号内部分

username : XAUTH "userP@ss"# 用户名和密码,按格式每行一个
配置 iptables 转发
# iptables -t nat -A POSTROUTING -o <公网网卡> -s  -j SNAT --to-source <公网地址>
在本例中,iptables 的命令为
iptables -t nat -A POSTROUTING -o eth0 -s 10.7.0.64/26 -j SNAT --to-source xxx.xxx.xxx.xxx

DNS 加速优化

既然是服务器中转分流,那么需要在服务器上进行 DNS 解析方可获得最佳效果。
安装 dnsmasq 和 git
# apt-get install dnsmasq git
修改 /etc/dnsmasq.conf 部分:
server=8.8.8.8 # 默认上游服务器通过隧道交由 Google DNS 解析以获得最佳海外站点效果
conf-dir=/etc/dnsmasq.d # 启用配置文件目录
获取 dnsmasq-china-list,将其中的配置文件软连接到 /etc/dnsmasq.d 下即可使用 114DNS 直接解析大部分需要加速的国内站点。
屏蔽公网对本机 DNS 服务的直接访问:
# iptables -A INPUT -p udp -d <服务器 A 公网 IP> --dport 53 -j DROP
# iptables -A INPUT -p tcp -d <服务器 A 公网 IP> --dport 53 -j DROP
修改 /etc/strongswan.conf 在 charon { ... } 块内添加:
dns1 = 10.7.0.2# 此处可填服务器 A 上除公网 IP 和 localhost 之外的任意可绑定 IP 地址,例如隧道的本地端地址

测试

一切就绪后重启 strongswan 服务:
# service strongswan restart
客户端的 IPSec VPN 配置:
  • 服务器地址为服务器 A 的公网地址
  • 用户名、密码、预共享密钥为服务器 A 中配置文件中的值
连接上之后在客户端 ping 任意公网 IP、服务器 A 和服务器 B 的隧道端 IP 应该都是通的。至此,客户端连接 IPSec VPN 后所有流量都会加密经由服务器 A 中转,在必要时会经由海外服务器 B 转发,保证了访问工作必需站点的速度和在任何公共网络环境下的数据安全.

中共以放棄重要底線換來貿易戰停火,贏了面子輸了裡子,川普還能給中共多長時間?最終達成貿易協議的希望依然渺茫

$
0
0

这个习猪头啊,习猪头,早知今日,何必当初。现在遭受的损失更多,哈哈

block(封锁恶意网站)

$
0
0
Let's make an annoyance free, better internet, altogether! 

ad.porn.malware blocking.
This repository consolidates several reputable filters, and merges them into couple of protection packs with duplicates and dead/inactive domains removed. A variety of tailored packs are provided.

A Trio Project with ❤ from Bangladesh, India & Zanzibar.

Features

  • hosts based: based on Hosts file, all the bad stuffs blocked with 0.0.0.0
  • any device: compatible with all devices, regardless of OS.
  • blockings: strictly blocks advertisements, malwares, spams, statistics & trackers on both web browsing and applications.
  • multiple formats: different variants for different devices.
  • speed you need: reduces page loading time upto half of its actual time!
  • privacy: with all these annoyances blocking, it also increases privacy.
  • saves expense: greatly decreases data consumption saving expense.
  • support: user friendly chat group got your back!
  • clean: no extra abracadabra!

What is this for?

This Energized System is designed for Unix-like systems, gets a list of domains that serve ads, tracking scripts and malware from multiple reputable sources and creates protection packs that prevents your system from connecting to them.

Notice

- Due to heavy load on our server, we had to discontinue our mirror service. Moreover, we couldn't afford to pay anymore to keep the server alive and get more bandwidth. 
- Unbound Formats are in 'conf' format now.

Packs

Basic info about all Energized Protection packs.
PACK NAMEDESCRIPTIONBEST USE DEVICEUNIQUE ENTRIESSIZE (AVG.)SOURCE
Energized SparkTrue Lite HostsANY47,6101.3M/spark
Energized Blu GoLightweight Energized GOANY132,1943.5M/bluGo
Energized BluLightweight EnergizedMID END228,1236.6M/blu
Energized BasicBalanced EnergizedHIGH END549,42116M/basic
Energized PornPornware BlockingHIGH END400,58711M/porn
Energized UltimateFlagship Energized BlockingHIGH END860,09424M/ultimate
Energized UnifiedFlagship Energized with Pornware BlockingHIGH END1,235,47834M/unified

Extensions

Basic info about all the available extensions.
PACK NAMEDESCRIPTIONBEST USE DEVICEUNIQUE ENTRIESSIZE (AVG.)SOURCE
Xtreme ExtensionBlock Trackers & AnalyticsANY9,635281K/e/xtreme
Social ExtensionBlock Social Apps and SitesANY4,977150K/e/social
Porn Lite ExtensionLite Porn BlockingANY45,3401.2M/e/porn-lite
Regional ExtensionRegional Annoyance BlockingMID - HIGH END55,2691.3M/e/regional
Expectation: These unified packs should serve all devices, regardless of OS.

Best Use

You can use any practical way you want to use Energized Protection on your devices, if you know what you are doing. But if you are clueless, there are few suggestions.
  • rooted android: Energized Protection Magisk Module makes your experience better on Magisk-ly Rooted Android devices. Grab it from Magisk Manager > Download. If you aren't that familiar with that stuff, then you can use AdAway (Latest) with GIT RAW Sources now.
  • non-rooted android: If you are not using any root solution, then you can use DNS66BLOKADA or Perosnal DNS Filter with any of the Energized Source.
  • ios: Use any Adblocking Client app with Energized Source.
  • windows: On Windows, you can use HostsMan to get the best Windows Hosts Usage Experience.
  • linux: Energized Protection Linux Script is there for you! Check here for more info.
For further assistance, knock us on our Telegram Group or visit our instructions page.

Formats

Different formats for various devices.

Packs

PACKAGEENTRIESHOSTS RAWHOSTS IPV6HOSTS TXTADBLOCK FILTERDOMAINSONE-LINEDNSMASQDNSMASQ IPV6UNBOUNDRPZ
Spark47,610RAW(1.3M)TXT(1010K)TXT(1.3M)FILTER(1010K)LIST(871K)TXT(871K)CONF(1.7M)CONF IPV6(1.5M)CONF(1.9M)TXT(1.3M)
Blu Go132,194RAW(3.5M)TXT(2.9M)TXT(3.5M)FILTER(2.9M)LIST(2.5M)TXT(2.5M)CONF(4.8M)CONF IPV6(4.3M)CONF(5.1M)TXT(3.5M)
Blu228,123RAW(6.6M)TXT(5.5M)TXT(6.6M)FILTER(5.5M)LIST(4.9M)TXT(4.9M)CONF(8.8M)CONF IPV6(7.9M)CONF(9.4M)TXT(6.6M)
Basic549,421RAW(16M)TXT(13M)TXT(16M)FILTER(13M)LIST(12M)TXT(12M)CONF(21M)CONF IPV6(19M)CONF(23M)TXT(16M)
Porn400,587RAW(11M)TXT(8.3M)TXT(11M)FILTER(8.3M)LIST(7.2M)TXT(7.2M)CONF(15M)CONF IPV6(13M)CONF(16M)TXT(11M)
Ultimate860,094RAW(24M)TXT(20M)TXT(24M)FILTER(20M)LIST(18M)TXT(18M)CONF(33M)CONF IPV6(29M)CONF(35M)TXT(24M)
Unified1,235,478RAW(34M)TXT(28M)TXT(34M)FILTER(28M)LIST(25M)TXT(25M)CONF(46M)CONF IPV6(41M)CONF(49M)TXT(34M)

Extensions

PACKAGEENTRIESHOSTS RAWHOSTS IPV6ADBLOCK FILTERDOMAINSONE-LINEDNSMASQDNSMASQ IPV6UNBOUNDRPZ
Xtreme Extension9,635RAWTXTFILTERLISTTXTCONFCONF IPV6CONFTXT
Social Extension4,977RAWTXTFILTERLISTTXTCONFCONF IPV6CONFTXT
Porn Lite Extension45,340RAWTXTFILTERLISTTXTCONFCONF IPV6CONFTXT
Regional Extension55,269RAWTXTFILTERLISTTXTCONFCONF IPV6CONFTXT
Note. Social, Porn, Regional & Xtreme Blocking Extensions are available now. The Xtreme Pack is an enhanced protection pack. May break apps and sites.

Package Sources

Sources each pack and extension uses.

Packs

PackageSourcesTotal
SparkCore List + Adaway, add.207Net, add.Dead, add.Risk, add.Spam, Adguard Mobile Ads & Mobile Spyware, Easylist Adservers & Lite, Fanboy's Cookiemonster List, Malware Domain List, MVPS hosts file, someonewhocares, Steven Black'a Hosts, StreamingAds, UncheckyAds, PGL yoyo.org and ZeuS Tracker19
Blu GoCore List + Spark + 1Hosts, 280blocker, AdGuard Mobile Ads Filter, Mobile Specific & AdGuard Spyware Firstparty, AntiPopAds, CoinBlocker Domains List, EasyPrivacy, Malware Domains Just Domains, MobileAdTrackers, NoTracking, Spam404, Unified Hosts and URLVIR33
BluCore List + Blu Go + Adblock No Coin List, AdGuard DNS & Tracking, Anudeep's Adservers, Better.fyi Trackers, Disconnect Advertising & Malware Filter List, DShield.org Suspicious - Low, Easylist China, EasyPrivacy, ETH Phishing Detect, Fanboy's Annoyance List, GNU Blacklist, hBlock, Hexxium Creations Threat List, hpHosts ATS, KADhosts, lightswitch Ads & Tracking Extended, MalwareDomainList.com, Malware Domains Immortal Domains, neoHosts, uAssets Privacy, Vokin's YHosts and YousList52
BasicCore List + Blu + Adguard English, Japanese, Safari, Spyware, Spyware Firstparty & Russian Filter, Airelle's Malware Hosts, EasyList Russian, hpHosts EMD, Prigent Ads, Quidsup Notrack Malware and WindowsSpyBlocker Hosts Spy64
PornCore Porn List + Airelle's Anti-Sex Hosts, Clefspeare's Pornhosts, EasyList Adult Adservers, Specific & Thirdparty, PornAway Blacklist, Porn List Light, Sinfonietta's Pornhosts and WowDude PornList10
UltimateCore List + Basic + Adware Filters, Airelle's Anti-Advertisements & Anti-Trackers Hosts, All-in-One Customized Adblock List, Anudeep's Coinminer, Badd Boyz Hosts, BarbBlock, Bjornstar's Hosts, Blockzilla, CAMELEON Hosts, CoinBlocker Domains List Browser & Optional, Cybercrime, Disconnect Malvertising & Tracking Filter List, DShield.org Suspicious - High & Medium, EasyPrivacy Specific, Thirdparty & Tracking Servers, Fanboy's Complete & Enhanced Tracking List, hpHosts EXP, GRM, HJK ,MMT & PSH, Matomo Referrer Spam Blacklist, Openphish, Phishing Bad Sites, Prigent's Malware & Phishing, Quidsup NoTrack, Ransomware Tracker, Sinfonietta Snuff, Spam404, Squid Blacklist Ad Servers, Trackers & Malicious and StopForumSpam103
UnifiedCore List + Core Porn List + Ultimate and Porn113

Extensions

ExtensionSourcesTotal
XtremeCore Xtreme List1
SocialCore Social List + AdGuard Social Media filter, Pop-Ups & Trackers, Adversity - Antisocial, Facebook Zero Hosts Block and Sinfonietta's Social7
Porn LiteCore Porn List + Clefspeare's Pornhosts, EasyList Adult Adservers, Specific & Thirdparty, PornAway Blacklist, Porn List Light, Sinfonietta's Pornhosts and WowDude PornList9
RegionalAdblock Estonian & Iran, Adguard Dutch, English, French, German, Japanese, Russian, Turkish & Spanish - Portuguese Filter, Easylist ABPindo, Brasil, Bulgarian, China, Czech & Slovak, Dutch, French, Germany, Hebrew, Italy, Latvian, Polish, Romanian, Russian, Spanish and Thailand, Fanboy's Indian & Vietnamese, Liste AR, Polish Adblock & Privacy Filters and RUAdList32

Sources

Updated sources from the following locations are always merged and included. Note. Active Source means the hosts file we use after whitelisting legit domains and removing dead inactive domains. Social sources don't have active lists as for now.
SourceMaintainer(s)DescriptionHome PageRAW SourceLicenseActive/Filter Source
1HostsbadmojrA merged hosts file from a variety of other listsLINKRAWAll Rights ReservedACTIVE
280blockerAppliliZMobile Adblock & Smartphone site ad blockLINKRAWCC BY-NC-ND 4.0ACTIVE
AdAwayAdaway ORG.AdAway is an open source ad blocker for Android using the hosts fileLINKRAWCC BY 3.0ACTIVE
Adblock EstonianGURUD.EEInternet almost without advertising for Estonian UserLINKRAWAll Rights ReservedACTIVE
Adblock IranfarrokhiAd blocking rules for websitesLINKRAWBSD-2-ClauseACTIVE
Adblock No Coin ListhoshsadiqBlock lists to prevent JavaScript minersLINKRAWMITACTIVE
add.2o7NetFadeMind2o7Net tracking sites based on BadHosts contentLINKRAWMITACTIVE
add.DeadFadeMindDead sites based on BadHosts contentLINKRAWMITACTIVE
add.RiskFadeMindRisk content sites based on BadHosts contentLINKRAWMITACTIVE
add.SpamFadeMindSpam sites based on BadHosts contentLINKRAWMITACTIVE
Adguard DNSAdguard TeamAdGuard Simplified Domain names filterLINKRAWCC BY-SA 3.0ACTIVE
Adguard Dutch FilterAdguard TeamAdGuard Dutch Adblocking FiltersLINKRAWCC BY-SA 3.0ACTIVE
Adguard English FilterAdguard TeamAdGuard English Adblocking FiltersLINKRAWCC BY-SA 3.0ACTIVE
Adguard French FilterAdguard TeamAdGuard French Adblocking FiltersLINKRAWCC BY-SA 3.0ACTIVE
Adguard German FilterAdguard TeamAdGuard German Adblocking FiltersLINKRAWCC BY-SA 3.0ACTIVE
Adguard Japanese FilterAdguard TeamAdGuard Japanese Adblocking FiltersLINKRAWCC BY-SA 3.0ACTIVE
Adguard Mobile Ads FilterAdguard TeamFilter that blocks ads on mobile devicesLINKRAWCC BY-SA 3.0ACTIVE
Adguard Mobile AdserversAdguard TeamMobile advertising networksLINKRAWCC BY-SA 3.0ACTIVE
Adguard Mobile SpecificAdguard TeamSpecific Applications BlocklistLINKRAWCC BY-SA 3.0ACTIVE
Adguard Mobile SpywareAdguard TeamFilter rules for mobile analytics and spywareLINKRAWCC BY-SA 3.0ACTIVE
Adguard Russian FilterAdguard TeamAdGuard Russian Adblocking FiltersLINKRAWCC BY-SA 3.0ACTIVE
Adguard SafariAdguard TeamFilter that blocks ads on iOS mobile devices in Safari browserLINKRAWCC BY-SA 3.0ACTIVE
AdGuard Social Media filterAdguard TeamFilter for social mediaLINKRAWCC BY-SA 3.0FILTER
AdGuard Social Media Pop-UpsAdguard TeamFilter for social media popupsLINKRAWCC BY-SA 3.0FILTER
AdGuard Social TrackersAdguard TeamFilter for social media trackersLINKRAWCC BY-SA 3.0FILTER
Adguard Spanish/Portuguese FilterAdguard TeamFilter that enables removing of the ads from websites in SpanishLINKRAWCC BY-SA 3.0ACTIVE
Adguard Spyware FirstpartyAdguard TeamBlocklist of tracking serversLINKRAWCC BY-SA 3.0ACTIVE
Adguard SpywareAdguard TeamComprehensive list of various online counters and web analytics toolsLINKRAWCC BY-SA 3.0ACTIVE
Adguard TrackingAdguard TeamBlocklist of tracking serversLINKRAWCC BY-SA 3.0ACTIVE
Adguard Turkish FilterAdguard TeamAdGuard Turkish Adblocking FiltersLINKRAWCC BY-SA 3.0ACTIVE
Adversity - AntisocialHubird-auSocial filters listLINKRAWCC BY 3.0FILTER
Adware FiltersEasylistBlocks ads injected by adawareLINKRAWCC BY-SA 3.0ACTIVE
Airelle's Anti-Advertisements HostsAirelleA hosts list blocking advertising sitesLINKRAWCC BY-NC 3.0ACTIVE
Airelle's Malware HostsAirelleA hosts list blocking malware sitesLINKRAWCC BY-NC 3.0ACTIVE
Airelle's Anti-Sex HostsAirelleA hosts list blocking adult/pornographic sitesLINKRAWCC BY-NC 3.0ACTIVE
Airelle's Anti-Trackers HostsAirelleA hosts list blocking tracking sitesLINKRAWCC BY-NC 3.0ACTIVE
All-in-One Customized Adblock ListdeanomanA comprehensive, all-in-one adblock listLINKRAWMITACTIVE
AntiPopAdsYhonayList of popads.net domains for use in adblockLINKRAWWTFPLACTIVE
Anudeep's AdserversAnudeepCurated and well-maintained host file to block adsLINKRAWMITACTIVE
Anudeep's CoinminerAnudeepCurated and well-maintained host file to block coinminingLINKRAWMITACTIVE
Badd Boyz HostsMitchell KrogBlocks bad domains out of your servers or devicesLINKRAWMITACTIVE
BarbBlockpaulgbBlacklists sites which have used DMCA takedownsLINKRAWMITACTIVE
Better.fyi TrackersBetter.fyiBetter.fyi Trackers BlocklistLINKRAWCC BY-SA 4.0ACTIVE
Bjornstar's HostsBjorn StrombergHosts file, filled with advertisers and other purveyors of worthless contentLINKRAWThe UnlicenseACTIVE
BlockzillazpacmanA list powerful against ads and trackersLINKRAWAll Rights ReservedACTIVE
Bulgarian List + EasyListThe EasyList Authors & Alex StanevA list combining Bulgarian List and EasyListLINKRAWGPLv3ACTIVE
CAMELEON HostsPhilippe BourcierA free system that helps Internet users or administrators to blocks web-advertsLINKRAWAll Rights ReservedACTIVE
Clefspeare's PornhostsClefspeare13A consolidated anti porn hosts fileLINKRAWMITACTIVE
CoinBlocker Domains ListZeroDot1A list for administrators to prevent mining in networksLINKRAWGPLv3ACTIVE
CoinBlocker Domains List BrowserZeroDot1A list to prevent browser mining onlyLINKRAWGPLv3ACTIVE
CoinBlocker Domains List OptionalZeroDot1An additional list for administratorsLINKRAWGPLv3ACTIVE
Cybercrime--LINKRAW-ACTIVE
Disconnect Advertising Filter ListDisconnectBlocks advertisementsLINKRAWGPLv3ACTIVE
Disconnect Malvertising Filter ListDisconnectBlocks malvertisingLINKRAWGPLv3ACTIVE
Disconnect Malware Filter ListDisconnectBlocks malwareLINKRAWGPLv3ACTIVE
Disconnect Tracking Filter ListDisconnectBlocks trackersLINKRAWGPLv3ACTIVE
DShield.org Suspicious - HighDShieldThis list consists of High Level Sensitivity website URLsLINKRAWCC BY-NC-SA 2.5ACTIVE
DShield.org Suspicious - LowDShieldThis list consists of Low Level Sensitivity website URLsLINKRAWCC BY-NC-SA 2.5ACTIVE
DShield.org Suspicious - MediumDShieldThis list consists of Medium Level Sensitivity website URLsLINKRAWCC BY-NC-SA 2.5ACTIVE
EasyList ABPindoThe EasyList AuthorsA list combining ABPindo and EasyListLINKRAWGPLv3ACTIVE
EasyList AdserversThe EasyList AuthorsEasyList Adservers Blocking FilterLINKRAWGPLv3ACTIVE
EasyList Adult AdserversThe EasyList AuthorsEasyList Adult Adservers Blocking FilterLINKRAWGPLv3ACTIVE
EasyList Adult SpecificThe EasyList AuthorsEasyList Adult Adservers Specific Blocking FilterLINKRAWGPLv3ACTIVE
EasyList Adult ThirdpartyThe EasyList AuthorsEasyList Adult Adservers Thirdparty Blocking FilterLINKRAWGPLv3ACTIVE
EasyList Brasilinvisible666Complementary subscription to EasyListLINKRAWCC BY-SA 4.0ACTIVE
EasyList ChinaJohn and LiChinese supplement for the EasyList filtersLINKRAWGPLv3ACTIVE
EasyList Czech and SlovakTomáš TaroOfficial filter list file used for blocking ads on Czech and Slovak websitesLINKRAWCC BY-SA 4.0ACTIVE
EasyList DutchThe EasyList AuthorsRemoves adverts on Dutch language websitesLINKRAWGPLv3ACTIVE
EasyList FrenchThe EasyList AuthorsA merged list of Liste FR and EasyListLINKRAWCC BY-NC-SA 3.0ACTIVE
EasyList GermanyThe EasyList AuthorsRemoves adverts on German language websitesLINKRAWGPLv3ACTIVE
EasyList HebrewBsTRemoves adverts on Hebrew language websitesLINKRAWPermissiveACTIVE
EasyList ItalyThe EasyList AuthorsRemoves adverts on Italian language websitesLINKRAWGPLv3ACTIVE
EasyList LatvianThe EasyList AuthorsA list combining Latvian List and EasyListLINKRAWCC BY-SA 4.0ACTIVE
EasyList LiteAdBlockFilters that actually block and hide ads on the websites people visit mostLINKRAWGPLv3ACTIVE
EasyList PolishThe EasyList AuthorsRemoves adverts on Polish language websitesLINKRAWGPLv3ACTIVE
EasyList RomanianThe EasyList AuthorsRemoves adverts on Romanian language websitesLINKRAWAll Rights ReservedACTIVE
EasyList RussianThe EasyList AuthorsA list combining RuAdList List and EasyListLINKRAWCC BY-SA 3.0ACTIVE
EasyList SpanishThe EasyList AuthorsSpanish supplement for EasyListLINKRAWGPLv3ACTIVE
EasyListThe EasyList AuthorsPrimary Easylist FilterLINKRAWGPLv3ACTIVE
EasyPrivacy SpecificThe EasyList AuthorsEasyPrivacy Specific FilterLINKRAWGPLv3ACTIVE
EasyPrivacy ThirdpartyThe EasyList AuthorsEasyPrivacy Thirdparty FilterLINKRAWGPLv3ACTIVE
EasyPrivacy Tracking ServersThe EasyList AuthorsEasyPrivacy Tracking Block FilterLINKRAWGPLv3ACTIVE
EasyPrivacyThe EasyList AuthorsFilter list that completely removes all forms of tracking from the internetLINKRAWGPLv3ACTIVE
ETH Phishing DetectMetaMaskUtility for detecting phishing domains targeting Ethereum usersLINKRAW"Don't Be A Dick" Public LicenseACTIVE
Facebook Zero Hosts BlockKowith Singkornkeereehosts that serve all Facebook contents and resources from alternative "Free Basics" serversLINKRAWCC BY-NC 4.0-
Fanboy's Annoyance ListfanboyIn page Pop-Ups and other annoyancesLINKRAWCC BY 3.0ACTIVE
Fanboy's Complete ListfanboyA list combining EasyList, EasyPrivacy, and Fanboy's Enhanced Tracking ListLINKRAWCC BY 3.0ACTIVE
Fanboy's Cookiemonster ListfanboyThis will remove cookie and privacy warningsLINKRAWCC BY 3.0ACTIVE
Fanboy's Enhanced Tracking ListfanboyBlocks common tracking scriptsLINKRAWCC BY 3.0ACTIVE
Fanboy's IndianfanboyBlocks Indian regional advertisements and trackersLINKRAWCC BY 3.0ACTIVE
Fanboy's Ultimate ListfanboyA list combined Enhanced Tracking ListLINKRAWCC BY 3.0ACTIVE
Fanboy's VietnamesefanboyBlocks Vietnamese regional advertisements and trackersLINKRAWCC BY 3.0ACTIVE
Global Advert Servers Blocklist - Personal Edition-Blocks global advertisements and trackersLINKRAWLGPLACTIVE
GNU BlacklistGnuzillaBlock all well known privacy trackersLINKRAWAll Rights ReservedACTIVE
hBlockhectormImprove your security and privacy by blocking ads, tracking and malware domainsLINKRAWMITACTIVE
Hexxium Creations Threat ListHexxiumCreationsBlocks scams/phishing/malware/malvertising/exploits - and other general threatsLINKRAWAll Rights ReservedACTIVE
hpHosts ATSHosts-File.NetBlocks advert or tracking domainsLINKRAWAll Rights ReservedACTIVE
hpHosts EMDHosts-File.NetBlocks malware domainsLINKRAWAll Rights ReservedACTIVE
hpHosts EXPHosts-File.NetBlocks exploit domainsLINKRAWAll Rights ReservedACTIVE
hpHosts FSAHosts-File.NetBlocks fraud domainsLINKRAWAll Rights ReservedACTIVE
hpHosts GRMHosts-File.NetBlocks spamming domainsLINKRAWAll Rights ReservedACTIVE
hpHosts HFSHosts-File.NetBlocks specific spamming domainsLINKRAWAll Rights ReservedACTIVE
hpHosts HJKHosts-File.NetBlocks hijacking domainsLINKRAWAll Rights ReservedACTIVE
hpHosts MMTHosts-File.NetBlocks misleading marketing tacticsLINKRAWAll Rights ReservedACTIVE
hpHosts PHAHosts-File.NetBlocks illegal pharmacy activitiesLINKRAWAll Rights ReservedACTIVE
hpHosts PSHHosts-File.NetBlocks phishing domainsLINKRAWAll Rights ReservedACTIVE
hpHosts WRZHosts-File.NetBlocks selling, distribution or provision of warezLINKRAWAll Rights ReservedACTIVE
KADhostsazet12Fraud/adware/scam websitesLINKRAWCC BY-SA 4.0ACTIVE
lightswitch Ads & Tracking Extendedlightswitch05Collection of Analytics, Ads, and tracking hosts to blockLINKRAWApache 2.0ACTIVE
Liste ARCrits & smed79Removes adverts on Arabic language websitesLINKRAWCC BY-NC-SA 3.0ACTIVE
Phishing Bad Sitesmailscanner.infoBlocks fraudulent and generally dangerousLINKRAWAll Rights ReservedACTIVE
Malware Domain ListMalware Domain List CommunityA hosts list of domains serving malwareLINKRAWPermissiveACTIVE
Malware Domains ImmortalRiskAnalyticsThis is a list of long-lived, "immortal," malware domainsLINKRAWAll Rights ReservedACTIVE
Malware Domains Just DomainsRiskAnalyticsThis is a list of malware domainsLINKRAWAll Rights ReservedACTIVE
Matomo Referrer Spam BlacklistMatomoA community-contributed list of referrer spammersLINKRAWPublic DomainACTIVE
MobileAdTrackersjawz101Taken from DNS logs, formatted in hostfile formatLINKRAWNo LicenseACTIVE
MVPS hosts fileThe purpose of this site is to provide the user with a high quality custom HOSTS file.LINKRAWCC BY-NC-SA 4.0ACTIVE
neoHostsneoFelhzFree ads blocking hosts projectLINKRAWMITACTIVE
NoTrackingNotrackingBlocks ads, fake sites, shock sites, malware hosts and trackersLINKRAWAll Rights ReservedACTIVE
OpenphishOpenPhishActive Phishing BlocklistLINKRAWAll Rights ReservedACTIVE
Phishing HostsKurobeatsA host file generated from updated phishing site feedsLINKRAWGPLv2ACTIVE
Polish Adblock FiltersMajkiITOfficial Polish Filters for AdBlock, uBlock Origin & AdGuardLINKRAWCC BY-NC-SA 4.0ACTIVE
Polish Privacy FiltersolegwukrPolish language privacy filtersLINKRAWCC BY-SA 4.0ACTIVE
Porn List LightChad Mayfielda correlated list to only block porn sites that appear on Alex'a top 1m site listLINKRAWGPLv3ACTIVE
PornAway BlacklistmhxionBlock Porn SitesLINKRAWMITACTIVE
Prigent AdsFabrice PrigentBlocks adsLINKRAWCC BY-SA 4.0ACTIVE
Prigent MalwareFabrice PrigentBlocks malware domainsLINKRAWCC BY-SA 4.0ACTIVE
Prigent PhishingFabrice PrigentBlocks phishingLINKRAWCC BY-SA 4.0ACTIVE
Quidsup NoTrackquidsupBlocks Tracking SitesLINKRAWGPLv3ACTIVE
Quidsup NoTrack MalwarequidsupBlocks Malware SitesLINKRAWGPLv3ACTIVE
Ransomware Trackerabuse.chA combined domain blocklist for blocking ransomwareLINKRAWPermissiveACTIVE
RuAdList + EasyListabuse.chBlocks adverts on Russian language websitesLINKRAWPermissiveACTIVE
Sinfonietta's PornhostsSinfoniettaA collection of porn domainsLINKRAWMITACTIVE
Sinfonietta's SnuffSinfoniettaA collection of snuff domainsLINKRAWMITACTIVE
Sinfonietta's SocialSinfoniettaA collection of social domainsLINKRAWMIT-
someonewhocaresDan PollockHow to make the internet not suck (as much)LINKRAWNon-Commercial with AttributionACTIVE
Spam404spam404This filter protects you from online scamsLINKRAWCC BY-SA 4.0ACTIVE
Squid Blacklist MaliciousSquid BlacklistMalicious, hijacked, ransomware, dangerous websitesLINKRAWCC BY-ND 4.0ACTIVE
Squid Blacklist Ad Servers and TrackersSquid BlacklistAdvertisements and trackingLINKRAWCC BY-ND 4.0ACTIVE
Steven Black's HostsSteven BlackHosts contributed by Steven BlackLINKRAWMITACTIVE
StopForumSpamStopForumSpamForum spammersLINKRAWCC BY-NC-ND 3.0ACTIVE
StreamingAdsFadeMindStreaming services ads sourcesLINKRAWMITACTIVE
uAssets PrivacyRaymond HillPrivacy filters for uBlock OriginLINKRAWGPLv3ACTIVE
UncheckyAdsFadeMindWindows installers ads sources sites based on https://unchecky.com/ contentLINKRAWAll Rights ReservedACTIVE
Unified HostsSteven BlackExtending and consolidating hosts files from a variety of sourcesLINKRAWMITACTIVE
URLVIRurlvir.comMalicious Executable UrlsLINKRAWAll Rights ReservedACTIVE
Vokin's YHostsvokinsA hosts file for Chinese websitesLINKRAWCC BY-NC-ND 4.0ACTIVE
WindowsSpyBlocker Hosts Spycrazy-maxBlock spying and tracking on WindowsLINKRAWsMITACTIVE
WowDude PornListWowDudeBlocks ads/popups/fake thumbs/fake redirections/spam bookmark buttons and more from porn websitesLINKRAWCC BY 3.0ACTIVE
YousListyousBlocks Korean regional advertisements and trackersLINKRAWCC BY 4.0ACTIVE
yoyo.orgPeter LoweBlocking with ad server and tracking server hostnamesLINKRAWMCRAE GENERAL PUBLIC LICENSE (version 4.r53)ACTIVE
ZeuS Trackerabuse.chThis blocklist contains all domain names associated with ZeuS C&CsLINKRAWAll Rights ReservedACTIVE

Check Energized

Go to our website and if you see a green shield right by the logo. Voila! Energized is working fine for you. Make sure to enable JavaScript for our site to check Energized. You can also check via our Web App or here.

High performance DNS over HTTPS client & server

$
0
0


DNS-over-HTTPS

Client and server software to query DNS over HTTPS, using Google DNS-over-HTTPS protocol and IETF DNS-over-HTTPS (RFC 8484).

Guide

Installing

Install Go, at least version 1.10.
(Note for Debian/Ubuntu users: You need to set $GOROOT if you could not get your new version of Go selected by the Makefile.)
First create an empty directory, used for $GOPATH:
mkdir ~/gopath
export GOPATH=~/gopath
To build the program, type:
make
To install DNS-over-HTTPS as Systemd services, type:
sudo make install
By default, Google DNS over HTTPS is used. It should work for most users (except for People's Republic of China). If you need to modify the default settings, type:
sudoedit /etc/dns-over-https/doh-client.conf
To automatically start DNS-over-HTTPS client as a system service, type:
sudo systemctl start doh-client.service
sudo systemctl enable doh-client.service
Then, modify your DNS settings (usually with NetworkManager) to 127.0.0.1.
To test your configuration, type:
dig www.google.com
If it is OK, you will wee:
;; SERVER: 127.0.0.1#53(127.0.0.1)

Uninstalling

To uninstall, type:
sudo make uninstall
The configuration files are kept at /etc/dns-over-https. Remove them manually if you want.

Server Configuration

The following is a typical DNS-over-HTTPS architecture:
+--------------+                                +------------------------+
| Application | | Recursive DNS Server |
+-------+------+ +-----------+------------+
| |
+-------+------+ +-----------+------------+
| Client side | | doh-server |
| cache (nscd) | +-----------+------------+
+-------+------+ |
| +--------------------------+ +-----------+------------+
+-------+------+ | HTTP cache server / | | HTTP service muxer |
| doh-client +--+ Content Delivery Network +--+ (Apache, Nginx, Caddy) |
+--------------+ +--------------------------+ +------------------------+
Although DNS-over-HTTPS can work alone, a HTTP service muxer would be useful as you can host DNS-over-HTTPS along with other HTTPS services.
HTTP/2 with at least TLS v1.3 is recommended. OCSP stapling must be enabled, otherwise DNS recursion may happen.

DNSSEC

DNS-over-HTTPS is compatible with DNSSEC, and requests DNSSEC signatures by default. However signature validation is not built-in. It is highly recommended that you install unbound or bind and pass results for them to validate DNS records.

EDNS0-Client-Subnet (GeoDNS)

DNS-over-HTTPS supports EDNS0-Client-Subnet protocol, which submits part of the client's IP address (/24 for IPv4, /56 for IPv6 by default) to the upstream server. This is useful for GeoDNS and CDNs to work, and is exactly the same configuration as most public DNS servers.
Keep in mind that /24 is not enough to track a single user, although it is precise enough to know the city where the user is located. If you think EDNS0-Client-Subnet is affecting your privacy, you can set no_ecs = true in /etc/dns-over-https/doh-client.conf, with the cost of slower video streaming or software downloading speed.
To ultilize ECS, X-Forwarded-For or X-Real-IP should be enabled on your HTTP service muxer. If your server is backed by unbound or bind, you probably want to configure it to enable the EDNS0-Client-Subnet feature as well.

Protocol compatibility

Google DNS-over-HTTPS Protocol

DNS-over-HTTPS uses a protocol compatible to Google DNS-over-HTTPS, except for absolute expire time is preferred to relative TTL value. Refer to json-dns/response.go for a complete description of the API.

IETF DNS-over-HTTPS Protocol

DNS-over-HTTPS uses a protocol compatible to IETF DNS-over-HTTPS (RFC 8484).

Supported features

Currently supported features are:
  •  IPv4 / IPv6
  •  EDNS0 large UDP packet (4 KiB by default)
  •  EDNS0-Client-Subnet (/24 for IPv4, /56 for IPv6 by default)

The name of the project

This project is named "DNS-over-HTTPS" because it was written before the IETF DoH project. Although this project is compatible with IETF DoH, the project is not affiliated with IETF.
To avoid confusion, you may also call this project "m13253/DNS-over-HTTPS" or anything you like.
from https://github.com/m13253/dns-over-https
-------

Tutorial to setup your own DNS-over-HTTPS (DoH) server


Introduction

Traditional DNS queries and responses are sent over UDP or TCP without encryption. This is vulnerable to eavesdropping and spoofing (including DNS-based Internet filtering). Responses from recursive resolvers to clients are the most vulnerable to undesired or malicious changes, while communications between recursive resolvers and authoritative name servers often incorporate additional protection. (Google)
To simplify, anybody on your network, your ISP, etc … can easily spoof DNS response and decide to send you to a different website than the one you desired. Also, it has some privacy implication where anybody between you and the DNS server can know what website you visit.

Guide

The guide is divided in multiple part. The first one covers how to setup a DNS-over-HTTPS (DoH) while using dnscrypt-proxy as DNS server to answer the requests.
The second part explains how to make couple of changes to that configuration to have PiHole (dns server that block ads) as DNS server behind DoH.
The third part explains how to add DNS-over-TLS to your setup. Useful if you own Android 9 (Pie) devices.
The last  part will provide you with a list of client for Windows, Linux, Android and iOS that supports DoH natively to be able to use it on all your devices.

Server

I advise you to setup a free f1 micro instance at Google Cloud Computing. You can setup anywhere you want, I only advise there because they have a good image for Ubuntu 18.04 and the f1 micro instance is free forever. All the request the machine will do will be encrypted and not accessible by Google.
Again, if you’re more familiar with Digital Ocean, AWS, etc … please use the hosting provider you know the best. For this guide, I only advise you to have a Debian based image (Debian, Ubuntu, etc …)

Architecture

DNS-over-HTTPS server

The next step is to install the server that implement the DoH protocol to get an HTTP request and do a DNS request.
I provide 2 ways to install it, either you download the deb I provide or you compile the program (in golang) yourself.

Download

For this tutorial, I’ve taken the time to compile and package DNS-over-HTTPS (Golang) and provide a deb file easily installable.
Disclaimer

Compile

If you prefer to build it yourself, you can follow the guide provided in the GitHub repository.
After compiling you can use FPM to build the package.

Install

If you compile it yourself, you won’t need to do this, the make install will have already taken care of it.
  1. sudo dpkg -i doh-server_*_amd64.deb
This will install and start the service for you.

Configuration

Open the file /etc/dns-over-https/doh-server.conf in your favorite editor. Keep somewhere the listen IP/Port. We’ll need it when we’ll setup Nginx.
Change upstream variable.
  1. # HTTP listen port
  2. listen = [
  3. "127.0.0.1:8053",
  4. "[::1]:8053",
  5. ]
  6. # TLS certification file
  7. # If left empty, plain-text HTTP will be used.
  8. # You are recommended to leave empty and to use a server load balancer (e.g.
  9. # Caddy, Nginx) and set up TLS there, because this program does not do OCSP
  10. # Stapling, which is necessary for client bootstrapping in a network
  11. # environment with completely no traditional DNS service.
  12. cert = ""
  13. # TLS private key file
  14. key = ""
  15. # HTTP path for resolve application
  16. path = "/dns-query"
  17. # Upstream DNS resolver
  18. # If multiple servers are specified, a random one will be chosen each time.
  19. upstream = [
  20. "127.0.0.1:53",
  21. ]
  22. # Upstream timeout
  23. timeout = 60
  24. # Number of tries if upstream DNS fails
  25. tries = 10
  26. # Only use TCP for DNS query
  27. tcp_only = false
  28. # Enable logging
  29. verbose = false
This will tell DoH-server to use our dnscrypt-proxy to do its DNS requests.
Once done, restart the service.
  1. sudo systemctl restart doh-server

Nginx

This section focus on installing and configuring Nginx to take care of the HTTPS part of DNS-over-HTTPS. To do this, we configure it as a reverse proxy and use let’s encrypt to generate a certificate.

Install

We add the PPA with TLS 1.3 of Nginx to get the latest stable version with TLS 1.3.
  1. sudo add-apt-repository ppa:ondrej/nginx
  2. sudo apt install nginx-full

Configuration

This is an example of a configuration. You need to change the server_name to the domain you’ll use for DoH. Also check that the uptream server point to doh-server ip and port. If you didn’t change anything in the configuration of doh-server, it’s already configured correctly.
For now, we don’t enable SSL, this will be done after with certbot & let’s encrypt.
  1. upstream dns-backend {
  2. server 127.0.0.1:8053;
  3. }
  4. server {
  5. listen 80;
  6. server_name dns.example.com;
  7. root /var/www/html/dns;
  8. access_log /var/log/nginx/dns.access.log;
  9. location /dns-query {
  10. proxy_set_header X-Real-IP $remote_addr;
  11. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  12. proxy_set_header Host $http_host;
  13. proxy_set_header X-NginX-Proxy true;
  14. proxy_http_version 1.1;
  15. proxy_set_header Upgrade $http_upgrade;
  16. proxy_redirect off;
  17. proxy_set_header X-Forwarded-Proto $scheme;
  18. proxy_read_timeout 86400;
  19. proxy_pass http://dns-backend/dns-query ;
  20. }
  21. }
Put the content of the configuratione into /etc/nginx/sites-available/dns-over-https.
Then do a symlink to the enabled folder. Ask Nginx to check that to configuration works, and reload nginx.
  1. sudo ln -s /etc/nginx/sites-available/dns-over-https /etc/nginx/sites-enabled/dns-over-https
  2. sudo nginx -t
  3. sudo systemctl reload nginx
And there you go, you have now Nginx that will takes care of serving HTTP request to doh-server.

Stapling

The idea is to make Nginx take care of checking if the certificate is expired and keep that information in cache. This is to avoid doing too many requests on the Certificate Authority (CA) of the certificate.
Definition
Create a new file into /etc/nginx/conf.d/stapling.conf with the following content:
  1. ssl_stapling on;
  2. ssl_stapling_verify on;
  3. resolver 127.0.2.1;
This will activate the stapling for all your website hosted with Nginx and using HTTPS.
Feel free to change the resolver variable. By default I made it use the dnscrypt-proxy we configured, but you can change it to any other DNS server.

Certbot

Certbot is the tool developed by EFF to help you request SSL certificate using let’s encrypt. Not only it will generate a certificate for your domain, it will also configure Nginx for you and take care of renewing the certificate.

Install

Usually the version available in the distribution is a little old. We’re going to use the official PPA.
  1. sudo add-apt-repository ppa:certbot/certbot
  2. sudo apt install python-certbot-nginx

Configuration

Certbot provides a variety of ways to obtain SSL certificates, through various plugins. The Nginx plugin will take care of reconfiguring Nginx and reloading the config whenever necessary:
  1. sudo certbot --nginx -d dns.example.com
This runs certbot with the --nginx plugin, using -d to specify the names we’d like the certificate to be valid for.
If this is your first time running certbot, you will be prompted to enter an email address and agree to the terms of service. After doing so, certbot will communicate with the Let’s Encrypt server, then run a challenge to verify that you control the domain you’re requesting a certificate for.
If that’s successful, certbot will ask how you’d like to configure your HTTPS settings.
  1. Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
  2. -------------------------------------------------------------------------------
  3. 1: No redirect - Make no further changes to the webserver configuration.
  4. 2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
  5. new sites, or if you're confident your site works on HTTPS. You can undo this
  6. change by editing your web server's configuration.
  7. -------------------------------------------------------------------------------
  8. Select the appropriate number [1-2] then [enter](press 'c' to cancel):
I advise to choose redirect to be sure it use only HTTPS.

SSL Defaults

Certbot comes with “good-enough” SSL defaults, but they haven’t been updated in a while. It keeps support for TLS1.0 which has been deprecated for years. No device should use it anymore. Moreover the chosen cypher list contains weak cyphers. To resolve this issue, I compiled a new configuration file for you to replace the weak defaults of Certbot.
Edit the file /etc/letsencrypt/options-ssl-nginx.conf and replace its content by this.
  1. # This file contains important security parameters. If you modify this file
  2. # manually, Certbot will be unable to automatically provide future security
  3. # updates. Instead, Certbot will print and log an error message with a path to
  4. # the up-to-date file that you will need to refer to when manually updating
  5. # this file.
  6. ssl_session_cache shared:le_nginx_SSL:1m;
  7. ssl_session_timeout 1440m;
  8. ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
  9. # Enable modern TLS cipher suites
  10. ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
  11. # The order of cipher suites matters
  12. ssl_prefer_server_ciphers on;
  13. add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
Then reload nginx.
  1. sudo systemctl reload nginx

Renewal

By design, the certificate will expire in 90 days. Certbot will take care of renewing it 30 days before expiry. In the case you want to test the renewal process you can run this command.
If you remove the --dry-run, you’ll actively ask Certbot to renew the certificate.
  1. sudo certbot renew --dry-run

Conclusion

Congratulation you have now a DNS-over-HTTPS server running that can accept request at https://dns.example.com/dns-query.
This conclude the first part of the guide. The second convers the differents clients available, like dnscrypt-proxy (windows/linux) and Intra (Android). And the third one how to make this DoH block advertising.
from https://www.aaflalo.me/2018/10/tutorial-setup-dns-over-https-server/
-----------------
A lightweight DNS-over-HTTPS proxy.

https_dns_proxy

https_dns_proxy is a light-weight DNS over HTTPS, non-caching translation proxy for the emerging DoH DNS-over-HTTPS standard. It receives regular (UDP) DNS requests and issues them via DoH.
Google's DNS-over-HTTPS service is default, but Cloudflare's service also works with trivial commandline flag changes.

Using Google

# ./https_dns_proxy -u nobody -g nogroup -d -b 8.8.8.8,8.8.4.4 \
-r "https://dns.google.com/resolve?"

Using Cloudflare

# ./https_dns_proxy -u nobody -g nogroup -d -b 1.1.1.1,1.0.0.1 \
-r "https://cloudflare-dns.com/dns-query?ct=application/dns-json&"

Why?

Using DNS over HTTPS makes eavesdropping and spoofing of DNS traffic between you and the HTTPS DNS provider (Google/Cloudflare) much less likely. This of course only makes sense if you trust your DoH provider.

Features

  • Tiny Size (<30kib li="">30kib>
  • Uses curl for HTTP/2 and pipelining, keeping resolve latencies extremely low.
  • Single-threaded, non-blocking select() server for use on resource-starved embedded systems.
  • Designed to sit in front of dnsmasq or similar caching resolver for transparent use.

Build

Depends on c-areslibcurllibev.
On Debian-derived systems those are libc-ares-dev, libcurl4-{openssl,nss,gnutls}-dev and libev-dev respectively. On Redhat-derived systems those are c-ares-devel, libcurl-devel and libev-devel.
On MacOS, you may run into issues with curl headers. Others have had success when first installing curl with brew.
brew install curl --with-openssl --with-c-ares --with-libssh2 --with-nghttp2 --with-gssapi --with-libmetalink
brew link curl --force
If all pre-requisites are met, you should be able to build with:
$ cmake .
$ make

INSTALL

There is no installer at this stage - just run it.

OpenWRT package install

I maintain a package in the OpenWRT packages repository as well. You can install as follows:
root@OpenWrt:~# opkg update
root@OpenWrt:~# opkg install https_dns_proxy
root@OpenWrt:~# /etc/init.d/https_dns_proxy enable
root@OpenWrt:~# /etc/init.d/https_dns_proxy start
Replace any 'list server' lines in /etc/config/dhcp with:
list server '127.0.0.1#5053'
You may also want to add the line:
noresolv '1'
This prevents dnsmasq from using /etc/resolv.conf DNS servers, leaving only our proxy server.

archlinux package install

There is also an externally maintained AUR package for latest git version. You can install as follows:
user@arch:~# yaourt -S https-dns-proxy-git

Usage

Just run it as a daemon and point traffic at it. Commandline flags are:
Usage: ./https_dns_proxy [-a ] [-p ]
[-d] [-u ] [-g ] [-b ]
[-r ] [-e ]
[-t ] [-l ] [-x] [-v]+

-a listen_addr Local address to bind to. (127.0.0.1)
-p listen_port Local port to bind to. (5053)
-d Daemonize.
-u user Optional user to drop to if launched as root.
-g group Optional group to drop to if launched as root.
-b dns_servers Comma separated IPv4 address of DNS servers
to resolve resolver host (e.g. dns.google.com). (8.8.8.8,1.1.1.1,8.8.4.4,1.0.0.1,145.100.185.15,145.100.185.16,185.49.141.37)
-r resolver_url_prefix The HTTPS path to the JSON resolver URL. (https://dns.google.com/resolve?)
-e subnet_addr An edns-client-subnet to use such as "203.31.0.0/16". ()
-t proxy_server Optional HTTP proxy. e.g. socks5://127.0.0.1:1080
Remote name resolution will be used if the protocol
supports it (http, https, socks4a, socks5h), otherwise
initial DNS resolution will still be done via the
bootstrap DNS servers.
-l logfile Path to file to log to. (-)
-x Use HTTP/1.1 instead of HTTP/2. Useful with broken
or limited builds of libcurl (false).
-v Increase logging verbosity. (INFO)


Alternative protocols



The DoH standard is still evolving. Because responses are translated into JSON, there is room for error in encoding and parsing response types - particularly the less common ones.


For this reason, I tend to believe DNS-over-TLS is a better long-term strategy for the industry, but proxy clients aren't yet readily available.


Note that fundamental differences (binary vs JSON encoding) mean this software does not and will not support DNS-over-TLS.


-------
http://www.briten.info/2019/06/tdns-server-proxy.html (说的是dns-over-tls)

meanTorrent

$
0
0
A MEAN.JS BASED BitTorrent Private Tracker - Full-Stack JavaScript Using MongoDB, Express, AngularJS, and Node.js, A BitTorrent Private Tracker CMS with Multilingual, and IRC announce support, CloudFlare support. 


meanTorrent - A Private BitTorrent Tracker CMS based on meanjs/mean

meanTorrent is A Private BitTorrent Tracker CMS with Multilingual support and a full-stack JavaScript open-source solution, which provides a solid starting point for MongoDBNode.jsExpress, and AngularJS based applications.

Instance Site used meanTorrent

Feature, Function, Screenshots

  • Home 
  • Torrents list 
  • Torrent detail 

meanTorrent some feature:

  1. Tracker pass through cloudflare support.
  2. Multilingual support, now English & Chinese, please read the guide of how to add a complete translated language.
  3. When you want to upload a torrent, Only need to select a source torrent file, and input the movie ID origin TMDB, the movie detaill info will be autoload.
  4. One torrent can boundle many attrs tag, It's the keyword to search filtering.
  5. Torrent comment with full markdown style support.
  6. Oper/Admin can manager users(edit/delete etc), forbidden user(banned).
  7. OPer/Admin can manager torrents, can reviewed new torrents, set torrent sale type, set torrent recommend level, and delete torrent.
  8. Global sale set support, It provides convenience for site preferential sales setting.
  9. Client Black List support, user can not use the client list inside clientBlackList connect to the tracker server.
  10. When user to change profile picture, meanTorrent use ui-cropper to crop the image.
  11. The first sign up user auto be admin role.
  12. User signed ip / leeched ip all in db, admin can forbid user if user`s ip too many.
  13. Detailed user stats info, include account status, uploaded torrents list, seeding list, downloading list.
  14. Complete user score system, user can use score exchange an invitation to invite friend register join.
  15. Invitations manager, user can keep track of invited friends registration progress.
  16. Admin/Oper can manual management the user`s uploaded/downloaded/score data.
  17. Complete messageBox, include message list, read status, keys search, reply detail and markdown style support.
  18. Complete forum function, admin can configure each forum section and section moderators, the content support markdown style.
  19. Forum topics and replies can attach picture files and other type files, The picture file will be displayed automatically, Others file can only be downloaded.
  20. Forum replies support real edit, What you see is what you get (bootstrap-markdown), and drag & drop attach file upload.
  21. Complete thumbs-up system(thanks system), topic poster or torrent uploader will received score donate from clicker.
  22. IRC Announce support Node-irc, when user upload new torrent file, and oper/admin reviewed it, then announce the torrent info to IRC channel.
  23. Complete HnR(hit and run) system support.
  24. Oper/admin can send official invitation, but all the invitation has the expired time setting.
  25. Complete music torrents support, include CD and MTV sub type.
  26. Sports and variety type torrents support NOW!
  27. Software, game, picture, ebook type torrents support NOW!
  28. Admin can update or set users Vip attribute data manual in manage page.
  29. Admin or oper can set torrent 'VIP' attribute, all these torrents only VIP user can list and download.
  30. Complete torrents resources group support, Admin can create a group and set a founder, and the founder can add or remove member users.
  31. Complete movie collections support, Admin can create a collection and insert any movie into it, user can view collection and download all torrents of the collection.
  32. Sort on torrent Vote, seeders, leechers, finished data on torrent list table head clicked events.
  33. Simple vip donate payment function, support Paypal me, Alipay Qrcode and Weixin QRcode.
  34. meanTorrent can backup mongo database into to a .tar files automatic at midnight everyday, and Admin can manage or download these files.
  35. OrderBy torrent imdb vote or site vote in torrent list table header click.
  36. User downloading progress bar or seeding status bar (ngProgress) in torrent list and home page.
  37. User email verify and account active support, inactive account can not login and announce torrent data.
  38. User can set a signature info for forum.
  39. Auto get search movie/tvserial result from TMDB by keywords, user can select a result item to load resources info and upload.
  40. Admin can configure to hide all menu header and footer count info for guest users, usefully for private tracker mode.
  41. Complete emoji support in markdown content, The images for the emoji can be found in the emoji-cheat-sheet.
  42. Complete forum for vip and oper/admin users only, Special access forums not show to normal users.
  43. Add 'All Newest Torrents' in resources type list option of torrent manage admin page, admin can directly management all newest torrents of all category.
  44. New user status 'idle' for long time not login, idle user can not download and can not announce, user can active account with fixed score numbers.
  45. Support anonymous uploader.
  46. In forum, Admin/Moderators and topic owner can edit topic title through click on the title text.
  47. New feature for list all uploader(resources group and user), admin can set uploader access to pass review directly when upload a torrent file.
  48. Complete emoji support on chat room, message box.
  49. Complete server auto notice function to users.
  50. Complete RSS subscription support.
  51. Complete user follow system.
  52. Request system support. User can post a request to find any torrent and respond a request to upload torrent, rewards score support.
  53. Global sales setting support, admin can redefined the upload and download ratio in sales, the value is priority to the torrent sales settings. And show global sales notice message at home page.
  54. New feature for system control panel, only admin can edit markdown templates or system configure files online or execute some shell command online, but this is danger, if you do not understand it, don`t do it please.
  55. Feature for user score getting. upload/download the older torrent get the higher score, the few seeding people got the higher score.
  56. An examination tasks system to check user`s incremental uploaded, download and score value within a specified period of time, if the value failed to reach the standard, admin can banned them.
  57. Add email white list, user can not to receive invite mail and active mail if the email domain not in the list.
  58. Add angular-cache support, to cache all data from $resource GET method, and update these data when $resource POST|PUT|DELETE method.
  59. Daily check in function, continuous check-in to get more points.
  60. Complete resources albums support, oper & admin can create a album and add torrent into it and push it to home page.
  61. Detailed logs, include uploaded and downloaded announce logs, seeding time logs, score changed logs, score changed days log and months log.
  62. Admin can present official invitations to user.
  63. System message support property of 'must read', user must read it and mark it as already read, otherwise it will popup again to minute later.
  64. History of admin operate user account.
  65. New feature for torrent screenshots image upload and edit by uploader or admin or oper, the image link url address support also.
  66. Users score/uploaded/downloaded number changed line graph and detail history of last few days.
  67. Tracker PIV6 support, and show uses IP type(v4.v6) in users list of torrent detail page.
  68. Add a reason when administrator to banned a user.
  69. Add a configure item to setting whether ban the users inviter when the user was banned. and you can setting whether ban the inviter when the inviter is a vip user.
  70. Check the un-reviewed new torrents and opened tickets status and show in top menu item.
  71. New module of Medal Center, the medal is the identity of the users identity and contribution to the site.
  72. New module of Favorites, user can add any torrent into favorites and use the RSS url to download automatic.
  73. Check the reduplicate resource torrents when user upload a torrent and show the tooltip message to uploader.

Chat room feature:

  1. Users name list
  2. Oper/admin can kick(ban) user out of room
  3. Support chat message font style(Font color, Bold style, Italic style) setting online
  4. Banned user can not reconnect to chat server with an expires time(default one hour)
  5. User can not repetitive login from another location at one time
  6. Chat message bubble style
  7. Complete emoji support by enter colon.

TODO

  • Fetch service email box message into administrator group message box of site, oper and admin can select any item to handling.
  • Support service center client side logic and UI.
  • Site data line graph for admin
  • Poll type topics support in forum.
  • More score get methods.
  • IRC chat
  • Business cooperation support(like play box? NAS? etc.)
  • ......more

Online support

Before You Begin

Before you begin we recommend you read about the basic building blocks that assemble a meanTorrent application:

Prerequisites

Make sure you have installed all of the following prerequisites on your development machine:
  • Git - Download & Install Git. OSX and Linux machines typically have this already installed.
  • Node.js - Download & Install Node.js and the npm package manager. If you encounter any problems, you can also use this GitHub Gist to install Node.js.
  • MongoDB - Download & Install MongoDB, at least version 3.4 is required, and make sure it's running on the default port (27017).
  • Bower - You're going to use the Bower Package Manager to manage your front-end packages. Make sure you've installed Node.js and npm first, then install bower globally using npm:
$ npm install -g bower

Downloading meanTorrent

There are several ways you can get the meanTorrent boilerplate:

Cloning The GitHub Repository

The recommended way to get meanTorrent is to use git to directly clone the meanTorrent repository:
$ git clone https://github.com/taobataoma/meanTorrent.git
This will clone the latest version of the meanTorrent repository to a meanTorrent folder.

Downloading The Repository Zip File

Another way to use the MEAN.JS boilerplate is to download a zip copy from the master branch on GitHub. You can also do this using the wget command:
$ wget https://github.com/taobataoma/meanTorrent/archive/master.zip -O meanTorrent.zip; unzip meanTorrent.zip; rm meanTorrent.zip
Don't forget to rename meanTorrent-master after your project name.

Quick Install

Once you've downloaded the boilerplate and installed all the prerequisites, you're just a few steps away from starting to develop your meanTorrent application.
The boilerplate comes pre-bundled with a package.json and bower.json files that contain the list of modules you need to start your application.
To install the dependencies, run this in the application folder from the command-line:
$ npm install
This command does a few things:
  • First it will install the dependencies needed for the application to run.
  • If you're running in a development environment, it will then also install development dependencies needed for testing and running your application.
  • When the npm packages install process is over, npm will initiate a bower install command to install all the front-end modules needed for the application
  • To update these packages later on, just run npm update
If install process show error info below:
../node-icu-charset-detector.cpp:7:28: fatal error: unicode/ucsdet.h: No such file or directory
then run this command to install libicu manual
apt-get install libicu-dev OR yum install libicu-devel

Running Your Application

Run your application using npm:
$ npm start
Your application should run on port 3000 with the development environment configuration, so in your browser just go to http://localhost:3000
That's it! Your application should be running. To proceed with your development, check the other sections in this documentation. If you encounter any problems, try the Troubleshooting section.
Explore config/env/development.js for development environment configuration options.

Running in Production mode

To run your application with production environment configuration:
$ npm run start:prod
Explore config/env/production.js for production environment configuration options.

Running with TLS (SSL)

Application will start by default with secure configuration (SSL mode) turned on and listen on port 8443. To run your application in a secure manner you'll need to use OpenSSL and generate a set of self-signed certificates. Unix-based users can use the following command:
$ npm run generate-ssl-certs
Windows users can follow instructions found here. After you've generated the key and certificate, place them in the config/sslcerts folder.
Finally, execute prod task npm run start:prod
  • enable/disable SSL mode in production environment change the secure option in config/env/production.js

Getting Started With meanTorrent

Before you to start the meanTorrent application, Please explore config/env/torrent.js for many environment configuration options, you can change all configuration items of you Caring, such as:
    announce: {
url:'http://mean.im/announce',
announcePrefix:'[mean.im].',
admin:'admin@mean.im',
baseUrl:'http://mean.im',
clientBlackListUrl:'/about/black'
},
meanTorrent tracker is private, please set the announce.url to your server url, then when user to upload torrent file, It will autocheck the torrent announce url whether matching as announce.url.
    tmdbConfig: {
//please change it to your api key from themoviedb.org
key:'key from themoviedb.org',
},
Because meanTorrent autoload the movie info from TMDB, so please to register yourself key and replace it to tmdbConfig.key.
    language: [
{name:'en', index:0, class:'flag-icon-gb', title:'English'},
{name:'zh', index:1, class:'flag-icon-cn', title:'中文'}
],
Multilingual support, if you add a new translate string file, please add configuration here. The name is value of ISO_639-1, The class is used origin flag-icon-css, you can find flag icon at /public/lib/flag-icon-css/flags/.
    clientBlackList: [
{name:'Transmission/2.93'},
{name:'Mozilla'},
{name:'AppleWebKit'},
{name:'Safari'},
{name:'Chrome'}
],
This is a client Black List, all the list client can not connect to the tracker server, you can add more if you unlike some client to connect. And you can make a list page to tell users witch clients are unpopular.
    sign: {
openSignup:true,
signUpActiveTokenExpires:60*60*1000*24,
allowSocialSignin:true,
showMenuHeaderForGuest, true
},
    invite: {
openInvite:true,
scoreExchange:10000,
expires:60*60*1000*24
},
If your site do not accept user free register, please set openSignup to false, then user only can register through friend invitation or system(admin/oper) invitation. if you set openInvite to true, the normal user can invite friends to join, if false only oper/admin can invite users.
All the sign up account need verify & active by mail, and must completed within the set time signUpActiveTokenExpires.
showMenuHeaderForGuest is setting whether show menu header for guest user, if you do not want the menu header showing for guest, please set to false.
    ircAnnounce: {
enable:true,
debug:false,
server:'irc.mean.im',
port:16667,
nick:'meanAnnouncer',
userName:'meanTorrent',
realName:'IRC announce client',
channel:'#meanAnnounce',
showErrors:true,
autoRejoin:true,
autoConnect:true,
retryCount:86400,
retryDelay:5000,
encoding:'UTF-8'
},
Now, IRC announce support Node-irc, this function can be used on rtorrent client, if match some words, the download client can add the torrent into download task list automatic.
    app: {
showDemoWarningPopup:true
showDebugLog:true
},
sign: {
showDemoSignMessage:true
},
If you started meanTorrent at production env, please set showDemoWarningPopup and showDemoSignMessage to false, this will not show demo message any where. and you can set showDebugLog to false, then the console.log info is not output.
    hitAndRun: {
condition: {
seedTime:24*60*60*1000*7,
ratio:1.5
},
forbiddenDownloadMinWarningNumber:3,
scoreToRemoveWarning:10000
},
meanTorrent support complete HnR(hit and run) system, if user download a HnR torrent, then must seeding days of contition.seedTime or the upload ratio more than contition.ratio, otherwise, the user will get a HnR warning, if the warning numbers is more than forbiddenDownloadMinWarningNumber, then the user can not download any torrent. but can continue the warning torrent and seed it until the warning disappears, and the user can remove a warning by score number of scoreToRemoveWarning or donate a VIP qualifications.
    backup: {
enable:true,
dir:'./modules/backup/client/backup/'

}
meanTorrent can backup mongo database into to a .tar files automatic at midnight everyday, and Admin/Oper can manage or download these files. if you want to disabled this feature, please set enable to falsedir is the saved path.

mail sender configure

meanTorrent need send mail to user when restore password, send invitations etc. before send these mail, you need change the mail options in file config/env/development.js and config/env/production.js, meanTorrent used module nodemailer, if you have any config question you can find at nodemailer.
  mailer: {
from:process.env.MAILER_FROM||'admin@domain.com',
options: {
service:process.env.MAILER_SERVICE_PROVIDER||'Gmail',
imap:process.env.MAILER_IMAP||'imap.gmail.com',
auth: {
user:process.env.MAILER_EMAIL_ID||'username@gmail.com',
pass:process.env.MAILER_PASSWORD||'mailpassword'
}
}
},

How to add translated language

  1. Copy a translate string original file from modules/core/client/app/trans-string-en.js to your want named file, such as 'trans-string-fr.js', and then translate all the strings.
  2. Add new language configure item in config/env/torrent.js.
    language: [
{name:'en', index:0, class:'flag-icon-gb', title:'English'},
{name:'zh', index:1, class:'flag-icon-cn', title:'中文'},
{name:'fr', index:2, class:'flag-icon-fr', title:'Français'} // this is added new language configure
],
Note: the name is value of ISO_639-1, The class is used origin flag-icon-css, you can find flag icon at /public/lib/flag-icon-css/flags/.
  1. Copy and translate all the .md files in modules/*/client/templates/*.md, notice the naming rules of files please, these files can edit online now.
  2. meanTorrent used richtext box of bootstrap-markdown, It has already translated some language, you can find them at /public/lib/bootstrap-markdown/locale/, then inset into config file /config/assets/default.js and /config/assets/production.js, such as:
//bootstrap-markdown
'public/lib/bootstrap-markdown/js/bootstrap-markdown.js',
'public/lib/bootstrap-markdown/locale/bootstrap-markdown.zh.js',
'public/lib/bootstrap-markdown/locale/bootstrap-markdown.fr.js', // this is added new line
Note: If you can not find you wanted language file, you can copy and translate and config it.
  1. Restart meanTorrent.

Deploying to PAAS

Deploying meanTorrent To Heroku

By clicking the button below you can signup for Heroku and deploy a working copy of meanTorrent to the cloud without having to do the steps above.
Deploy

Amazon S3 configuration

To save the profile images to S3, simply set those environment variables:

UPLOADS_STORAGE: s3
S3_BUCKET: the name of the bucket where the images will be saved
S3_ACCESS_KEY_ID: Your S3 access key
S3_SECRET_ACCESS_KEY: Your S3 access key password
FROM https://github.com/taobataoma/meanTorrent

"任阅"网络小说阅读器

$
0
0
"任阅"网络小说阅读器,仿真翻页效果、txt/pdf/epub书籍阅读.

BookReader

"任阅"网络小说阅读器,实现追书推荐收藏、书籍/标签检索、模拟翻书的翻页效果、缓存书籍、日夜间模式、本地txt/pdf/epub书籍阅读、字体/主题/亮度设置、Wifi传书等功能!

此项目停止维护,由于当时做的比较着急,分页、翻页、性能这些都做的相当不好,在 言士创作 中,对这方面做了很多的优化,不过没有开源。 有相关问题欢迎发我邮箱交流!

项目

项目基于RxJava + Retrofit2 + Dagger2,项目中的API均来自追书神器,纯属共享学习之用,不得用于商业!!有任何疑问或建议可联系smuyyh@gmail.com
demo下载:任阅.apk
android 本地网络小说爬虫项目: CrawlerForReader
RN版本:simplereader
任阅改进版:NovelReader
----

NovelReader

仿照"任阅"的追书、看书的小说阅读器。重写"任阅"的代码,优化代码逻辑和代码结构,降低内存使用率。重写小说阅读器,支持网络阅读、本地阅读(支持分章,虚拟分章)。支持仿真翻页、上下滚动翻页等翻页效果。支持小说断点续传功能。优化用户使用体验.
基于"任阅"的改进追书App。
详见原作者项目地址:任阅

应用简介

相对于原作增加的功能与改进:
  1. 重写代码逻辑,优化代码结构,降低内存使用率
  2. 采用 sql 数据库对数据进行存储。 (原作者是采用ACache类将数据修改成文本存储)
  3. 增加书本的断点续传功能 (仅支持单任务下载)
  4. 支持小说更新提示。
  5. 重写小说阅读器,仿掌阅设计。提供的功能如下
    • 支持翻页动画:仿真翻页、覆盖翻页、上下滚动翻页等翻页效果。
    • 支持页面定制:亮度调节、背景调节、字体大小调节
    • 支持全屏模式(含有虚拟按键的手机)、音量键翻页
    • 支持页面进度显示、页面切换、上下章切换。
    • 支持在线章节阅读、本地书籍查找。
    • 支持本地书籍加载到页面(支持本地书籍分章、加载速度快、耗费内存少)
注: 项目目前仍有许多问题,希望各位发现 BUG 能够尽快反馈,本人一定尽快修复,谢谢支持。

采用了以下开源框架


simplereader

$
0
0

参考"任阅"网络小说阅读器,一款基于ReactNative的小说阅读器.

"简阅"网络小说阅读器仿照"任阅"网络小说阅读器,实现追书推荐收藏、书籍/标签检索、读书等功能!

介绍

项目基于ReactNative + Redux的框架开发
。项目中的API均来自追书神器,纯属共享学习之用,不得用于商业!!

TODO

  •  阅读器设置功能,书签功能
  •  缓存书籍到本地
  •  wifi传书(native本地化)
  •  主题设置

体验下载

安装

  1. git clone https://github.com/jsntjinjin/simplereader.git
  2. cd simplereader
  3. npm install
  4. react-native link
  5. react-native run-ios / react-native run-android

electron-quick-start

$
0
0
try a simple Electron app 
Clone and run for a quick way to see Electron in action.
This is a minimal Electron application based on the Quick Start Guide within the Electron documentation.
Use this app along with the Electron API Demos app for API code examples to help you get started.
A basic Electron application needs just these files:
  • package.json - Points to the app's main file and lists its details and dependencies.
  • main.js - Starts the app and creates a browser window to render HTML. This is the app's main process.
  • index.html - A web page to render. This is the app's renderer process.
You can learn more about each of these components within the Quick Start Guide.

To Use

To clone and run this repository you'll need Git and Node.js (which comes with npm) installed on your computer. From your command line:
# Clone this repository
git clone https://github.com/electron/electron-quick-start
# Go into the repository
cd electron-quick-start
# Install dependencies
npm install
# Run the app
npm start
Note: If you're using Linux Bash for Windows, see this guide or use node from the command prompt.

Resources for Learning Electron

SOFARegistry

$
0
0
SOFARegistry is a production-level, low-latency, high-availability service registry powered by Ant Financial.
Build Status license Coverage Status maven
SOFARegistry 是蚂蚁金服开源的一个生产级、高时效、高可用的服务注册中心。SOFARegistry 最早源自于淘宝的 ConfigServer,十年来,随着蚂蚁金服的业务发展,注册中心架构已经演进至第五代。目前 SOFARegistry 不仅全面服务于蚂蚁金服的自有业务,还随着蚂蚁金融科技服务众多合作伙伴,同时也兼容开源生态。SOFARegistry 采用 AP 架构,支持秒级时效性推送,同时采用分层架构支持无限水平扩展。

功能特性

  • 支持服务发布与服务订阅
  • 支持服务变更时的主动推送
  • 丰富的 REST 接口
  • 采用分层架构及数据分片,支持海量连接及海量数据
  • 支持多副本备份,保证数据高可用
  • 基于 SOFABolt 通信框架,服务上下线秒级通知
  • AP 架构,保证网络分区下的可用性

需要

编译需要 JDK 8 及以上、Maven 3.2.5 及以上。
运行需要 JDK 6 及以上,服务端运行需要 JDK 8及以上

文档

tdns-server-proxy and tdns-client-proxy

$
0
0

Tdns-server-proxy is a server-side proxy for DNS that takes connection (TCP/TLS) based DNS queries from client and forwards them to a recursive DNS server over UDP. Ideally, the recursive DNS server should be running at the same host as this proxy. It also forwards responses from the recursive DNS server back to client over TCP/TLS. It can be used to pair with tdns-client-proxy to accomplish T-DNS's features, such as query pipelining and out-of-order responses. It tracks the current Specification for DNS over TLS, draft-ietf-dprive-dns-over-tls-09, enabling direct TLS on port 853 by default, with TCP and STARTTLS as options. A man page (README.man in the package) describes how to use this proxy.
from https://ant.isi.edu/software/tdns/tdns-server-proxy
------

tdns-client-proxy

Tdns-client-proxy is a client-side proxy for DNS that takes UDP-based DNS queries from local application and forwards them to a remote recursive DNS server over TCP (with STARTTLS) or direct TLS. It also forwards responses from remote recursive DNS server back to local application over UDP. It can be used to pair with tdns-server-proxy to accomplish T-DNS's features, such as privacy with query pipelining and out-of-order responses. It tracks the current Specification for DNS over TLS, draft-ietf-dprive-dns-over-tls-09, enabling direct TLS on port 853 by default, with TCP and STARTTLS as options. A man page (README.man in the package) describes how to use this proxy.
-----

T-DNS: DNS over TLS/TCP

Project Description

DNS is the canonical example of a connectionless, single packet, request/response protocol, with UDP as its dominant transport. Yet DNS today is challenged by eavesdropping that compromises privacy, source address spoofing that results in denial-of-service (DoS) attacks on the server and third parties, injection attacks that exploit fragmentation, and size limitations that constrain policy and operational choices.
We propose t-DNS to address these problems: it combines TCP to smoothly support large payloads and mitigate spoofing and amplification for DoS. T-DNS uses transport-layer security (TLS) to provide privacy from users to their DNS resolvers and optionally to authoritative servers.

People

  • John Heidemann, PI on this project, project leader and professor (USC/ISI)

Alumni

Publications

  • Z. Hu, L. Zhu, J. Heidemann, A. Mankin, D. Wessels and P. Hoffman 2016. Specification for DNS over Transport Layer Security (TLS) . Technical Report 7858. Internet Request For Comments. [DOI] [PDFDetails
  • Liang Zhu, Zi Hu, John Heidemann, Duane Wessels, Allison Mankin and Nikita Somaiya 2016. T-DNS: Connection-Oriented DNS to Improve Privacy and Security (poster abstract). Technical Report ISI-TR-2016-706. USC/Information Sciences Institute. [PDFDetails
  • Zi Hu, Liang Zhu, John Heidemann, Allison Mankin, Duane Wessels and Paul Hoffman 2015. TLS for DNS: Initiation and Performance Considerations, draft-ietf-dprive-start-tls-for-dns-00. IETF Internet Draft. [PDFDetails
  • Liang Zhu, Zi Hu, John Heidemann, Duane Wessels, Allison Mankin and Nikita Somaiya 2015. Connection-Oriented DNS to Improve Privacy and SecurityProceedings of the 36thIEEE Symposium on Security and Privacy (San Jose, Californa, USA, May 2015), 171–186. [DOI] [PDF] [Code] [DatasetDetails
  • Liang Zhu, Duane Wessels, Allison Mankin and John Heidemann 2015. Measuring DANE TLSA DeploymentProceedings of the 7th IEEE International Workshop on Traffic Monitoring and Analysis (Barcelona, Spain, Apr. 2015), 219–232. [DOI] [PDF] [CodeDetails
  • Liang Zhu, Zi Hu, John Heidemann, Duane Wessels, Allison Mankin and Nikita Somaiya 2015. Connection-Oriented DNS to Improve Privacy and Security (extended). Technical Report ISI-TR-2015-695. USC/Information Sciences Institute. [PDF] [CodeDetails
  • Liang Zhu, Zi Hu and John Heidemann 2015. Evaluation of Future DNSSEC Response Sizes at a Root and a TLD Server. [PDFDetails
  • Liang Zhu, Duane Wessels, Allison Mankin and John Heidemann 2014. Measuring DANE TLSA Deployment. Presentation at DNS-OARC Fall Workshop.[PDFDetails
  • Liang Zhu, Zi Hu, John Heidemann, Duane Wessels, Allison Mankin and Nikita Somaiya 2014. T-DNS: Connection-Oriented DNS to Improve Privacy and Security (extended). Technical Report ISI-TR-2014-693. USC/Information Sciences Institute. [PDF] [CodeDetails
  • John Heidemann 2014. T-DNS: Connection-Oriented DNS to Improve Privacy and Security. Presentation at the Spring DNS-OARC Meeting. [PDFDetails
  • Liang Zhu, Zi Hu, John Heidemann, Duane Wessels, Allison Mankin and Nikita Somaiya 2014. T-DNS: Connection-Oriented DNS to Improve Privacy and Security. Technical Report ISI-TR-2014-688. USC/Information Sciences Institute. [PDFDetails

from https://ant.isi.edu/tdns
----

相关帖子:http://www.briten.info/2019/06/high-performance-dns-over-https-client.html

中美重回谈判桌,知识产权仍是难啃的硬核桃

$
0
0

在大阪峰会召开前夕的6月26日,美国财政部长姆努钦说,美国和中国的贸易协议“大约90%”已经完成。不过,这是姆努钦今年第四次发布类似宣示,此前,他已经于4月3日、5月7日、6月9日三次宣布“完成了90%”。
这听起来似乎接近完成的“成绩单”,就因为那10%的条款,让中国在今年5月拂袖而去,离开谈判桌,导致美国对价值两千亿美元的中国商品追加关税,两国贸易战直线升温,对全球经济构成了威胁,让世界各国尤其是G20大部分成员国惶惶不安。
这10%有多重要?想想那个被广泛引用的“二八原则”就会明白:一个条款、一个组织中,起关键作用的不是那80%的内容或人,而是那20%起决定作用。中美贸易协议谈判的难点,不在那美国认为完成了的90%的协议,而是那10%。自从2018年中美贸易战开始以来,中美双方努力达成的协议草案包含六个主题:强制技术移转与网络犯罪、知识产权、服务、货币、农业与非关税贸易壁垒。除知识产权之外,其余的五个主题就是姆努钦多次声称“已经完成的90%”,剩下的那10%,就是美国要求美中双方在中国开设“执法办公室”监督协议执行成果,包含一旦中方毁约,美国需要有惩罚机制,比如加征新的关税。整个谈判过程中,美国谈判代表一直在寻求这份权利,但中国谈判代表在这一问题上不愿妥协。
对于中国领导人来说,增加关税导致经济压力加大,企业破产、工人失业,这些都可以通过宣传机器归咎于美国,让国人对美国玩'国家怪罪游戏'。但同意开设执法办公室,在中国就上升到领导人的政治责任层面,朝野都会认为是丧权辱国。
亚洲曾经成为西方殖民地,日本、中国、韩国等国家都有过这段历史。二战以后的民族解放运动中,去殖民化被认为是亚非拉国家独立的象征。1997年,亚洲金融风暴使韩国经济陷入严重危机,当时韩国的外汇储备只剩下可怜的39亿美元。为渡难关,政府不得不在当年11月向IMF(国际货币基金组织)申请了550亿美元的紧急援助性贷款,代价是韩国的经济政策必须接受IMF的干预和严厉监督。从此,韩国进入了“IMF时代”,韩国人将此视为奇耻大辱,在此后的三年内,除了努力改革,民间还发动捐金运动,力争早日偿还债务。2001年8月23日上午,韩国政府宣布偿还IMF最后一笔1.4亿美元的贷款,告别“IMF时代”,金大中的政治声望因此如日中天。
南韩的国际地位当时不过是“四小龙”之一,对IMF这种监管就如此深恶痛绝,中国就更不用说了。中国人普遍认为本国是世界老二,要与美国一争雄长,中国(中共)政府还要主导国际规则的制订,这种心态之下,接受美国的监管,在国人眼中,简直等同于袁世凯当年的二十一条。熟悉中国政治与中国人的心态,就知道习近平必定在这条上坚持到底。
美国为什么必须坚持?
一言以概之,就是保护知识产权对美国太重要,关系到美国企业的竞争力与美国在国际社会领先的科技地位,是美国的国力所系
2016年10月4日,美国商务部、美国专利商标局以及经济和统计管理局联合发布研究报告《知识产权与美国经济2016(Intellectual Property and the US Economy:2016 Update)》,指出知识产权密集型产业至少为美国提供了4500万个就业机会,产业贡献超过6万亿美元,占美国GDP总量的38.2%。该报告识别了81个广泛采用专利、著作权以及商标权保护的知识产权密集型产业,包括软件出版业、录音产业、音频和视频设备制造业、有线电视和其他订阅节目、表演艺术公司以及广播电视。这些产业直接或间接产生的就业机会约占美国所有产业的30%。
上述报告清楚地显示了保护知识产权对美国极其重要。这就是川普总统上任前后反复强调保护知识产权的重要性,并反复指责中国(中共)偷窃美国知识产权带来巨大损失的原因。
2017年6月19日,由彼得·纳瓦罗领导的白宫贸易与制造业政策办公室发表了一份报告,列举了中国(中共)的六类经济侵略战略,并针对第五项(从包括美国在内的其他国家获得关键技术与知识产权)和第六项(掌握推动未来经济增长的新兴高科技产业以及国防工业技术)“战略”详细列举了中国(中共)5类(27种)相关行为、政策或做法:(1)盗窃或通过网络窃取技术与知识产权;(2)通过强迫或侵入性监管手段,强制转让技术和知识产权;(3)施加经济压力胁迫技术与知识产权转移;(4)信息收集;(5)国家资助以获取技术为目的的对外直接投资。报告指出,一项研究发现,盗版软件和假冒商品每年给美国带来的损失可高达6000亿美元,其中大部分来自于中国的仿冒与剽窃。
就在G20峰会召开的第一天,美国军事出版商Defense One主办了一场讨论会,司法部国家安全事务助理部长德默斯说,在司法部所处理的外国政府主导的网络盗窃案中,90%的案件涉及中国政府行为,“从这些案件中你可以看到(中国)有组织、资源配备充足、从上至下的行动。他们使用政府情报机构用来针对外国政府机密所使用的相同工具和技能来盗窃商业机密,以便提升自己的产能。”
在美国总统特朗普6月29日的记者会上,有记者问他如何定义美中关系,是战略伙伴?竞争者?还是敌人?特朗普说美中应该是能够互相帮助的战略伙伴。许多媒体抓住“战略伙伴”这个词大作文章,独独忽视了特朗普这句话有“if”这个条件前置词,引导的是几个关键条件,“如果我们最终能达成正确的协议,……如果北京能开放,……”,在特朗普总统眼中,正确的协议就是北京承诺解决偷窃知识产权和结构性改革,即中美之间未谈成的那10%。可以预见,这10%的未完成协议,只有在特朗普总统的第二个任期内才有可能达成。
Viewing all 20523 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>