耗子面板优势 极低占用: 在 Debian 12 下部署面板 + LNMP 环境,内存占用不到 500 MB,遥遥领先于使用容器化的其他面板。 低破坏性: 面板的设计理念是尽可能减少对系统的额外修改,在同类面板中,我们对系统的修改最少。 追随时代: 面板所有组件均走在时代前沿,更新快,功能强大,安全性有保障。 高效运维: 面板 UI 界面简洁,操作简单,无需繁琐的配置,即可快速部署各类环境、调整应用设置。 离线运行: 面板运行可不依赖任何外部服务,你甚至可以在部署完成后停止面板进程,不会对已部署服务造成任何影响。 久经考验: 我们生产环境自 2022 年即开始使用,已稳定运行 1 年以上无事故。 开源开放: 面板开源,你可以自由修改、审计面板源码,安全性有保障。 Root下安装:

1
HAOZI_DL_URL="https://dl.cdn.haozi.net/panel"; curl -sSL -O ${HAOZI_DL_URL}/install_panel.sh && curl -sSL -O ${HAOZI_DL_URL}/install_panel.sh.checksum.txt && sha256sum -c install_panel.sh.checksum.txt && bash install_panel.sh  echo "Checksum 验证失败,文件可能被篡改,已终止操作"

已开源:https://github.com/TheTNB/panel

项目地址, https://github.com/abi/screenshot-to-code 如果你没有安装过Python或者Yarn,那就用下面两条命令来安装Python,Node或者Yarn

1
2
3
4
brew install python
brew install node
brew install yarn
brew install git

并且通过一下两个命令来确认,安装是否成功

1
2
3
4
5
6
7
8
9
node --version
npm --version
python --version
yarn --version

Node: v18.12.1
npm: 8.19.2
Python: 3.11.5
Yarn: 1.22.19

这个软件对版本要求并不高,所以最新版的就行,我用的版本如下,你可以对照一下 然后Clone这个软件包

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
git clone <https://github.com/abi/screenshot-to-code>
# 进入软件目录
cd screenshot-to-code
# 进入后台目录
cd backend
# GPT4API key
echo "OPENAI_API_KEY=sk-your-key" > .env
# 安装Poetry 依赖包管理器
pip install poetry
# 安装依赖包
poetry install
# 激活命令行
poetry shell
# 运行程序
poetry run uvicorn main:app --reload --port 7000

后台运行好之后,再打开另外一个命令行 来运行前段程序

1
2
3
4
5
6
7
# 同样的进入软件目录
cd screenshot-to-code
# 进入前台目录
cd frontend
# 安装前台依赖包
yarn
yarn dev

打开浏览器地址,就可以使用了 http://localhost:5173/

Lark是一个由字节跳动开发的企业协作与管理平台,其中免费提供自定义域名邮箱。 官网注册:https://www.larksuite.com/(需全局代理,或 国外win机上注册) 1、创建企业(信息随意) 2、进入控制中心:https://www.larksuite.com/admin 3、配置自定义域名邮箱:邮箱 – 服务管理 – 域名管理 – 独立的邮件收发服务 4、邮箱使用:https://larksuite.com/mail

1、port-forward功能介绍 支持Web控制台添加端口映射 支持对每条端口映射进行开启和关闭控制 支持 RestfulAPI 接口,方便被其它系统集成 支持每条端口转发的同时,再分发给多个端口,满足某些测试场景 类似企业交换机的功能,即软交换机,主要是方便企业网络维护人员或开发人员 forward-server.linux64(端口转发服务-linux版本) forward-agent.linux64(内网穿透代理-linux版本) forward-server.win64(端口转发服务-windows版本) forward-agent.win64(内网穿透代理-windows版本) 2、port-forward安装(Linux) 下载

1
2
3
yum -y install unzip
wget https://gitee.com/tavenli/port-forward/releases/download/v1.3.7/forward-server.linux64.v1.3.7.zip
unzip forward-server.linux64.v1.3.7

启用

1
2
chmod 777 start.sh
./start.sh

已开源:https://gitee.com/tavenli/port-forward 3、port-forwardv1.3.7版本地备份forward-server.linux64(端口转发服务-linux版本) forward-agent.linux64(内网穿透代理-linux版本) forward-server.win64(端口转发服务-windows版本) forward-agent.win64(内网穿透代理-windows版本)

升级说明

手动升级版本逐步版本升级,如9-10-11

Debian9至10

备份sources文件

1
cp /etc/apt/sources.list /etc/apt/sources.list.bk

修改apt源为10,请提前备份原文件,strech 为 debian9 代号, 将其替换为 buster 为 debian10 代号;

1
2
cp /etc/apt/sources.list /etc/apt/sources.list.bak
sed -i 's/stretch/buster/g' /etc/apt/sources.list

更新apt索引#

1
apt update

升级到debian10#

1
2
apt upgrade
apt dist-upgrade
Debian10升级至11

Debian11 已经在2021年8月15日正式发布,内核升级为了5.10,这里记录了如何在命令行模式下将Debian10 升级为Debian11. 1.先将Debian10现有的补丁都打全

1
2
apt update -y && apt upgrade -y
apt dist-upgrade

2. 修改 /etc/apt/sources.list 文档,将源buster 替换为bullseye。(注意备份sources.list)

1
2
cp /etc/apt/sources.list /etc/apt/sources.list.bak
sed -i 's/buster/bullseye/g' /etc/apt/sources.list

3.重新update和full-upgrade,遇到对话框,yes/ok即可

1
2
apt update
apt full-upgrade
Debian11升级至12

Debian11 已经在2023年6月10日正式发布,内核升级为了6.10,这里记录了如何在命令行模式下将Debian11 升级为Debian12. 1.先将Debian11现有的补丁都打全

1
2
apt update -y && apt upgrade -y
apt dist-upgrade

2. 修改 /etc/apt/sources.list 文档,将源bullseye 替换为bookworm。(注意备份sources.list)

