|

本帖最后由 ajeef 于 2025-3-14 15:55 编辑
原帖已经是2023年的,只适用当时1.8.x:https://hostloc.com/thread-1250119-1-1.html
但是介于官方1.12.x-还是alpha状态,预计还有很多新增的特性参数和改动,等测试版、正式版,落地了再改,目前最新正式版是1.11.5
以下是Server Config.json
- {
- "inbounds": [
- {
- "type": "vless",
- "tag": "vless-in",
- "listen": "::",
- "listen_port": 6813, //端口自己改
- "users": [
- {
- "name": "test",
- "uuid": "de92bec1-e63b-44e9-b26e-72d19fc7c748",//uuid 自己改,不会看老帖
- "flow": "xtls-rprx-vision"
- }
- ],
- "tls": {
- "enabled": true,
- "server_name": "login.cloud.com",//域名自己改,
- "reality": {
- "enabled": true,
- "handshake": {
- "server": "login.cloud.com", //和上面改的一样
- "server_port": 443
- },
- "private_key": "uMNyAsemTItTxRLCCg4ptog5Jt5pTk-6cWgGZRgLg2Q",//私钥自己改,看老帖
- "short_id": "6803856467f2d7b6" //hex8自己改,看老帖
- }
- }
- },
- "multiplex": {
- "enabled": true,
- "padding": true,
- "brutal": {
- "enabled": true,
- "up_mbps": 300, //上行改VPS的端口极限
- "down_mbps": 300//下行无所谓
- }
- }
- ],
- "outbounds": [
- {
- "type": "direct",
- "tag": "direct"
- },
- {
- "type": "block",
- "tag": "block"
- }
- ],
- "route": {
- "rules": [
- {
- "ip_is_private": true,
- "outbound": "block"
- },
- {
- "rule_set": [
- "geoip-cn",
- "geosite-category-ads-all"
- ],
- "outbound": "block"
- }
- ],
- "rule_set": [
- {
- "tag": "geoip-cn",
- "type": "remote",
- "format": "binary",
- "url": "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs", //我用的官方,你有更好的自己改
- "download_detour": "direct"
- },
- {
- "tag": "geosite-category-ads-all",
- "type": "remote",
- "format": "binary",
- "url": "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-category-ads-all.srs", //我用的官方,你有更好的自己改
- "download_detour": "direct"
- }
- ],
- "final": "direct"
- }
- }
复制代码
用命令:sing-box check -c /etc/sing-box/config.json检查会报错,这正常的,这个警告,不是错误,上面说过,官方1.13就删除老版特性。
WARN[0000] legacy special outbounds is deprecated in sing-box 1.11.0 and will be removed in sing-box 1.13.0, checkout documentation for migration: https://sing-box.sagernet.org/migration/#migrate-legacy-special-outbounds-to-rule-actions
|
|