Archived
更新脚本名称 & 备注信息
This commit is contained in:
+5
-5
@@ -253,16 +253,16 @@ $ sudo curl -LR -o /etc/smartdns.d/anti-ad.smartdns.conf https://anti-ad.net/ant
|
||||
|
||||
```bash
|
||||
## 下载加速规则安装脚本
|
||||
$ sudo curl -LR -o /usr/local/bin/smartdns-plugin.sh https://gitee.com/callmer/smartdns_china_list_installer/raw/main/smartdns_plugin.sh
|
||||
$ sudo curl -LR -o /usr/local/bin/smartdns-cnlist https://gitee.com/callmer/smartdns_china_list_installer/raw/main/smartdns-china-list-installer.sh
|
||||
|
||||
## 设置脚本可执行权限
|
||||
$ sudo chmod +x /usr/local/bin/smartdns-plugin.sh
|
||||
$ sudo chmod +x /usr/local/bin/smartdns-cnlist
|
||||
|
||||
## 设置脚本文件防篡改
|
||||
$ sudo chattr +i /usr/local/bin/smartdns-plugin.sh
|
||||
$ sudo chattr +i /usr/local/bin/smartdns-cnlist
|
||||
|
||||
## 执行脚本
|
||||
$ sudo /usr/local/bin/smartdns-plugin.sh
|
||||
$ sudo /usr/local/bin/smartdns-cnlist
|
||||
```
|
||||
|
||||
### 6.2.定时任务
|
||||
@@ -292,7 +292,7 @@ $ sudo crontab -e
|
||||
|
||||
20 9 * * * /usr/bin/curl --retry-connrefused --retry 5 --retry-delay 5 --retry-max-time 60 -fsSLR -o /etc/smartdns.d/anti-ad.smartdns.conf https://anti-ad.net/anti-ad-for-smartdns.conf
|
||||
|
||||
30 9 * * * /usr/local/bin/smartdns-plugin.sh
|
||||
30 9 * * * /usr/local/bin/smartdns-cnlist
|
||||
```
|
||||
|
||||
### 6.3. SmartDNS 主配置
|
||||
|
||||
+8
-4
@@ -602,13 +602,17 @@ $ sudo systemctl restart dnsmasq.service
|
||||
|
||||
```bash
|
||||
## 创建 tailscale-nic-optim 优化脚本
|
||||
$ sudo editor /usr/local/bin/tailscale-nic-optim.sh
|
||||
$ sudo editor /usr/local/bin/tailscale-nic-optim
|
||||
```
|
||||
|
||||
在脚本文件中输入以下内容,并保存。
|
||||
|
||||
```bash
|
||||
#!/bin/sh
|
||||
#
|
||||
# This script is customized by fox,
|
||||
# Optimize NIC offload parameters for local TS server.
|
||||
#
|
||||
|
||||
ETHTOOL_PATH=$(command -v ethtool)
|
||||
|
||||
@@ -642,10 +646,10 @@ fi
|
||||
|
||||
```bash
|
||||
## 设置脚本可执行权限
|
||||
$ sudo chmod +x /usr/local/bin/tailscale-nic-optim.sh
|
||||
$ sudo chmod +x /usr/local/bin/tailscale-nic-optim
|
||||
|
||||
## 设置脚本文件防篡改
|
||||
$ sudo chattr +i /usr/local/bin/tailscale-nic-optim.sh
|
||||
$ sudo chattr +i /usr/local/bin/tailscale-nic-optim
|
||||
```
|
||||
|
||||
进一步创建 `tailscale-nic-optim` 服务配置文件,以满足系统自动化设置需求。
|
||||
@@ -670,7 +674,7 @@ Before=tailscaled.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/local/bin/tailscale-nic-optim.sh
|
||||
ExecStart=/usr/local/bin/tailscale-nic-optim
|
||||
RemainAfterExit=yes
|
||||
StandardOutput=journal
|
||||
|
||||
|
||||
@@ -10,5 +10,5 @@
|
||||
|
||||
20 9 * * * /usr/bin/curl --retry-connrefused --retry 5 --retry-delay 5 --retry-max-time 60 -fsSLR -o /etc/smartdns.d/anti-ad.smartdns.conf https://anti-ad.net/anti-ad-for-smartdns.conf
|
||||
|
||||
30 9 * * * /usr/local/bin/smartdns-plugin.sh
|
||||
30 9 * * * /usr/local/bin/smartdns-cnlist
|
||||
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# SmartDNS China List Installer
|
||||
# Install and update China domain rules for SmartDNS.
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
WORKDIR="$(mktemp -d)"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#!/usr/sbin/nft -f
|
||||
|
||||
#
|
||||
# This configuration file is customized by fox,
|
||||
# Optimize nftables rules for local TS server.
|
||||
#
|
||||
|
||||
table inet router
|
||||
flush table inet router
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# This script is customized by fox,
|
||||
# Optimize NIC offload parameters for local TS server.
|
||||
#
|
||||
|
||||
ETHTOOL_PATH=$(command -v ethtool)
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ Before=tailscaled.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/local/bin/tailscale-nic-optim.sh
|
||||
ExecStart=/usr/local/bin/tailscale-nic-optim
|
||||
RemainAfterExit=yes
|
||||
StandardOutput=journal
|
||||
|
||||
|
||||
Reference in New Issue
Block a user