1
2
cp /etc/apt/sources.list /etc/apt/sources.list.bak
sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list

3.重新update和full-upgrade,遇到对话框,yes/ok即可

1
2
apt update
apt full-upgrade

4. reboot,检查系统版本

1
cat /etc/os-release

Win10专业版系统中自带服务有很多,一个服务对应一个功能,但是很多服务其实普通用户是用不到的,如果你的电脑配置没那么高,运行时常会卡顿,那么建议你关掉没有必要的服务来提升运行速度,那么Win10专业版必须禁用的服务有哪些? **        Win10专业版必须禁用的服务表** Application Layer Gateway Service《Win10Application Layer Gateway Service服务有什么用》 Diagnostic System Host 同上 Distributed Link Tracking Client 参考《Distributed Link Tracking Client是什么服务》 Microsoft App-V Client (App-V是微软应用程序虚拟化技术客户端,一般用不上,禁用) Microsoft iSCSI Initiator Service (iscsi远程连接服务,禁用吧) Microsoft Software Shadow Copy Provider (卷影服务,貌似和备份还原有点像,但是用不到) Net.Tcp Port Sharing Service (TCP端口共享服务,一般用户用不上) ASP.NET State Service《Win10 ASP.NET State Service服务是什么》 Connected User Experiences and Telemetry 关于是什么服务为什么可以禁用参考:《Win10 Connected User Experiences and Telemetry服务可以禁用吗》 Diagnostic Policy Service 《Diagnostic Policy Service服务是什么》 www.winwin7.com Win7系统之家 Diagnostic Service Host 基本和Diagnostic Policy Service/Diagnostic Service Host是同类,可以一起禁用 Downloaded Maps Manager (供应用程序访问已下载地图的 Windows 服务。此服务由访问已下载地图的应用程序按需启动。禁用此服务将阻止应用访问地图。) Function Discovery Provider Host (当电脑加入域后,共享文件需要的一个服务,非域则禁用) HomeGroup Listener (家庭组相关服务,不使用家庭组就禁用) HomeGroup Provider (家庭组相关服务,不使用家庭组就禁用) www.winwin7.com Win7系统之家 Human Interface Device Service (简单的支持一些多媒体功能的键盘,蓝牙耳机上的控制按钮,没啥用) Internet Connection Sharing (ICS) (无线共享相关服务,如不需要无线共享,AP热点等可关闭否则不要关) IP Helper (IP V6协议版本相关服务,目关来说应用不多,可以关闭) IPsec Policy Agent (防火墙相关,是用来协商和配置IPSEC安全策略的,一般用户都用不上,可以禁止掉) Link-Layer Topology Discovery Mapper (网络映射相关,不使用可禁用) Offline Files (Offline Files是什么服务 脱机服务,一般用不上) Performance Logs & Alerts (搜集计算机性能、日志、报警信息的服务项) Portable Device Enumerator Service (Portable Device Enumerator Service服务有什么用) Program Compatibility Assistant Service (Windows兼容性助理,处理程序兼容性(主要是老旧软件),不需要可关闭) Quality Windows Audio Video Experience 《Quality Windows Audio Video Experience是什么服务》 Remote Desktop Configuration (远程桌面相关服务,不使用可关) Routing and Remote Access (软路由服务,可禁用) Secondary Logon (二次登录服务,建议关闭) Remote Registry 《Remote Registry是什么服务》这个是远程注册表服务,建议禁用。 Security Center (Windows安全中心服务,不需要的话就禁用吧,详细介绍(Win10 Security Center是什么服务可以禁用吗)) Server (局域网共享相关服务,不使用局域网可以禁用 ) Remote Desktop Services (远程桌面相关服务,不使用可关) Remote Desktop Services UserMode Port Redirector (远程桌面相关服务,不使用可关) Shared PC Account Manager (共享PC帐户管理器,可以禁用) Shell Hardware Detection (提供自动播放事件通知,禁用) Smart Card (智能卡服务,禁用) Smart Card Device Enumeration Service (同上,还是服务于智能卡,禁用) Smart Card Removal Policy (智能卡相关服务) SSDP Discovery (发现网络上的UPnP设备,网络发现相关服务,不使用局域网可禁用) Superfetch (superfetch是什么服务 超级预读取服务 禁用无影响) SynTPEnh Caller Service (同步电话呼叫服务 禁用) TCP/IP NetBIOS Helper (局域网共享相关服务,不用可禁用) Telephony (电话应用程序编程接口 (TAPI) 提供支持 ,拨号用户不要关,其它就禁用) User Experience Virtualization Service (用户体验虚拟化服务,不需要禁用) Windows Biometric Service (生物识别服务,不使用指纹、不使用人脸识别可以禁用) Windows Search (Windows搜索服务,为文件建立索引加快搜索速度) Windows Update (自动更新服务,不想自动更新的可以禁用) Windows 备份 (备份相关服务,一般也不会去用) Windows 推送通知系统服务 (建议关闭,会狂占内存、CPU) WinHTTP Web Proxy Auto-Discovery Service (默认手动,可禁用) Workstation (局域网共享相关,不需要可禁用) Xbox Live 身份验证管理器 (禁用) Xbox Live 游戏保存 (禁用) XboxNetApiSvc (禁用) 零售演示服务 (演示禁用) 自动时区更新程序 (时间同步,不需要可禁用)

