├── .gitignore ├── VLESS-TCP-XTLS-Vision-REALITY-WARP ├── warp-install.md └── server.json ├── Others ├── cfw-change-core.md └── warp-install.md ├── VLESS-TCP-TLS-WS-GKE ├── 4xray-hc.yaml ├── 1http2https.yaml ├── 5xray-router.yaml ├── 0gateway.yaml ├── 2config.yaml └── 3xray-k8s.yaml ├── Sing-Box ├── TUIC │ └── config.json ├── ShadowTLS │ └── config.json ├── Hysteria2 │ └── config.json ├── Anytls │ └── config.json └── VLESS-XTLS-uTLS-REALITY │ └── config.json ├── README.md └── sing-box-install-and-config.sh /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /VLESS-TCP-XTLS-Vision-REALITY-WARP/warp-install.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Others/cfw-change-core.md: -------------------------------------------------------------------------------- 1 | # 修改默认的Clash内核 2 | 3 | ## 下载对应的clash.meta版本 4 | 5 | https://github.com/MetaCubeX/Clash.Meta/releases 6 | 7 | ## 替换默认的内核 8 | 9 | ### Mac路径 10 | /Applications/Clash for Windows.app/Contents/Resources/static/files/darwin/x64 11 | 12 | ## Windows路径 13 | 略 14 | -------------------------------------------------------------------------------- /VLESS-TCP-TLS-WS-GKE/4xray-hc.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.gke.io/v1 2 | kind: HealthCheckPolicy 3 | metadata: 4 | name: xray-healthcheck 5 | namespace: xray 6 | spec: 7 | default: 8 | config: 9 | type: TCP 10 | tcpHealthCheck: 11 | port: 8080 12 | targetRef: 13 | group: "" 14 | kind: Service 15 | name: xray -------------------------------------------------------------------------------- /VLESS-TCP-TLS-WS-GKE/1http2https.yaml: -------------------------------------------------------------------------------- 1 | kind: HTTPRoute 2 | apiVersion: gateway.networking.k8s.io/v1beta1 3 | metadata: 4 | name: redirect 5 | namespace: default 6 | spec: 7 | parentRefs: 8 | - namespace: default 9 | name: gateway 10 | sectionName: http 11 | rules: 12 | - filters: 13 | - type: RequestRedirect 14 | requestRedirect: 15 | scheme: https -------------------------------------------------------------------------------- /VLESS-TCP-TLS-WS-GKE/5xray-router.yaml: -------------------------------------------------------------------------------- 1 | kind: HTTPRoute 2 | apiVersion: gateway.networking.k8s.io/v1beta1 3 | metadata: 4 | name: xray 5 | labels: 6 | gateway: gateway 7 | spec: 8 | parentRefs: 9 | - name: gateway 10 | namespace: default 11 | sectionName: https 12 | hostnames: 13 | - "example.com" 14 | rules: 15 | - matches: 16 | - path: 17 | type: PathPrefix 18 | value: /xray 19 | backendRefs: 20 | - kind: Service 21 | name: xray 22 | port: 8080 -------------------------------------------------------------------------------- /VLESS-TCP-TLS-WS-GKE/0gateway.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: gateway.networking.k8s.io/v1beta1 2 | kind: Gateway 3 | metadata: 4 | name: gateway 5 | namespace: default 6 | annotations: 7 | # 提前创建cert map 8 | networking.gke.io/certmap: 9 | spec: 10 | gatewayClassName: gke-l7-global-external-managed 11 | addresses: 12 | # 提前创建IP Address(global) 13 | - type: NamedAddress 14 | value: 15 | listeners: 16 | - name: http 17 | protocol: HTTP 18 | port: 80 19 | allowedRoutes: 20 | kinds: 21 | - kind: HTTPRoute 22 | namespaces: 23 | from: All 24 | - name: https 25 | protocol: HTTPS 26 | port: 443 27 | allowedRoutes: 28 | kinds: 29 | - kind: HTTPRoute 30 | namespaces: 31 | from: All -------------------------------------------------------------------------------- /Sing-Box/TUIC/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "inbounds": [ 3 | { 4 | "type": "tuic", 5 | "listen": "::", 6 | "listen_port": 10006, 7 | "users": [ 8 | { 9 | "uuid": "UUID", 10 | "password": "PASSWORD" 11 | } 12 | ], 13 | "congestion_control": "bbr", 14 | "tls": { 15 | "enabled": true, 16 | "alpn": [ 17 | "h3" 18 | ], 19 | "certificate_path": "/etc/hysteria/cert.pem", 20 | "key_path": "/etc/hysteria/private.key" 21 | } 22 | } 23 | ], 24 | "outbounds": [ 25 | { 26 | "type": "direct" 27 | } 28 | ] 29 | } -------------------------------------------------------------------------------- /Sing-Box/ShadowTLS/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "inbounds": [ 3 | { 4 | "type": "shadowtls", 5 | "listen": "::", 6 | "listen_port": 10005, 7 | "detour": "shadowsocks-in", 8 | "version": 3, 9 | "users": [ 10 | { 11 | "password": "PASSWORD" 12 | } 13 | ], 14 | "handshake": { 15 | "server": "www.apple.com", 16 | "server_port": 443 17 | }, 18 | "strict_mode": true 19 | }, 20 | { 21 | "type": "shadowsocks", 22 | "tag": "shadowsocks-in", 23 | "listen": "127.0.0.1", 24 | "method": "2022-blake3-chacha20-poly1305", 25 | "password": "PASSWORD" 26 | } 27 | ], 28 | "outbounds": [ 29 | { 30 | "type": "direct" 31 | } 32 | ] 33 | } -------------------------------------------------------------------------------- /Sing-Box/Hysteria2/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "inbounds": [ 3 | { 4 | "type": "hysteria2", 5 | "listen": "::", 6 | "listen_port": 10003, 7 | "up_mbps": 100, 8 | "down_mbps": 300, 9 | "users": [ 10 | { 11 | "password": "PASSWORD" 12 | } 13 | ], 14 | "masquerade": { 15 | "type": "proxy", 16 | "url": "SNI", 17 | "rewrite_host": true 18 | }, 19 | "tls": { 20 | "enabled": true, 21 | "alpn": [ 22 | "h3" 23 | ], 24 | "certificate_path": "/etc/hysteria/cert.pem", 25 | "key_path": "/etc/hysteria/private.key" 26 | } 27 | } 28 | ], 29 | "outbounds": [ 30 | { 31 | "type": "direct" 32 | } 33 | ] 34 | } -------------------------------------------------------------------------------- /Sing-Box/Anytls/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "inbounds": [ 3 | { 4 | "type": "anytls", 5 | "listen": "::", 6 | "listen_port": 10006, 7 | "users": [ 8 | { 9 | "password": "PASSWORD" 10 | } 11 | ], 12 | "tls": { 13 | "enabled": true, 14 | "server_name": "SERVER_NAME", 15 | "reality": { 16 | "enabled": true, 17 | "handshake": { 18 | "server": "SERVER", 19 | "server_port": 443 20 | }, 21 | "private_key": "PRIVATE_KEY", 22 | "short_id": [ 23 | "SHORT_ID" 24 | ] 25 | } 26 | } 27 | } 28 | ], 29 | "outbounds": [ 30 | { 31 | "type": "direct" 32 | } 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /Sing-Box/VLESS-XTLS-uTLS-REALITY/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "inbounds": [ 3 | { 4 | "type": "vless", 5 | "listen": "::", 6 | "listen_port": PORT, 7 | "users": [ 8 | { 9 | "uuid": "UUID", 10 | "flow": "xtls-rprx-vision" 11 | } 12 | ], 13 | "tls": { 14 | "enabled": true, 15 | "server_name": "SERVER_NAME", 16 | "reality": { 17 | "enabled": true, 18 | "handshake": { 19 | "server": "SERVER", 20 | "server_port": 443 21 | }, 22 | "private_key": "PRIVATE_KEY", 23 | "short_id": [ 24 | "SHORT_ID" 25 | ] 26 | } 27 | } 28 | } 29 | ], 30 | "outbounds": [ 31 | { 32 | "type": "direct" 33 | } 34 | ] 35 | } -------------------------------------------------------------------------------- /Others/warp-install.md: -------------------------------------------------------------------------------- 1 | # Cloudflare Warp Install 2 | 3 | ## Install 4 | 5 | ```shell 6 | # 安装Warp-cli GPG密钥: 7 | curl https://pkg.cloudflareclient.com/pubkey.gpg | sudo gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg 8 | 9 | # 添加Warp-cli源: 10 | echo "deb [arch=amd64 signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/cloudflare-client.list 11 | 12 | # 更新APT缓存: 13 | apt update 14 | 15 | # 安装Warp-cli: 16 | apt install cloudflare-warp 17 | 18 | # 注册WARP: 19 | warp-cli register 20 | 21 | # 设置为Socks代理模式(十分重要,如果直接连接会导致shell失联): 22 | warp-cli set-mode proxy 23 | 24 | # 连接Warp-cli: 25 | warp-cli connect 26 | 27 | # 查询代理后的IP地址: 28 | curl ifconfig.me --proxy socks5://127.0.0.1:40000 29 | ``` 30 | 31 | ## Team 32 | ```shell 33 | warp-cli teams-enroll [你的团队域] 34 | 35 | warp-cli teams-enroll-token com.cloudflare.warp://[team-domain].cloudflareaccess.com/auth?token=[token] 36 | ``` 37 | 38 | ## 其他 39 | 40 | ### Token获取 41 | 42 | ### 改变Team的代理模式 -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Proxy Config 2 | 基于Sing-box搭建的代理服务器节点,支持Hysteria2/Vless Reality/ShadowTLS/Tuic. 3 | 4 | ## 端口 5 | 协议|端口 6 | ---|--- 7 | Hysteria2|10003 8 | Vless Reality|10004 9 | ShadowTLS|10005 10 | Anytls|10006 11 | Tuic|443 12 | 13 | 在各个云厂商的防火墙或者安全组需要对公网开放端口 14 | 15 | ## 使用 16 | ```shell 17 | bash <(wget -qO- https://raw.githubusercontent.com/clhlc/ProxyConfig/main/sing-box-install-and-config.sh) 18 | ``` 19 | ```shell 20 | ############################################################# 21 | # Sing-Box 一键安装脚本 # 22 | # 作者: clhlc # 23 | # GitHub 项目: https://github.com/clhlc/ProxyConfig # 24 | ############################################################# 25 | 26 | 0. 初始化 VPS 27 | 1. 安装 Sing-Box 28 | 2. 卸载 Sing-Box 29 | 3. 重启 Sing-Box 30 | 4. 查看 Sing-Box 日志 31 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 32 | 11. 配置 Hysteria2(推荐) 33 | 12. 配置 Vless+XTLS+uTLS+Reality(推荐) 34 | 13. 配置 SS+ShadowTLS 35 | 14. 配置 Tuic V5 36 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 37 | 10. 退出脚本 38 | -------------------------------------------------------------------------------- /VLESS-TCP-TLS-WS-GKE/2config.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: xray-config 5 | namespace: xray 6 | data: 7 | config.json: | 8 | { 9 | "log": { 10 | "loglevel": "warning" 11 | }, 12 | "inbounds": [ 13 | { 14 | "port": 8080, 15 | "listen": "0.0.0.0", 16 | "protocol": "vless", 17 | "settings": { 18 | "clients": [ 19 | { 20 | "id": "", // 填写你的 UUID 21 | "level": 0, 22 | "email": "love@example.com" 23 | } 24 | ], 25 | "decryption": "none" 26 | }, 27 | "streamSettings": { 28 | "network": "ws", 29 | "security": "none", 30 | "wsSettings": { 31 | // "acceptProxyProtocol": true, // 提醒:若你用 Nginx/Caddy 等反代 WS,需要删掉这行 32 | "path": "/xray" // 必须换成自定义的 PATH,需要和上面的一致 33 | } 34 | } 35 | } 36 | ], 37 | "outbounds": [ 38 | { 39 | "protocol": "freedom" 40 | } 41 | ] 42 | } 43 | -------------------------------------------------------------------------------- /VLESS-TCP-TLS-WS-GKE/3xray-k8s.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: xray 5 | namespace: xray 6 | spec: 7 | replicas: 1 8 | selector: 9 | matchLabels: 10 | app: xray 11 | template: 12 | metadata: 13 | labels: 14 | app: xray 15 | spec: 16 | containers: 17 | - name: xray 18 | image: teddysun/xray 19 | ports: 20 | - containerPort: 8080 21 | readinessProbe: 22 | tcpSocket: 23 | port: 8080 24 | initialDelaySeconds: 10 25 | periodSeconds: 5 26 | failureThreshold: 3 27 | livenessProbe: 28 | tcpSocket: 29 | port: 8080 30 | initialDelaySeconds: 15 31 | periodSeconds: 10 32 | failureThreshold: 5 33 | volumeMounts: 34 | - name: config-volume 35 | mountPath: /etc/xray/config.json 36 | subPath: config.json 37 | readOnly: true 38 | volumes: 39 | - name: config-volume 40 | configMap: 41 | name: xray-config 42 | --- 43 | apiVersion: v1 44 | kind: Service 45 | metadata: 46 | name: xray 47 | namespace: xray 48 | spec: 49 | selector: 50 | app: xray 51 | ports: 52 | - name: http 53 | protocol: TCP 54 | port: 8080 55 | targetPort: 8080 56 | type: ClusterIP 57 | -------------------------------------------------------------------------------- /VLESS-TCP-XTLS-Vision-REALITY-WARP/server.json: -------------------------------------------------------------------------------- 1 | { 2 | "log": { 3 | "loglevel": "info", 4 | "access": "/var/log/xray/access.log", 5 | "error": "/var/log/xray/error.log", 6 | "dnsLog": false 7 | }, 8 | "inbounds": [ 9 | { 10 | "port": 10086, 11 | "protocol": "vless", 12 | "settings": { 13 | "clients": [ 14 | { 15 | "id": "", 16 | "flow": "xtls-rprx-vision" 17 | } 18 | ], 19 | "decryption": "none" 20 | }, 21 | "streamSettings": { 22 | "network": "tcp", 23 | "security": "reality", 24 | "realitySettings": { 25 | "dest": "gateway.icloud.com:443", 26 | "serverNames": [ 27 | "gateway.icloud.com" 28 | ], 29 | "privateKey": "", 30 | "shortIds": [ 31 | "", 32 | "6ba85179e30d4fc2" 33 | ] 34 | } 35 | }, 36 | "sniffing": { 37 | "enabled": true, 38 | "destOverride": [ 39 | "http", 40 | "tls", 41 | "quic" 42 | ], 43 | "routeOnly": true 44 | } 45 | } 46 | ], 47 | "routing": { 48 | "domainStrategy": "AsIs", 49 | "rules": [ 50 | { 51 | "type": "field", 52 | "domain": 53 | [ 54 | "bamgrid.com" // Disney 55 | ], 56 | "outboundTag": "warp" 57 | } 58 | ] 59 | }, 60 | "outbounds": [ 61 | { 62 | "protocol": "freedom", 63 | "tag": "direct" 64 | }, 65 | { 66 | "tag": "warp", 67 | "protocol": "socks", 68 | "settings": { 69 | "servers": [ 70 | { 71 | "address": "127.0.0.1", 72 | "port": 40000 73 | } 74 | ] 75 | } 76 | } 77 | ] 78 | } 79 | -------------------------------------------------------------------------------- /sing-box-install-and-config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export LANG=en_US.UTF-8 3 | 4 | RED="\033[31m" 5 | GREEN="\033[32m" 6 | YELLOW="\033[33m" 7 | PLAIN="\033[0m" 8 | 9 | red() { 10 | echo -e "\033[31m\033[01m$*\033[0m" 11 | } 12 | 13 | green() { 14 | echo -e "\033[32m\033[01m$*\033[0m" 15 | } 16 | 17 | yellow() { 18 | echo -e "\033[33m\033[01m$*\033[0m" 19 | } 20 | 21 | function init_vps() { 22 | red 使用root用户执行 23 | 24 | apt update 25 | apt install -yqq qrencode net-tools 26 | 27 | iptables -F 28 | 29 | mkdir -p /etc/sb_ssl && openssl ecparam -genkey -name prime256v1 -out /etc/sb_ssl/private.key && openssl req -new -x509 -days 3650 -key /etc/sb_ssl/private.key -out /etc/sb_ssl/cert.pem -subj "/CN=bing.com" 30 | } 31 | 32 | function common_command() { 33 | server_ip=$(curl -s https://ipinfo.io/ip) 34 | cloud=$(curl -s ipinfo.io/$server_ip/org|awk '{print $2}') 35 | city=$(curl -s ipinfo.io/$server_ip/city) 36 | uuid=$(/usr/bin/sing-box generate uuid) 37 | hn=$(hostname) 38 | password=$(LC_ALL=C tr -dc 'a-zA-Z0-9' /usr/local/etc/sing-box/config.json 130 | echo "[Unit] 131 | Description=sing-box service 132 | Documentation=https://sing-box.sagernet.org 133 | After=network.target nss-lookup.target 134 | 135 | [Service] 136 | CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_SYS_PTRACE CAP_DAC_READ_SEARCH 137 | AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_SYS_PTRACE CAP_DAC_READ_SEARCH 138 | ExecStart=/usr/bin/sing-box -C /usr/local/etc/sing-box run 139 | ExecReload=/bin/kill -HUP $MAINPID 140 | Restart=on-failure 141 | RestartSec=10s 142 | LimitNOFILE=infinity 143 | 144 | [Install] 145 | WantedBy=multi-user.target" | tee /etc/systemd/system/sing-box.service 146 | systemctl daemon-reload 147 | 148 | green 安装sing-box完成! 149 | } 150 | 151 | function restart() { 152 | systemctl restart sing-box.service 153 | sleep 2 154 | systemctl status sing-box.service --no-pager -l 155 | } 156 | 157 | function vless_reality() { 158 | 159 | conf_name="vless_reality" 160 | check_config_exit $conf_name 161 | common_command 162 | 163 | key_pair=$(/usr/bin/sing-box generate reality-keypair) 164 | 165 | private_key=$(echo "$key_pair" | awk '/PrivateKey/ {print $2}' | tr -d '"') 166 | 167 | public_key=$(echo "$key_pair" | awk '/PublicKey/ {print $2}' | tr -d '"') 168 | 169 | short_id=$(/usr/bin/sing-box generate rand --hex 8) 170 | 171 | port=10004 172 | 173 | wget -O /usr/local/etc/sing-box/$conf_name.json https://raw.githubusercontent.com/clhlc/ProxyConfig/main/Sing-Box/VLESS-XTLS-uTLS-REALITY/config.json 174 | 175 | sed -i "s/PORT/$port/g; s/UUID/$uuid/g; s/SERVER_NAME/gateway\.icloud\.com/g; s/SERVER/gateway\.icloud\.com/g; s/PRIVATE_KEY/$private_key/g; s/SHORT_ID/$short_id/g" /usr/local/etc/sing-box/$conf_name.json 176 | 177 | server_link="vless://$uuid@$server_ip:$port?security=reality&flow=xtls-rprx-vision&sni=gateway.icloud.com&fp=chrome&pbk=$public_key&sid=$short_id&type=tcp&headerType=none#Reality($server_ip)" 178 | 179 | check_config_validate $conf_name 180 | restart 181 | 182 | gen_url_qr $server_link 183 | } 184 | 185 | function hy2() { 186 | 187 | conf_name="hy2" 188 | check_config_exit $conf_name 189 | common_command 190 | sni="bing.com" 191 | masquerade="https:\/\/bing.com" 192 | 193 | mkdir -p /etc/hysteria && openssl ecparam -genkey -name prime256v1 -out /etc/hysteria/private.key && openssl req -new -x509 -days 3650 -key /etc/hysteria/private.key -out /etc/hysteria/cert.pem -subj "/CN=bing.com" 194 | 195 | wget -O /usr/local/etc/sing-box/$conf_name.json https://raw.githubusercontent.com/clhlc/ProxyConfig/main/Sing-Box/Hysteria2/config.json 196 | 197 | sed -i "s/PASSWORD/$password/g; s/SNI/$masquerade/g" /usr/local/etc/sing-box/$conf_name.json 198 | 199 | cat /usr/local/etc/sing-box/$conf_name.json 200 | 201 | server_link="hysteria2://$password@$server_ip:10003?insecure=1&obfs=none&sni=$sni#Hysteria2($cloud $hn)" 202 | 203 | check_config_validate $conf_name 204 | restart 205 | 206 | gen_url_qr $server_link 207 | } 208 | 209 | function shadowtls() { 210 | 211 | conf_name="shadowtls" 212 | common_command 213 | check_config_exit $conf_name 214 | 215 | while true 216 | do 217 | shadowtls_password=$(/usr/bin/sing-box generate rand --base64 32) 218 | if [[ $shadowtls_password =~ "/" ]]; then 219 | shadowtls_password=$(/usr/bin/sing-box generate rand --base64 32) 220 | echo $shadowtls_password 221 | else 222 | echo $shadowtls_password 223 | break 224 | fi 225 | done 226 | 227 | wget -O /usr/local/etc/sing-box/$conf_name.json https://raw.githubusercontent.com/clhlc/ProxyConfig/main/Sing-Box/ShadowTLS/config.json 228 | 229 | sed -i "s/PASSWORD/$shadowtls_password/g" /usr/local/etc/sing-box/$conf_name.json 230 | 231 | cat /usr/local/etc/sing-box/$conf_name.json 232 | 233 | check_config_validate $conf_name 234 | restart 235 | 236 | b1=$(echo -n "2022-blake3-chacha20-poly1305:$shadowtls_password@$server_ip:10004"|base64 -w 0) 237 | b2=$(echo -n \{\"version\":\"3\",\"host\":\"www.apple.com\",\"password\":"\"$shadowtls_password"\"\}|base64 -w 0) 238 | 239 | server_link="ss://$b1?shadow-tls=$b2#SS+Shadowtls($server_ip)" 240 | 241 | gen_url_qr $server_link 242 | } 243 | 244 | function test() { 245 | green "begin" 246 | check_config_exit test 247 | green "end" 248 | } 249 | 250 | function tuic-v5() { 251 | 252 | conf_name="tuic-v5" 253 | 254 | common_command 255 | 256 | check_config_exit $conf_name 257 | 258 | wget -O /usr/local/etc/sing-box/$conf_name.json https://raw.githubusercontent.com/clhlc/ProxyConfig/main/Sing-Box/TUIC/config.json 259 | 260 | sed -i "s/PASSWORD/$password/g" /usr/local/etc/sing-box/$conf_name.json 261 | sed -i "s/UUID/$uuid/g" /usr/local/etc/sing-box/$conf_name.json 262 | 263 | check_config_validate $conf_name 264 | restart 265 | } 266 | 267 | function anytls() { 268 | 269 | conf_name="anytls" 270 | 271 | common_command 272 | 273 | check_config_exit $conf_name 274 | 275 | wget -O /usr/local/etc/sing-box/$conf_name.json https://raw.githubusercontent.com/clhlc/ProxyConfig/main/Sing-Box/Anytls/config.json 276 | 277 | sed -i "s/PASSWORD/$password/g; s/SERVER_NAME/gateway\.icloud\.com/g; s/SERVER/gateway\.icloud\.com/g; s/PRIVATE_KEY/$private_key/g; s/SHORT_ID/$short_id/g" /usr/local/etc/sing-box/$conf_name.json 278 | 279 | check_config_validate $conf_name 280 | 281 | restart 282 | } 283 | 284 | function menu() { 285 | while true; do 286 | echo -e "#############################################################" 287 | echo -e "# ${RED}Sing-Box 一键安装脚本${PLAIN} #" 288 | echo -e "# ${GREEN}作者${PLAIN}: clhlc #" 289 | echo -e "# ${GREEN}GitHub 项目${PLAIN}: https://github.com/clhlc/ProxyConfig #" 290 | echo "#############################################################" 291 | echo "" 292 | echo -e " ${GREEN}0.${PLAIN} 初始化 VPS" 293 | echo -e " ${GREEN}1.${PLAIN} 安装 Sing-Box" 294 | echo -e " ${GREEN}2.${PLAIN} 卸载 Sing-Box" 295 | echo -e " ${GREEN}3.${PLAIN} 重启 Sing-Box" 296 | echo -e " ${GREEN}4.${PLAIN} 查看 Sing-Box 日志" 297 | echo -e " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" 298 | echo -e " ${GREEN}11.${PLAIN} 配置 Hysteria2${RED}(推荐)" 299 | echo -e " ${GREEN}12.${PLAIN} 配置 Vless+XTLS+uTLS+Reality${RED}(推荐)" 300 | echo -e " ${GREEN}13.${PLAIN} 配置 SS+ShadowTLS" 301 | echo -e " ${GREEN}14.${PLAIN} 配置 Tuic V5" 302 | echo -e " ${GREEN}15.${PLAIN} 配置 Anytls+Reality" 303 | echo -e " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" 304 | echo -e " ${GREEN}10.${PLAIN} 退出脚本" 305 | echo "" 306 | read -rp "请输入选项: " menuInput 307 | case $menuInput in 308 | 0) init_vps ;; 309 | 1) install_sing_box ;; 310 | 2) uninstall_sing_box ;; 311 | 3) restart_sing_box ;; 312 | 4) view_sing_box_log ;; 313 | 11) hy2 ;; 314 | 12) vless_reality ;; 315 | 13) shadowtls ;; 316 | 14) tuic-v5 ;; 317 | 15) anytls ;; 318 | 99) test ;; 319 | *) exit 0 ;; 320 | esac 321 | done 322 | } 323 | 324 | menu 325 | --------------------------------------------------------------------------------