sing-box协议

·

检查并开启BBR

sysctl net.ipv4.tcp_congestion_control net.core.default_qdisc
sysctl -w net.ipv4.tcp_congestion_control=bbr
sysctl -w net.core.default_qdisc=fq

sing-box配置文件解析

"inbounds": [
  {
    "tag":"SS",
    "type": "shadowsocks",
    "listen": "::",
    "listen_port": 80,
    "method": "2022-blake3-aes-128-gcm", // aes-128-gcm 密钥无限制
    "password": "hztQCU1ZB8CAuPMVFJiCJw==", // 密钥长度16,sing-box执行 sing-box generate rand --base64 16 生成
    "multiplex": {
        "enabled": true
    }
  },
  {
    "tag":"VLESS-Vision-Reality",
    "type":"vless",
    "listen":"::",
    "listen_port":443,
    "users":[
        {
            "uuid":"625a08bb-d372-4f7c-a2d4-6a50ca3393ce", // sing-box执行 sing-box generate uuid 生成
            "flow":"xtls-rprx-vision"
        }
    ],
    "tls":{
        "enabled":true,
        "server_name":"moe.syaronet.com",
        "reality":{
            "enabled":true,
            "handshake":{
                "server":"moe.syaronet.com", // 要求网站支持 TLS 1.3、X25519 与 H2,域名非跳转用
                "server_port":443
            },
            "private_key":"mAQVEs96AtDg1V_b2POFVP8n-Uu6hBe0_1Zt-DtRzGE", // 执行 sing-box generate reality-keypair 生成,对应公钥放客户端
            "short_id":[
                "a118b9425a7e2dc5" // 执行 sing-box generate rand 8 --hex 生成
            ]
        }
    },
    "multiplex":{
        "enabled":true,
        "padding":true,
        "brutal":{
            "enabled":true,
            "up_mbps":800,
            "down_mbps":100
        }
    }
  },
  {
    "tag": "HYSTERIA2",
    "type": "hysteria2",
    "listen": "::",
    "listen_port": 52021,
    "obfs": {
      "type": "salamander",
      "password": "71c42203-ee95-44f9-97f2-3fefe254f223" // sing-box执行 sing-box generate uuid 生成作为密码即可
    },
    "users": [
      {
        "password": "c36d52aa-12b0-420c-a409-02f0410f6ac4" // sing-box执行 sing-box generate uuid 生成作为密码即可
      }
    ],
    "tls": {
      "enabled": true,
      "alpn": [
        "h3"
      ],
      "certificate_path": "/etc/ssl/yu.ykszckj.com/yu.ykszckj.com.crt",
      "key_path": "/etc/ssl/yu.ykszckj.com/yu.ykszckj.com.key"
    }
  }
],