smart安装链接 [https://github.com/pymumu/smartdns/releases\](https://github.com/pymumu/smartdns/releases)  

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
wget https://github.com/pymumu/smartdns/releases/download/all-best-ip/smartdns.1.2022.05.03-1046.x86_64-linux-all.tar.gz

[root@localhost ~]# ls
anaconda-ks.cfg initial-setup-ks.cfg smartdns.1.2022.05.03-1046.x86_64-linux-all.tar.gz
[root@localhost ~]#

tar zxf smartdns.1.2022.05.03-1046.x86_64-linux-all.tar.gz
[root@localhost ~]# tar zxf smartdns.1.2022.05.03-1046.x86_64-linux-all.tar.gz
[root@localhost ~]# cd smartdns
[root@localhost smartdns]# chmod +x ./install
[root@localhost smartdns]# ./install -i
install: 正在创建目录"/etc/smartdns"
"usr/sbin/smartdns" -> "/usr/sbin/smartdns"
"etc/smartdns/smartdns.conf" -> "/etc/smartdns/smartdns.conf"
"etc/default/smartdns" -> "/etc/default/smartdns"
"etc/init.d/smartdns" -> "/etc/init.d/smartdns"
"systemd/smartdns.service" -> "/usr/lib/systemd/system/smartdns.service"
Created symlink from /etc/systemd/system/smartdns.service to /usr/lib/systemd/system/smartdns.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/smartdns.service to /usr/lib/systemd/system/smartdns.service.
[root@localhost smartdns]#

vi /etc/smartdns/smartdns.conf

systemctl enable smartdns
systemctl start smartdns

飞书收集

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#飞书
.feishu.cn
.q9jvw0u5f5.feishu.cn
.ccm-frontier.feishu.cn
.internal-api.feishu.cn
.hryn145hsh.feishu.cn
.internal-api-drive-stream.feishu.cn
.internal-api-lark-api.feishu.cn
.slardar-bd.feishu.cn
.ccm-frontier-hl.feishu.cn
.mcs-bd.feishu.cn
.feishucdn.com
.sf3-scmcdn2-cn.feishucdn.com
.s1-imfile.feishucdn.com
.sf6-scmcdn-cn.feishucdn.com
.ai.feishu.com
.lf9-img-sign.bytehwm.com
.lf3-short.ibytedapm.com
.mon.zijieapi.com
#百度
.baidu.com
#京东
.jd.com
#阿里
#淘宝
.taobao.com
#wechat
.weixin.qq.com
.qq.com
.wechat.com
.wx.qq.com
#csdn
.csdn.net

配置文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
vi /etc/smartdns/smartdns.conf


# dns server name, default is host name
# server-name,
# example:
server-name smartdns1
#

# Include another configuration options
# conf-file [file]
# conf-file blacklist-ip.conf

# dns server bind ip and port, default dns server port is 53, support binding multi ip and port
# bind udp server
# bind [IP]:[port] [-group [group]] [-no-rule-addr] [-no-rule-nameserver] [-no-rule-ipset] [-no-speed-check] [-no-cache] [-no-rule-soa] [-no-dualstack-selection]
# bind tcp server
# option:
# -group: set domain request to use the appropriate server group.
# -no-rule-addr: skip address rule.
# -no-rule-nameserver: skip nameserver rule.
# -no-rule-ipset: skip ipset rule.
# -no-speed-check: do not check speed.
# -no-cache: skip cache.
# -no-rule-soa: Skip address SOA(#) rules.
# -no-dualstack-selection: Disable dualstack ip selection.
# -force-aaaa-soa: force AAAA query return SOA.
# example:
# IPV4:
# bind :53
# bind :6053 -group office -no-speed-check
# IPV6:
# bind [::]:53
# bind-tcp [::]:53
bind [::]:53

# tcp connection idle timeout
# tcp-idle-time [second]

# dns cache size
# cache-size [number]
# 0: for no cache
cache-size 4096

# enable persist cache when restart
# cache-persist yes

# cache persist file
# cache-file /tmp/smartdns.cache

# prefetch domain
# prefetch-domain [yesno]
#启用域名预获取
prefetch-domain yes

# cache serve expired
# serve-expired [yesno]
#启用过期缓存服务
serve-expired yes

# cache serve expired TTL
# serve-expired-ttl [num]
#
serve-expired-ttl 0

# reply TTL value to use when replying with expired data
# serve-expired-reply-ttl [num]
# serve-expired-reply-ttl 30

# List of hosts that supply bogus NX domain results
# bogus-nxdomain [ip/subnet]

# List of IPs that will be filtered when nameserver is configured -blacklist-ip parameter
# blacklist-ip [ip/subnet]

# List of IPs that will be accepted when nameserver is configured -whitelist-ip parameter
# whitelist-ip [ip/subnet]

# List of IPs that will be ignored
# ignore-ip [ip/subnet]

# speed check mode
# speed-check-mode [pingtcp:portnone,]
# example:
#测速模式选择,一般只检测两种协议
# speed-check-mode ping,tcp:80
speed-check-mode tcp:443,ping
# speed-check-mode none

# force AAAA query return SOA
# force-AAAA-SOA [yesno]
#禁用IPV6解析
force-AAAA-SOA yes

# force specific qtype return soa
# force-qtype-SOA [qtypeid ...]
# force-qtype-SOA 65 28

# Enable IPV4, IPV6 dual stack IP optimization selection strategy
# dualstack-ip-selection-threshold [num] (0~1000)
# dualstack-ip-selection [yesno]
dualstack-ip-selection no


# edns client subnet
# edns-client-subnet [ip/subnet]
# edns-client-subnet 192.168.1.1/24
# edns-client-subnet [8::8]/56

# ttl for all resource record
# rr-ttl: ttl for all record
# rr-ttl-min: minimum ttl for resource record
# rr-ttl-max: maximum ttl for resource record
# tr-ttl-reply-max: maximum reply ttl for resource record
# example:
#设置TTL最小值和最大值
#rr-ttl 300
rr-ttl-min 60
rr-ttl-max 86400
# rr-ttl-reply-max 60

# set log level
# log-level: [level], level=fatal, error, warn, notice, info, debug
# log-file: file path of log file.
# log-size: size of each log file, support k,m,g
log-num: number of logs
log-level info
log-file /var/log/smartdns.log
log-size 128k
# dns audit
# audit-enable [yesno]: enable or disable audit.
# audit-enable yes
# audit-SOA [yesno]: enable or disable log soa result.
# audit-size size of each audit file, support k,m,g
# audit-file /var/log/smartdns-audit.log
# audit-size 128k
# audit-num 2

# certificate file
# ca-file [file]
# ca-file /etc/ssl/certs/ca-certificates.crt

# certificate path
# ca-path [path]
# ca-path /etc/ss/certs

# remote udp dns server list
# server [IP]:[PORT] [-blacklist-ip] [-whitelist-ip] [-check-edns] [-group [group] ...] [-exclude-default-group]
# default port is 53
# -blacklist-ip: filter result with blacklist ip
# -whitelist-ip: filter result whth whitelist ip, result in whitelist-ip will be accepted.
# -check-edns: result must exist edns RR, or discard result.
# -group [group]: set server to group, use with nameserver /domain/group.
# -exclude-default-group: exclude this server from default group.
# server 8.8.8.8 -blacklist-ip -check-edns -group g1 -group g2

#飞书
server 114.114.114.114 -group feishu -exclude-default-group
nameserver /.feishu.cn/feishu
nameserver /.feishucdn.com/feishu
nameserver /.feishu.com/feishu
nameserver /.bytehwm.com/feishu
nameserver /.ibytedapm.com/feishu
nameserver /.zijieapi.com/feishu
nameserver /.feelgood.cn/feishu
# 百度
server 114.114.114.114 -group baidu -exclude-default-group
nameserver /.baidu.com/baidu
#京东
server 114.114.114.114 -group jd -exclude-default-group
nameserver /.jd.com/jd
#淘宝天猫
server 114.114.114.114 -group taobao -exclude-default-group
nameserver /.taobao.com/taobao
nameserver /.tmall.com/taobao
#阿里
server 114.114.114.114 -group ali -exclude-default-group
nameserver /.aliyun.com/ali
#csdn
server 114.114.114.114 -group csdn -exclude-default-group
nameserver /.csdn.net/csdn
#华为
server 114.114.114.114 -group huawei -exclude-default-group
nameserver /.huaweicloud.com/huawei
#todesk
server 114.114.114.114 -group todesk -exclude-default-group
nameserver /.todesk.com/todesk
#QQ
server 114.114.114.114 -group qq -exclude-default-group
nameserver /.qq.com/qq

# remote tcp dns server list
# server-tcp [IP]:[PORT] [-blacklist-ip] [-whitelist-ip] [-group [group] ...] [-exclude-default-group]
# default port is 53
# server-tcp 8.8.8.8
server 8.8.8.8
server 8.8.4.4
##server 120.53.129.197
##server 124.70.4.50


# remote tls dns server list
# server-tls [IP]:[PORT] [-blacklist-ip] [-whitelist-ip] [-spki-pin [sha256-pin]] [-group [group] ...] [-exclude-default-group]
# -spki-pin: TLS spki pin to verify.
# -tls-host-verify: cert hostname to verify.
# -host-name: TLS sni hostname.
# -no-check-certificate: no check certificate.
# Get SPKI with this command:
# default port is 853
server-tls 8.8.8.8
server-tls 1.0.0.1

# remote https dns server list
# server-https https://[host]:[port]/path [-blacklist-ip] [-whitelist-ip] [-spki-pin [sha256-pin]] [-group [group] ...] [-exclude-default-group]
# -spki-pin: TLS spki pin to verify.
# -tls-host-verify: cert hostname to verify.
# -host-name: TLS sni hostname.
# -http-host: http host.
# -no-check-certificate: no check certificate.
# default port is 443
server-https https://cloudflare-dns.com/dns-query

# specific nameserver to domain
# nameserver /domain/[group-]
# nameserver /www.example.com/office, Set the domain name to use the appropriate server group.
# nameserver /www.example.com/-, ignore this domain


# specific address to domain
# address /domain/[ip--4-6##4#6]
# address /www.example.com/1.2.3.4, return ip 1.2.3.4 to client
# address /www.example.com/-, ignore address, query from upstream, suffix 4, for ipv4, 6 for ipv6, none for all
# address /www.example.com/#, return SOA to client, suffix 4, for ipv4, 6 for ipv6, none for all

# enable ipset timeout by ttl feature
# ipset-timeout [yes]

# specific ipset to domain
# ipset /domain/[ipset-]
# ipset /www.example.com/block, set ipset with ipset name of block
# ipset /www.example.com/-, ignore this domain

# set domain rules
# domain-rules /domain/ [-speed-check-mode [...]]
# rules:
# [-c] -speed-check-mode [mode]: speed check mode
# speed-check-mode [pingtcp:portnone,]
# [-a] -address [address-]: same as address option
# [-n] -nameserver [group-]: same as nameserver option
# [-p] -ipset [ipset-]: same as ipset option
# [-d] -dualstack-ip-selection [yesno]: same as dualstack-ip-selection option

Tinc介绍

Tinc 是一个组建虚拟专用网络的工具,以 GNU 协议发布,通过隧道及加密技术在互联网上点与点之间创建专有网络。tinc 在网络层工作,因此无需对现有软件进行修改和配置。您可以使用 tinc 搭建专属的低延迟、高带宽、可扩展的 P2P 虚拟局域网。其数据通讯经过加密和压缩,能避免敏感数据和隐私的泄露。

选择的理由

  1. 开源,截止目前还在不断更新完善;
  2. 分布式网状路由,避免单点高负载和故障;
  3. 可运行多个实例来接入多个VPN;
  4. 通过虚拟网卡通讯,无需对现有应用软件进行修改和配置;
  5. 通讯支持 加密/认证/压缩,并支持参数选择;
  6. 支持常见的操作系统和网络拓扑,适用场景广泛;
  7. 支持P2P协议组网。

说明

本教程为实现Tinc 虚拟网内设备,能打洞成功的设备将实现直连,打洞失败的设备通过中转节点链接。

搭建教程

1)主节点

