下载
wget -q4O /usr/local/bin/ycycxz-sing-box https://ycycxz.com/dl/ycycxz-sing-box-linux-amd64chmod +x /usr/local/bin/ycycxz-sing-boxmkdir -p /etc/ycycxz-sing-boxycycxz-sing-box version服务器端配置
/etc/ycycxz-sing-box/ycycxz.jsoncat <<EOF > /etc/ycycxz-sing-box/ycycxz.json{"inbounds": [{"type": "hysteria","listen_port": 42324,"obfs": "ycycxz","auth_str": "ycycxz","up_mbps": 100,"down_mbps": 100,"tls": {"enabled": true,"certificate": "-----BEGIN CERTIFICATE-----\nMIIBrjCCAVSgAwIBAgIQevMGeqSTjU7o7+/gUcaAWjAKBggqhkjOPQQDAjAiMQ8w\nDQYDVQQKEwZ5Y3ljeHoxDzANBgNVBAMTBnljeWN4ejAgFw0yMjEwMDgwODE2NDda\nGA8yMTIyMDkxNDA5MTY0N1owIjEPMA0GA1UEChMGeWN5Y3h6MQ8wDQYDVQQDEwZ5\nY3ljeHowWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAR2XD9fFv2i/d9pWwpM8Lp5\nkQmpVcIIu0TxNVULwX61icOOlzTIRIks0hWMsl5g3oEs6sO97Sq4+0gwmHWL4hyb\no2owaDAOBgNVHQ8BAf8EBAMCAqQwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDwYDVR0T\nAQH/BAUwAwEB/zAdBgNVHQ4EFgQU4QMM7IkGmDmWH/+8TTh2sRwhpXgwEQYDVR0R\nBAowCIIGeWN5Y3h6MAoGCCqGSM49BAMCA0gAMEUCIGgFGVkYuDfV4o3aYiMSzq9F\n7MZAtgT4aNyFPXRCGD3lAiEAzv3lEtXSwVWclv8FRiMf6MffkCQGNaQ6rJPZeMqB\nXgY=\n-----END CERTIFICATE-----\n","key": "-----BEGIN RSA PRIVATE KEY-----\nMIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgt36SxMpUv4aLph8u\nTlXBkJ0335IjkcOFkpeQ1l8vGauhRANCAAR2XD9fFv2i/d9pWwpM8Lp5kQmpVcII\nu0TxNVULwX61icOOlzTIRIks0hWMsl5g3oEs6sO97Sq4+0gwmHWL4hyb\n-----END RSA PRIVATE KEY-----\n"}}]}EOFsystemd
cat <<EOF > /etc/systemd/system/ycycxz-sing-box.service[Unit]Description=ycycxz-sing-boxAfter=network-online.target[Service]LimitAS=infinityLimitNOFILE=infinityLimitNPROC=infinityTasksMax=infinityExecStart=/usr/local/bin/ycycxz-sing-box run -c /etc/ycycxz-sing-box/ycycxz.json[Install]WantedBy=multi-user.targetEOFsystemctl daemon-reloadsystemctl enable ycycxz-sing-box启动
systemctl start ycycxz-sing-box#systemctl status ycycxz-sing-box客户端配置
ycycxz.json{"log": {"disabled": false,"level": "warning"},"dns": {"servers": [{"tag": "proxy","address": "tls://1.1.1.1"},{"tag": "local","address": "8.8.8.8","detour": "direct"}],"rules": [{"geosite": "cn","server": "local"}],"final": "proxy","strategy": "ipv4_only","disable_cache": true,"disable_expire": false},"inbounds": [{"type": "tun","interface_name": "ycycxz","inet4_address": "172.4.23.24/30","sniff": true,"auto_route": true,"stack": "system"}],"outbounds": [{"type": "hysteria","server": "4.2.3.24","server_port": 42324,"up_mbps": 100,"down_mbps": 100,"auth_str": "ycycxz","obfs": "ycycxz","tls": {"enabled": true,"insecure": true},"udp_fragment": true},{"type": "direct","tag": "direct"},{"type": "dns","tag": "dns-out"}],"route": {"rules": [{"protocol": "dns","outbound": "dns-out"},{"geosite": "cn","outbound": "direct"},{"geoip": "cn","outbound": "direct"},{"geoip": "private","outbound": "direct"}],"auto_detect_interface": true}}查看注释ci
管理员权限运行
下载二进制singbox-amd64.exe run -c ycycxz.json卸载
systemctl stop ycycxz-sing-boxrm /etc/systemd/system/ycycxz-sing-box.servicesystemctl daemon-reloadrm -rf /etc/ycycxz-sing-boxrm -f /usr/local/bin/ycycxz-sing-box多节点
Clash-meta-core面板视频教程
How was it? Did this tutorial work? No
