2023-11-03 17:27:01 +08:00
|
|
|
|
# **更新内容**
|
|
|
|
|
- **添加 WireGuard 解锁 YouTube 选项。**
|
|
|
|
|
- **添加节点管理选项,支持删除任意节点的配置,包括服务端与客户端配置文件。**
|
|
|
|
|
- **删除节点配置仅支持Version:1.0及之后的版本。**
|
|
|
|
|
- **其它优化与修复。**
|
|
|
|
|
|
2023-09-04 15:59:58 +08:00
|
|
|
|
# **说明**
|
2023-10-12 13:38:55 +08:00
|
|
|
|
- **脚本使用sing-box、Juicity内核。**
|
2023-09-04 16:17:28 +08:00
|
|
|
|
- **脚本支持IPV6单栈机。**
|
|
|
|
|
- **脚本支持 CentOS 8+、Debian 10+、Ubuntu 20+ 操作系统。**
|
2023-11-03 17:27:01 +08:00
|
|
|
|
- **脚本支持 warp 解锁 ChatGPT、Netflix、Disney+、YouTube。**
|
2023-10-12 13:38:55 +08:00
|
|
|
|
- **脚本所有协议均支持自签证书(NaiveProxy除外)。**
|
2023-09-18 16:49:08 +08:00
|
|
|
|
- **脚本支持多用户。**
|
2023-10-12 13:38:55 +08:00
|
|
|
|
- **脚本支持所有协议共存。**
|
2023-10-15 16:28:06 +08:00
|
|
|
|
- **脚本支持自动续签证书。**
|
2023-09-24 10:11:48 +08:00
|
|
|
|
- **脚本支持生成Clash客户端配置文件,需要配合Meta内核。**
|
2023-09-18 17:03:51 +08:00
|
|
|
|
- **脚本支持生成sing-box客户端配置文件。**
|
2023-09-26 17:11:19 +08:00
|
|
|
|
- **电脑端使用方法:下载生成的win_client.json文件====>>V2rayN客户端添加自定义配置服务器====>>地址加载生成的win_client.json文件====>>Core类型选sing_box====>>Socks端口1080。**
|
|
|
|
|
- **手机端使用方法:下载生成的phone_client.json文件====>>手机下载sing-box官方客户端====>>Profiles点击New profile====>>name自己命名====>>Source选择Import====>>点击Import File====>>选择下载的phone_client.json文件。**
|
2023-07-29 17:19:25 +08:00
|
|
|
|
|
2023-09-04 15:59:58 +08:00
|
|
|
|
# **安装**
|
|
|
|
|
- **Debian&&Ubuntu使用以下命令安装依赖**
|
2023-07-29 17:19:25 +08:00
|
|
|
|
```
|
2023-10-23 15:39:02 +08:00
|
|
|
|
apt update && apt -y install curl wget tar socat jq git openssl uuid-runtime build-essential zlib1g-dev libssl-dev libevent-dev dnsutils cron
|
2023-07-29 17:19:25 +08:00
|
|
|
|
```
|
2023-09-04 15:59:58 +08:00
|
|
|
|
- **CentOS使用以下命令安装依赖**
|
2023-07-29 17:19:25 +08:00
|
|
|
|
```
|
2023-10-23 15:39:02 +08:00
|
|
|
|
yum update && yum -y install curl wget tar socat jq git openssl util-linux gcc-c++ zlib-devel openssl-devel libevent-devel bind-utils cronie
|
2023-07-29 17:19:25 +08:00
|
|
|
|
```
|
2023-09-04 15:59:58 +08:00
|
|
|
|
- **使用以下命令运行脚本**
|
2023-07-29 17:19:25 +08:00
|
|
|
|
```
|
2023-10-16 09:49:43 +08:00
|
|
|
|
wget -N -O /root/singbox.sh https://raw.githubusercontent.com/TinrLin/sing-box/main/Install.sh && chmod +x /root/singbox.sh && ln -sf /root/singbox.sh /usr/local/bin/singbox && bash /root/singbox.sh
|
2023-07-29 17:19:25 +08:00
|
|
|
|
```
|
2023-09-04 15:59:58 +08:00
|
|
|
|
# **Hysteria端口跳跃**
|
|
|
|
|
```
|
|
|
|
|
# Debian&&Ubuntu
|
2023-09-04 16:08:48 +08:00
|
|
|
|
|
|
|
|
|
## 安装iptables-persistent
|
2023-09-04 15:59:58 +08:00
|
|
|
|
apt install iptables-persistent
|
2023-09-04 16:08:48 +08:00
|
|
|
|
|
2023-09-04 16:29:11 +08:00
|
|
|
|
## 清空默认规则
|
2023-09-04 15:59:58 +08:00
|
|
|
|
iptables -F
|
2023-09-04 16:08:48 +08:00
|
|
|
|
|
2023-09-04 16:29:11 +08:00
|
|
|
|
## 清空自定义规则
|
2023-09-04 15:59:58 +08:00
|
|
|
|
iptables -X
|
2023-09-04 16:08:48 +08:00
|
|
|
|
|
|
|
|
|
## 允许本地访问
|
2023-09-04 15:59:58 +08:00
|
|
|
|
iptables -A INPUT -i lo -j ACCEPT
|
2023-09-04 16:08:48 +08:00
|
|
|
|
|
2023-09-04 16:29:11 +08:00
|
|
|
|
## 开放SSH端口(假设SSH端口为22)
|
2023-09-04 15:59:58 +08:00
|
|
|
|
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
2023-09-04 16:08:48 +08:00
|
|
|
|
|
2023-09-04 16:29:11 +08:00
|
|
|
|
## 开放HTTP端口
|
2023-09-04 15:59:58 +08:00
|
|
|
|
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
|
2023-09-04 16:08:48 +08:00
|
|
|
|
|
2023-09-04 16:29:11 +08:00
|
|
|
|
## 开放UDP端口(10010替换为节点的监听端口)
|
2023-09-04 15:59:58 +08:00
|
|
|
|
iptables -A INPUT -p udp --dport 10010 -j ACCEPT
|
2023-09-04 16:08:48 +08:00
|
|
|
|
|
2023-09-04 16:29:11 +08:00
|
|
|
|
## 开放UDP端口范围(假设UDP端口范围为20000-40000)
|
2023-09-04 15:59:58 +08:00
|
|
|
|
iptables -A INPUT -p udp --dport 20000:40000 -j ACCEPT
|
2023-09-04 16:08:48 +08:00
|
|
|
|
|
|
|
|
|
## 允许接受本机请求之后的返回数据
|
2023-09-04 15:59:58 +08:00
|
|
|
|
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
|
2023-09-04 16:08:48 +08:00
|
|
|
|
|
|
|
|
|
## 其他入站一律禁止
|
2023-09-04 15:59:58 +08:00
|
|
|
|
iptables -P INPUT DROP
|
2023-09-04 16:08:48 +08:00
|
|
|
|
|
|
|
|
|
## 允许所有出站
|
2023-09-04 15:59:58 +08:00
|
|
|
|
iptables -P OUTPUT ACCEPT
|
2023-09-04 16:08:48 +08:00
|
|
|
|
|
|
|
|
|
## 查看开放的端口
|
2023-09-04 15:59:58 +08:00
|
|
|
|
iptables -L
|
2023-09-04 16:08:48 +08:00
|
|
|
|
|
|
|
|
|
## 添加NAT规则,20000:40000替换为你设置端口跳跃的范围,10010替换为你节点的监听端口
|
2023-09-04 15:59:58 +08:00
|
|
|
|
iptables -t nat -A PREROUTING -p udp --dport 20000:40000 -j DNAT --to-destination :10010
|
2023-09-04 16:08:48 +08:00
|
|
|
|
|
|
|
|
|
## 查看NAT规则
|
2023-09-04 15:59:58 +08:00
|
|
|
|
iptables -t nat -nL --line
|
2023-09-04 16:08:48 +08:00
|
|
|
|
|
|
|
|
|
## 保存iptables规则
|
2023-09-04 15:59:58 +08:00
|
|
|
|
netfilter-persistent save
|
|
|
|
|
```
|
2023-09-04 16:29:11 +08:00
|
|
|
|
```
|
|
|
|
|
# CentOS
|
|
|
|
|
## 安装iptables-service
|
|
|
|
|
yum install iptables-services
|
|
|
|
|
|
|
|
|
|
## 启用iptables服务
|
|
|
|
|
systemctl enable iptables
|
|
|
|
|
|
|
|
|
|
## 启动iptables服务
|
|
|
|
|
systemctl start iptables
|
|
|
|
|
|
|
|
|
|
## 清空默认规则
|
|
|
|
|
iptables -F
|
|
|
|
|
|
|
|
|
|
## 清空自定义规则
|
|
|
|
|
iptables -X
|
|
|
|
|
|
|
|
|
|
## 允许本地访问
|
|
|
|
|
iptables -A INPUT -i lo -j ACCEPT
|
|
|
|
|
|
|
|
|
|
## 开放SSH端口(假设SSH端口为22)
|
|
|
|
|
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
|
|
|
|
|
|
|
|
|
|
## 开放HTTP端口
|
|
|
|
|
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
|
|
|
|
|
|
|
|
|
|
## 开放UDP端口(10010替换为节点的监听端口)
|
|
|
|
|
iptables -A INPUT -p udp --dport 10010 -j ACCEPT
|
|
|
|
|
|
|
|
|
|
## 开放UDP端口范围(假设UDP端口范围为20000-40000)
|
|
|
|
|
iptables -A INPUT -p udp --dport 20000:40000 -j ACCEPT
|
|
|
|
|
|
|
|
|
|
## 允许接受本机请求之后的返回数据
|
|
|
|
|
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
|
|
|
|
|
|
|
|
|
|
## 其他入站一律禁止
|
|
|
|
|
iptables -P INPUT DROP
|
|
|
|
|
|
|
|
|
|
## 允许所有出站
|
|
|
|
|
iptables -P OUTPUT ACCEPT
|
|
|
|
|
|
|
|
|
|
## 查看开放的端口
|
|
|
|
|
iptables -L
|
|
|
|
|
|
|
|
|
|
## 添加NAT规则,20000:40000替换为你设置端口跳跃的范围,10010替换为你节点的监听端口
|
|
|
|
|
iptables -t nat -A PREROUTING -p udp --dport 20000:40000 -j DNAT --to-destination :10010
|
|
|
|
|
|
|
|
|
|
## 查看NAT规则
|
|
|
|
|
iptables -t nat -nL --line
|
|
|
|
|
|
|
|
|
|
## 保存iptables规则
|
|
|
|
|
service iptables save
|
|
|
|
|
```
|
|
|
|
|
|
2023-09-04 15:59:58 +08:00
|
|
|
|
# **脚本支持的节点类型**
|
2023-10-23 16:24:24 +08:00
|
|
|
|
- **SOCKS**
|
2023-07-29 17:19:25 +08:00
|
|
|
|
- **TUIC V5**
|
2023-10-23 16:25:09 +08:00
|
|
|
|
- **Juicity**
|
2023-09-18 16:49:08 +08:00
|
|
|
|
- **WireGuard--解锁 ChatGPT、Netflix、Disney+**
|
2023-09-04 11:24:51 +08:00
|
|
|
|
- **Hysteria2**
|
2023-10-23 16:24:24 +08:00
|
|
|
|
- **VLESS+TCP**
|
|
|
|
|
- **VLESS+WebSocket**
|
|
|
|
|
- **VLESS+gRPC**
|
|
|
|
|
- **VLESS+Vision+REALITY**
|
|
|
|
|
- **VLESS+H2C+REALITY**
|
|
|
|
|
- **VLESS+gRPC+REALITY**
|
2023-09-08 15:05:42 +08:00
|
|
|
|
- **Direct--sing-box版任意门**
|
2023-10-23 16:24:24 +08:00
|
|
|
|
- **Trojan+TCP**
|
|
|
|
|
- **Trojan+WebSocket**
|
2023-10-12 13:38:55 +08:00
|
|
|
|
- **Trojan+gRPC**
|
2023-10-23 16:24:24 +08:00
|
|
|
|
- **Trojan+TCP+TLS**
|
|
|
|
|
- **Trojan+H2C+TLS**
|
|
|
|
|
- **Trojan+gRPC+TLS**
|
|
|
|
|
- **Trojan+WebSocket+TLS**
|
2023-07-29 17:19:25 +08:00
|
|
|
|
- **Hysteria**
|
|
|
|
|
- **ShadowTLS V3**
|
|
|
|
|
- **NaiveProxy**
|
|
|
|
|
- **Shadowsocks**
|
2023-10-23 16:24:24 +08:00
|
|
|
|
- **VMess+TCP**
|
|
|
|
|
- **VMess+WebSocket**
|
|
|
|
|
- **VMess+gRPC**
|
|
|
|
|
- **VMess+TCP+TLS**
|
|
|
|
|
- **VMess+WebSocket+TLS**
|
|
|
|
|
- **VMess+H2C+TLS**
|
|
|
|
|
- **VMess+gRPC+TLS**
|