这里主节点选择的话必须是有公网IP的节点来进行搭建。

环境说明

系统:Ubuntu 20.04 虚拟内网IP:10.100.1.105 公网IP:1.1.1.1 虚拟网名称:hnvps 主节点名称: hnvps

1、安装Tinc

这里安装有两种方式

  • 一种是直接使用apt安装
1
apt install tinc
  • 本教程采用编译安装 这里安装的是最新的测试版本其他版本请到官网下载:https://tinc-vpn.org
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 安装依赖
apt install gcc cmake make zlib1g-dev liblzo2-dev openssl
curl https://cdn.nextrt.com/blog/tinc-1.1pre18.tar.gz -o /tmp/tinc.tar.gz
cd /tmp
tar -zxvf tinc.tar.gz
rm -rf tinc.tar.gz
mv tinc-1.1pre18 tinc
cd tinc
./configure
make
make install
# 建立配置文件储存目录
mkdir /usr/local/etc/tinc
mkdir -p /usr/local/var/run/
sudo ln -s /usr/local/etc/tinc /etc/tinc

2、配置TINC

准备事项

1、开启内核的 ip_foward 功能,如果没有开启请手动开启转发.

1
sysctl -agrep ip_forward # 查看 ip_forward 转发是否开启 [ net.ipv4.ip_forward=1 ]

