Skip to content

Commit

Permalink
[+] duckduckgo.com 镜像配置文件
Browse files Browse the repository at this point in the history
  • Loading branch information
aploium committed Sep 20, 2016
1 parent 89dabc6 commit f37a051
Showing 3 changed files with 61 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -75,6 +75,7 @@ Together with the program, provided several (almost) out-of-box configs

### 自带其他的镜像配置文件
* archive.org
* duckduckgo.com
* For more information, please see [more_configs/readme.md](more_configs/readme.md)


56 changes: 56 additions & 0 deletions more_configs/config_duckduckgo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# coding=utf-8
# 这是为 duckduckgo.com 配置文件
#
# 使用方法:
# 1. 复制本文件到 zmirror 根目录(wsgi.py所在目录), 并重命名为 config.py
# 2. 修改 my_host_name 为你自己的域名
#
# 各项设置选项的详细介绍请看 config_default.py 中对应的部分
# 本配置文件假定你的服务器本身在墙外
# 如果服务器本身在墙内(或者在本地环境下测试, 请修改`Proxy Settings`中的设置
#
# 基本全功能完整

# Github: https://github.com/aploium/zmirror

# ############## Local Domain Settings ##############
my_host_name = '127.0.0.1'
my_host_scheme = 'http://'
my_host_port = None # None表示使用默认端口, 可以设置成非标准端口, 比如 81

# ############## Target Domain Settings ##############
target_domain = 'duckduckgo.com'
target_scheme = 'https://'

# 这里面大部分域名都是通过 `enable_automatic_domains_whitelist` 自动采集的, 我只是把它们复制黏贴到了这里
# 实际镜像一个新的站时, 手动只需要添加很少的几个域名就可以了.
# 自动采集(如果开启的话)会不断告诉你新域名
external_domains = (
'duckduckgo-owned-server.yahoo.net',
'icons.duckduckgo.com',
'www.duckduckgo.com',
'ac.duckduckgo.com',
'images.duckduckgo.com',
'help.duckduckgo.com',
'beta.duckduckgo.com',
'next.duckduckgo.com',
'r.duckduckgo.com',
'refresh.duckduckgo.com',
'start.duckduckgo.com',
)

# 强制所有 duckduckgo 站点使用HTTPS
force_https_domains = 'ALL'

# 自动动态添加域名
enable_automatic_domains_whitelist = True
domains_whitelist_auto_add_glob_list = ('*.duckduckgo.com',)

# ############## Proxy Settings ##############
# 如果你在墙内使用本配置文件, 请指定一个墙外的http代理
is_use_proxy = False
# 代理的格式及SOCKS代理, 请看 http://docs.python-requests.org/en/latest/user/advanced/#proxies
requests_proxies = dict(
http='http://127.0.0.1:8123',
https='https://127.0.0.1:8123',
)
6 changes: 4 additions & 2 deletions more_configs/readme.md
Original file line number Diff line number Diff line change
@@ -46,5 +46,7 @@ python3 wsgi.py
* 小视频上传支持

### 其他镜像
* archive.org镜像
* 基本全功能可用
#### archive.org镜像
基本全功能可用
#### duckduckgo镜像
基本全功能可用

0 comments on commit f37a051

Please sign in to comment.