洋芋笔记

sing-box 客户端配置文件

使用国内外分流模式,实际使用按照需求自行修改

{
  "log": {
    "level": "trace",
    "timestamp": true
  },
  "dns": {
    "servers": [
      {
        "type": "https",
        "tag": "google",
        "detour": "out",
        "server": "8.8.8.8"
      },
      {
        "type": "udp",
        "tag": "ali",
        "server": "223.5.5.5"
      }
    ],
    "rules": [
      {
        "rule_set": "geosite-google",
        "server": "google",
        "strategy": "ipv4_only",
        "rewrite_ttl": 3600
      },
      {
        "rule_set": "geosite-geolocation-cn",
        "server": "ali",
        "strategy": "ipv4_only",
        "rewrite_ttl": 600
      },
      {
        "server": "google",
        "strategy": "ipv4_only",
        "rewrite_ttl": 3600
      }
    ]
  },
  "inbounds": [
    {
      "type": "tun",
      "tag": "in-tun",
      "mtu": 1280,
      "address": "172.19.0.1/30",
      "auto_route": true,
      "strict_route": true,
      "route_exclude_address": [
        "192.168.0.0/16",
        "fc00::/7"
      ],
      "exclude_package": [
        "com.tencent.qqlive",
        "com.tencent.mm",
        "com.sie.mp",
        "com.sonelli.juicessh",
        "air.tv.douyu.android"
      ]
    },
    {
      "type": "mixed",
      "tag": "in-mixed",
      "listen": "127.0.0.1",
      "listen_port": 2080
    }
  ],
  "outbounds": [
// 你的代理
//放在此处
    {
      "type": "direct",
      "tag": "direct"
    }
  ],
  "route": {
    "rules": [
      {
        "action": "resolve"
      },
      {
        "port": 53,
        "action": "hijack-dns"
      },
      {
        "action": "sniff",
        "sniffer": [
          "bittorrent",
          "quic"
        ],
        "timeout": "10s"
      },
      {
        "protocol": "quic",
        "action": "reject"
      },
      {
        "protocol": "bittorrent",
        "outbound": "direct"
      },
//steam下载直连
      {
        "domain_suffix": [
          "steamserver.net"
        ],
        "outbound": "direct"
      },
      {
        "rule_set": "geosite-google",
        "outbound": "out"
      },
      {
        "rule_set": "geosite-private",
        "outbound": "direct"
      },
      {
        "rule_set": "geoip-cn",
        "outbound": "direct"
      },
      {
        "rule_set": "geosite-geolocation-cn",
        "outbound": "direct"
      },
      {
        "ip_is_private": true,
        "outbound": "direct"
      }
    ],
    "rule_set": [
      {
        "type": "remote",
        "tag": "geoip-cn",
        "url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs"
      },
      {
        "type": "remote",
        "tag": "geosite-google",
        "url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-google.srs"
      },
      {
        "type": "remote",
        "tag": "geosite-private",
        "url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-private.srs"
      },
      {
        "type": "remote",
        "tag": "geosite-geolocation-cn",
        "url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-geolocation-cn.srs"
      }
    ],
    "auto_detect_interface": true,
    "default_domain_resolver": "google"
  },
  "experimental": {
    "cache_file": {
      "enabled": true,
      "store_rdrc": true
    }
  }
}

vmess出站示例tcp+http

{
      "type": "vmess",
      "tag": "out",
      "server": "你的ip",
      "server_port": 8080,
      "uuid": "你的UUID",
      "security": "auto",
      "authenticated_length": true,
      "transport": {
        "type": "http",
        "path": "/home",
        "method": "GET",
        "host": ["test.ustc.edu.cn","www.speedtest.cn"],
      }
    },

hy2出站代理,端口跳跃

{
      "type": "hysteria2",
      "tag": "out",
      "server": "你的hy2 ip",
      "server_port": 0,
      "server_ports": "40000:50000",
      "hop_interval": "5s",
      "down_mbps": 40,
      "password": "你的hy2密码",
      "tls": {
        "enabled": true,
        "server_name": "你的hy2域名",
        "insecure": true
      }
    },

vless ws 自签证书

    {
      "type": "vless",
      "tag": "out",
      "server": "你的IP",
      "server_port": 你的端口,
      "uuid": "请填写你的",
      "tls": {
        "enabled": true,
        "server_name": "www.speedtest.cn",
        "certificate": "-----BEGIN CERTIFICATE-----\nMIIFETCCAvmgAwIBAgIUDmBvhNFALqJSHqII9YLXn0IVFtowDQYJKoZIhvcNAQEL\nBQAwGDEWMBQGA1UEAwwNTXkgUHJpdmF0ZSBDQTAeFw0yNTEwMTgwMzUwNDJaFw0z\nNTEwMTYw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meNV0zQMI3bCXoTh2mrR+eDkyeIUKN\nEo3nPzF9FdqDissQGd3v6uyb8Wae/2fuWssR5Gr94ye6xoKWSCdnVWcywBm8Ahcc\nWc2uAXAwzxAo2LljlT+anqhuRWhf4EDazDi1oUJVmj+mKylCDY8rqmqcAwf+5/aR\nige+fgH4dlnobweo06cpE4wPon6dVvk1CliMaxPaDtyzTnG64vGbiotryt4yg0HR\nX+XAKtYu4CRgqIEGvUl6aAmRK0JOoJMFhouVIxfAxdjAJmvJymIusNcsZTmQHcX/\ngUZmx+6L4MEh+8LsYkFmUVIUHxOt4AGXauORLYzBgAanhbEFlxlUCgAnjFPEmm04\nRp7umCOucsSkT3dNYsjuV2pgRnNQ0JL+lhZ3wi21MQrvIN8nFLN/0Qdgu9+Z9AQy\nCW8+z1thx02Uln6S8IrDBgW//+7yuM2U+wwZZWONkLPTEhUvWr/DOXIWKVOjnRZX\ncsWYvbIf5yXi87YcOZju5UHP1WOXIF9TprHiwKY/NDhms/T+vz+g5muN91Idqqxx\nY8cOSks=\n-----END CERTIFICATE-----"
      },
      "transport": {
        "type": "ws",
        "path": "/home-ws"
      }
    },

#sing-box