开启方法

1
sudo echo 1 > /proc/sys/net/ipv4/ip_forward

2、启用 tun 设备

1
sudo modprobe tun

检查确认是否启用成功

1
ls /dev/net/tun
开始

这里假设我们要建立的虚拟网名称为hnvps 以下为配置完成的配置文件目录结构

1
2
3
4
5
6
7
8
9
/etc/tinc
└── hnvps
├── hosts
│ ├── hnvps
│ └── openwrt
├── rsa_key.priv
├── tinc.conf
├── tinc-down
└── tinc-up

文件说明

  • tinc.conf 为 tincnet 的配置文件,
  • tinc-up 为启动该网络时自动执行的脚本
  • tinc-down 为关闭该网络时自动执行的脚本
  • hosts 文件夹保存着各个节点(路由器)的信息。
1
2
3
# 建立配置文件储存目录
mkdir /etc/tinc/hnvps
mkdir /etc/tinc/hnvps/hosts

image-1647766497412

image-1647766497412

设置配置文件/etc/tinc/hnvps/tinc.conf

1
2
3
4
5
6
7
8
Name = hnvps
Interface = tinc
Autoconnect = yes
Compression=9
Cipher = aes-256-cbc
Digest = sha256
#绑定的端口
BindToAddress = * 10010

编写启动虚拟交换器脚本/etc/tinc/hnvps/tinc-up

1
2
3
4
#!/bin/sh
ip link set $INTERFACE up
ip addr add 10.100.1.105/24 dev $INTERFACE
ip route add 10.100.1.0/24 dev $INTERFACE

编写错误关闭的脚本/etc/tinc/hnvps/tinc-down

1
2
3
4
#!/bin/sh
ip route del 10.100.1.0/24 dev $INTERFACE
ip addr del 10.100.1.105/24 dev $INTERFACE
ip link set $INTERFACE down

赋予脚本权限:

1
chmod +x /etc/tinc/hnvps/tinc-*

编写主节点的详细信息/etc/tinc/hnvps/hosts/hnvps

1
2
3
4
5
# 主节点公网IP地址
Address = 1.1.1.1
# 主节点内网地址
Subnet = 10.100.1.105/32
Port = 10010

生成密钥信息

1
cd /etc/tinc/hnvps/hosts

执行下面命令后需要输入两次回车确认

1
tinc -n hnvps generate-rsa-keys

执行下面命令后需要输入两次回车确认

1
tinc -n hnvps generate-ed25519-keys

放行防火墙

1
ufw allow 10010

创建服务

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
echo '
# This is a mostly empty service, but allows commands like stop, start, reload
# to propagate to all tinc@ service instances.

[Unit]
Description=Tinc VPN
Documentation=info:tinc
Documentation=man:tinc(8) man:tinc.conf(5)
Documentation=http://tinc-vpn.org/docs/
After=network.target
Wants=network.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/true
ExecReload=/bin/true
WorkingDirectory=/usr/local/etc/tinc

[Install]
WantedBy=multi-user.target' > /lib/systemd/system/tinc.service

echo '
[Unit]
Description=Tinc net %i
Documentation=info:tinc
Documentation=man:tinc(8) man:tinc.conf(5)
Documentation=http://tinc-vpn.org/docs/
PartOf=tinc.service
ReloadPropagatedFrom=tinc.service

[Service]
Type=simple
WorkingDirectory=/usr/local/etc/tinc/%i
ExecStart=/usr/local/sbin/tincd -n %i -D
ExecReload=/usr/local/sbin/tincd -n %i reload
KillMode=mixed
Restart=on-failure
RestartSec=5
TimeoutStopSec=5

[Install]
WantedBy=tinc.service' > /lib/systemd/system/tinc@.service
# 刷新服务
sudo systemctl unmask tinc

2) 子节点安装

环境:Openwrt 21.02 网络:10.0.0.0/24 内网IP:10.0.0.1 虚拟网络IP: 10.100.1.1 虚拟网络名:openwrt 由于部分固件并没有Tinc 需要自己手工安装

  • 方法一、
1
2
opkg update
opkg install tinc

安装过程与主节点基本一致 开始(已安装tinc): 1、建立配置文件夹

1
mkdir -p /etc/tinc/openwrt/hosts/

1、配置/etc/tinc/openwrt/tinc.conf

1
2
3
4
5
6
7
8
9
Name = openwrt
Interface = tinc
#Mode = switch
Autoconnect = yes
Compression=9
Cipher = aes-256-cbc
Digest = sha256
BindToAddress = * 10010
Device = /dev/net/tun

2、配置/etc/tinc/openwrt/tinc-up: 这里有区别的是,我想让虚拟网内机器能访问到Openwrt 路由网段10.0.0.0/24内网资源,所以这里

1
2
3
4
5
6
7
#!/bin/sh
ip link set $INTERFACE up
ip addr add 10.100.1.1/32 dev $INTERFACE
ip route add 10.100.1.0/24 dev $INTERFACE
iptables -A FORWARD -o "${INTERFACE}" -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i "${INTERFACE}" -j ACCEPT
iptables -t nat -A POSTROUTING -s "10.100.1.0"/"255.255.255.0" ! -o "${INTERFACE}" -j MASQUERADE

3、配置/etc/tinc/openwrt/tinc-down

1
2
3
4
5
6
7
#!/bin/sh
ip route del 10.100.1.0/24 dev $INTERFACE
ip addr del 10.100.1.1/32 dev $INTERFACE
iptables -D FORWARD -o "${INTERFACE}" -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
iptables -D FORWARD -i "${INTERFACE}" -j ACCEPT
iptables -t nat -D POSTROUTING -s "10.100.1.0"/"255.255.255.0" ! -o "${INTERFACE}" -j MASQUERADE
ip link set $INTERFACE down

4、配置节点信息/etc/tinc/openwrt/hosts/openwrt:

1
2
3
4
5
# 分配给OPENWRT的虚拟LANIP
Subnet=10.100.1.1/32
# 路由器所在的网段
Subnet=10.0.0.0/24
Port = 10010

5、赋予脚本权限:

1
chmod +x /etc/tinc/openwrt/tinc-*

6、接下来创建密钥信息,在询问保存位置时直接回车使用默认位置即可:

1
2
tinc -n openwrt generate-rsa-keys
tinc -n openwrt generate-ed25519-keys

7、复制主节点中的/etc/tinc/hnvps/hosts/hnvps到openwrt 路由器节点的/etc/tinc/openwrt/hosts目录下。复制路由器的/etc/tinc/openwrt/hosts/openwrt到主节点的/etc/tinc/hnvps/hosts/目录下 此时路由器openwrt 的 /etc/tinc/openwrt/ 目录下的情况为:

1
2
3
4
5
6
7
8
├── ed25519_key.priv
├── hosts/
│ └── openwrt
│ └── hnvps
├── rsa_key.priv
├── tinc-down
├── tinc-up
└── tinc.conf

最后需要编辑 /etc/config/tinc 文件:

1
2
3
4
5
6
7
config tinc-net openwrt
option enabled 1
option Name openwrt

config tinc-host openwrt
option enabled 1
option net openwrt

启动服务

1
/etc/init.d/tinc start

系统配置

修改软件源为国内镜像,加快软件下载速度

1
sudo pacman-mirrors -i -c China -m rank

更新软件列表和软件

1
sudo pacman -Syyuu

image.png

image.png

添加archlinuxcn源

ArchLinuxCN是Arch中文组维护的一个软件合集,包含了中文用户常用的WPS Office、搜狗拼音、Google Chrome等软件。不过系统默认都不包含这个源,因此我们需要手动来配置使用这个源。

1
echo -e "\n[archlinuxcn]\nSigLevel = TrustAll\nServer = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/\$arch\nServer = https://mirrors.163.com/archlinux-cn/\$arch\nServer = https://repo.huaweicloud.com/archlinuxcn/\$arch\n"  sudo tee -a /etc/pacman.conf

image.png

image.png

安装密钥

1
sudo pacman -S archlinuxcn-keyring

image.png

image.png

更新软件列表和软件

1
sudo pacman -Syyuu

源地址参考

  1. 浙江大学: https://mirrors.zju.edu.cn/archlinuxcn/$arch
  2. 中国科学技术大学 :https://mirrors.ustc.edu.cn/archlinuxcn/$arch
  3. 清华大学:https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch
  4. 网易 : https://mirrors.163.com/archlinux-cn/$arch

运行环境安装

1
sudo pacman -S clang make cmake gdb git base-devel net-tools curl sqlite dlang pkg-config sqlite ldc

安装Yaourt和Yay

1
2
sudo pacman -S yaourt yay
yay --aururl "https://aur.tuna.tsinghua.edu.cn" --save

时间同步问题

1
2
3
4
sudo pacman -S ntp
sudo ntpdate cn.ntp.org.cn
sudo hwclock --systohc
timedatectl set-ntp true

解决Windows和Linux双系统时间不一致问题

1
sudo timedatectl set-local-rtc 1 

解决系统中文乱码

安装中文字体:

1
sudo pacman -S wqy-zenhei ttf-fireflysung firefox-i18n-zh-cn thunderbird-i18n-zh-cn gimp-help-zh_cn man-pages-zh_cn wqy-microhei-lite wqy-bitmapfont adobe-source-han-sans-cn-fonts adobe-source-han-serif-cn-fonts noto-fonts-cjk wqy-microhei ttf-roboto noto-fonts ttf-dejavu && sudo fc-cache -fv && sudo locale-gen

然后系统设置里面添加中文语言包,然后本地化设置将中文设置为默认语言,重启即可

图标主题安装

1
2
3
4
sudo pacman -S gtk-engine-murrine gtk-engines
sudo pacman -S Adapta-gtk-theme-colorpack
sudo pacman -S Adapta-gtk-theme
sudo pacman -S papirus-icon-theme

输入法解决

安装Fcitx5中文输入法:

1
sudo pacman -S fcitx5 fcitx5-qt fcitx5-gtk fcitx5-configtool fcitx5-rime fcitx5-chinese-addons fcitx5-chewing fcitx5-pinyin-moegirl

修改Fcitx5主题

1
2
3
4
5
6
7
git clone https://github.com/tonyfettes/fcitx5-nord.git
mkdir -p ~/.local/share/fcitx5/themes/
cd && cd fcitx5-nord
cp -r Nord-Dark/ Nord-Light ~/.local/share/fcitx5/themes/
cd && rm -rf fcitx5-nord
git clone https://github.com/thep0y/fcitx5-themes.git
cd fcitx5-themes && cp -r winter/ ~/.local/share/fcitx5/themes

需要修改~/.config/fcitx5/conf/classicui.conf 文件为以下内容

1
nano ~/.config/fcitx5/conf/classicui.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# 垂直候选列表
Vertical Candidate List=False
# 按屏幕 DPI 使用
PerScreenDPI=True
# 使用鼠标滚轮翻页
WheelForPaging=True
# 字体
Font="思源黑体 CN 12"
# 菜单字体
MenuFont="Sans Serif 10"
# 使用输入法的语言来显示文字
UseInputMethodLangaugeToDisplayText=True
# 主题
Theme=winter

修改~/.config/fcitx5/conf/pinyin.conf 内容为以下附件内容

1
https://cdn.nextrt.com/blog/pinyin_1623636543395.conf

修改系统设置使Fcitx5生效

1
nano /etc/profile
1
2
3
4
5
6
export LC_ALL=zh_CN.UTF-8
export INPUT_METHOD="fcitx5"
export XMODIFIERS="@im=fcitx5"
export GTK_IM_MODULE="fcitx5"
export QT_IM_MODULE="fcitx5"
ulimit -HSn 102400

开发环境及工具

Java

安装JDK

1
sudo pacman -S jdk8-openjdk jdk11-openjdk jdk-openjdk

切换java 版本

1
2
archlinux-java status
sudo archlinux-java set java-11-openjdk

安装Intellij-Idea

1
sudo pacman -S intellij-idea-ultimate-edition

Android

###安装AndroidStudio以及安卓开发需要组件

1
2
3
sudo pacman -S android-studio
sudo pacman -S android-sdk-platform-tools
sudo pacman -S android-tools

Go Nodejs Npm

1
sudo pacman -S go nodejs npm

Python

安装Anaconda

1
sudo pacman -S anaconda

安装pyenv

1
sudo pacman -S pyenv

安装Pytcharm

1
sudo pacman -S pycharm

安装VSCODE

1
sudo pacman -S visual-studio-code-bin

其他软件

Typora MD编辑工具

1
sudo  pacman -S typora

安装微软EDGE浏览器

1
yay -S microsoft-edge-dev-bin

aria2

1
sudo pacman -S aria2

mailspring

1
sudo pacman -S mailspring

onedrive

1
2
sudo pacman -S libnotify
pamac build onedrive-abraunegg

kate 文本编辑器

1
sudo pacman -S kate

QQ音乐

1
yay -S qqmusic-bin

ToDesk 远程控制

1
yay -S todesk-bin

Chrome浏览器

1
sudo pacman -S google-chrome

wps

1
yay -S wps-office ttf-wps-fonts

网易音乐云

1
sudo pacman -S netease-cloud-music

压缩解压缩

1
sudo pacman -S file-roller unrar unzip p7zip 

motrix

1
yay -S motrix-bin

utools

1
yay -S utools

screenfetch

1
2
sudo pacman -S screenfetch
screenfetch -A 'Arch Linux'

百度网盘

1
yay -S baidunetdisk-bin

准备

  1. 服务域名。
  2. 服务域名对应的SSL证书。
  3. 一台服务器。

安装环境

系统: Centos 7 配置信息:1H/2G/5M

架构

Unbound

Unbound负责解析、缓、转发查询、 DNS-OVER-TLS

DOH Server

提供 DNS-OVER-HTTP 服务

NGINX

将DNS-OVER-HTTP转DNS-OVER-HTTPS

安装

1、配置安装环境

1
2
3
4
5
6
7
8
yum install -y crontabs
yum install -y wget gcc tar zip redhat-lsb gawk unzip net-tools psmisc glibc-static expect telnet
yum install -y openssl openssl-devel lzo lzo-devel pam pam-devel automake
yum install -y autoconf libtool make build-essential curl curl-devel zlib-devel perl perl-devel perl-core cpio expat-devel gettext-devel git asciidoc xmlto
yum -y install epel-release bind-util libevent libevent-devel
yum install python-setuptools -y && easy_install pip
yum install python-devel libffi-devel -y
yum group install 'Development Tools' -y

2、安装Go

dns-over-https 服务基于Go语言编写,所以需要安装GO语言环境。 下面的Go是Linux x86-64的安装包,如果你得机器是其他架构,请到https://studygolang.com/dl选择自己机器对应的安装包。

1
2
3
4
5
6
7
wget https://studygolang.com/dl/golang/go1.18.2.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.18.2.linux-amd64.tar.gz && rm -rf go1.18.2.linux-amd64.tar.gz
mkdir -p /root/go
echo 'export GOROOT=/usr/local/go
export PATH=$PATH:$GOROOT/bin
export GOPATH=/root/go' >>/etc/profile
source /etc/profile

安装Go

安装Go

配置国内镜像,国外服务器跳过下面步骤

1
2
go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.cn,direct

配置国内镜像源

配置国内镜像源

3、安装libsodium

1
2
3
4
5
6
7
cd /root
wget -N --no-check-certificate https://cdn.nextrt.com/dns/soft/libsodium-1.0.18.tar.gz
tar xf libsodium-1.0.18.tar.gz && cd libsodium-1.0.18
./configure && make -j2 && make install
echo /usr/local/lib >/etc/ld.so.conf.d/usr_local_lib.conf
ldconfig
rm -rf ../libsodium-1.0.18*

安装libsodium

安装libsodium

4、安装DOH Server

1
2
3
4
5
6
cd /root
git clone https://github.com/m13253/dns-over-https.git
cd dns-over-https
make && make install
systemctl start doh-server.service
systemctl enable doh-server.service

安装DOH Server

安装DOH Server

5、安装Unbound

1
2
3
4
5
6
7
wget https://nlnetlabs.nl/downloads/unbound/unbound-1.15.0.tar.gz --no-check-certificate
tar -zxvf unbound-1.15.0.tar.gz && rm -rf unbound-1.15.0.tar.gz && cd unbound-1.15.0 && ./configure --enable-subnet --with-libevent --with-pthreads --with-ssl --enable-dnscrypt
make && sudo make install
curl -o /usr/local/etc/unbound/root.hints ftp://ftp.internic.net/domain/named.cache
/sbin/ldconfig -v
unbound-anchor
mkdir /etc/unbound

安装Unbound

安装Unbound

配置

配置Unbound

以下是部分需要自己配置的地方文件说明

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
server:
verbosity: 1
interface: 0.0.0.0@50 #监听50端口,用于普通查询
interface: 0.0.0.0@853 #监听853端口,用于提供DNS-over-TLS
do-ip6: no #如果你有ipv6网络,可以将no改为yes
num-threads: CPU核心数
msg-cache-slabs: CPU核心数
rrset-cache-slabs: CPU核心数
key-cache-slabs: CPU核心数
infra-cache-slabs: CPU核心数

include: "/etc/unbound/insecure.conf" #国内机器需要跳过某些域名的DNSSEC校验,国外机器删除此行
tls-port: 853 #DOT端口,不需要DOT删除此行
tls-service-key: "TLSKEY" #SSL密钥文件路径,不需要DOT删除此行
tls-service-pem: "TLSCERT" #SSL证书文件路径,不需要DOT删除此行

include: "/etc/unbound/forward.conf" #国内机器需要转发部分域名的查询,国外机器删除此行
include: "/etc/unbound/domestic.conf" #国内外机器都需要对某些高防DNS查询请求进行转发

国内机器配置文件参考

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
server:
verbosity: 1
interface: 0.0.0.0@50
interface: 0.0.0.0@853
username: "root"
access-control: 0.0.0.0/0 allow
access-control: ::1 allow
do-ip4: yes
do-ip6: no
do-udp: yes
do-tcp: yes

num-threads: 1
msg-cache-slabs: 1
rrset-cache-slabs: 1
key-cache-slabs: 1
infra-cache-slabs: 1

log-servfail: yes
aggressive-nsec: yes
hide-trustanchor: yes
hide-version: yes
hide-identity: yes
qname-minimisation: yes
qname-minimisation-strict: no
minimal-responses: yes
rrset-roundrobin: yes
so-reuseport: yes
do-not-query-localhost: yes
infra-cache-numhosts: 10000
so-rcvbuf: 8m
so-sndbuf: 8m
neg-cache-size: 32m
msg-cache-size: 64m
key-cache-size: 64m
neg-cache-size: 32m
rrset-cache-size: 128m

outgoing-range: 8192
num-queries-per-thread: 4096
outgoing-num-tcp: 1024
incoming-num-tcp: 2048
jostle-timeout: 300

cache-min-ttl: 120
cache-max-ttl: 86400
infra-host-ttl: 3600
serve-expired-ttl: 86400
cache-max-negative-ttl: 360
serve-expired: yes
prefetch: yes
prefetch-key: yes
max-udp-size: 4096
edns-buffer-size: 4096
send-client-subnet: 0.0.0.0/0
send-client-subnet: ::0/0
max-client-subnet-ipv6: 56
max-client-subnet-ipv4: 24
client-subnet-always-forward: yes
module-config: "subnetcache validator iterator"
root-hints: "root.hints"
auto-trust-anchor-file: "/usr/local/etc/unbound/root.key"
tls-cert-bundle: "/etc/pki/tls/certs/ca-bundle.crt"

minimal-responses: yes
include: "/etc/unbound/insecure.conf"
tls-port: 853
tls-service-key: "/www/server/panel/vhost/cert/dns.233py.com/privkey.pem"
tls-service-pem: "/www/server/panel/vhost/cert/dns.233py.com/fullchain.pem"

include: "/etc/unbound/forward.conf"
include: "/etc/unbound/domestic.conf"

国外机器请删除上面文件

1
2
include: "/etc/unbound/forward.conf"
include: "/etc/unbound/insecure.conf"

配置DNS-OVER-HTTP

编辑/etc/dns-over-https/doh-server.conf修改内容为下方所示

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# HTTP listen port
listen = [
"127.0.0.1:8053",
"[::1]:8053",
]
local_addr = ""
cert = ""
key = ""
path = "/dns-query"
upstream = [
"udp:127.0.0.1:50"
]

timeout = 6
tries = 3
verbose = false
log_guessed_client_ip = false

配置文件自动更新

因为高防dns列表和转发列表可能每天都在更新所以需要添加一个定时任务来执行以下脚本,具体怎么添加不做赘述,请自行添加。

1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash
echo Restart DNS Serve...
echo "更新转发配置文件"
curl -o /etc/unbound/forward.conf https://download.233py.com/dns/update/forward.conf
curl -o /etc/unbound/domestic.conf https://download.233py.com/dns/update/domestic.conf
curl -o /etc/unbound/insecure.conf https://download.233py.com/dns/update/insecure.conf
echo "重启Unbound"
killall unbound
unbound -v
echo "重启DOH"
systemctl restart doh-server.service
echo "重启完成"
exit 0;

进程检查,防止宕机

每分钟运行下面脚本,防止Unbound进程挂了。

1
2
3
4
5
#!/bin/bash
PIDS=`ps -ef grep unbound grep -v grep awk '{print $1}'`
if [ "$PIDS" == "" ]; then
unbound -v
fi

放行防火墙

1
2
3
4
5
firewall-cmd --permanent --zone=public --add-port=853/tcp
firewall-cmd --permanent --zone=public --add-port=443/tcp
firewall-cmd --permanent --zone=public --add-port=80/tcp
firewall-cmd --reload
setenforce 0

配置Nginx

之前dns-over-https服务只是实现dns-over-http而https工作交由nginx来实现。 在nginx配置文件中添加以下内容

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 location /dns-query {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-NginX-Proxy true;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_redirect off;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 86400;
proxy_pass http://127.0.0.1:8053/dns-query;

add_header X-Cache $upstream_cache_status;
proxy_ignore_headers Set-Cookie Cache-Control expires;
proxy_cache cache_one;
proxy_cache_key $remote_addr$uri$is_args$args;
proxy_cache_valid 200 304 301 302 1m;
expires 12h;
}
0%