rnetx / sing-box

https://sing-box.sagernet.org
Other
71 stars 8 forks source link

无法转换节点类型为vmess的订阅地址,节点无法使用CDN加速 #2

Closed cw2023 closed 1 year ago

cw2023 commented 1 year ago

Welcome

Description of the problem

1、无法转换节点类型为vmess的订阅地址。 2、手动在outbounds下写入自建vmess、vless节点,无法使用CDN加速,套了CDN后节点无法连通,已测试同一个套了CDN的vmess、vless节点在原版sing-box、clash等中可以正常使用。

Version of sing-box

```console $ sing-box version # Paste output here ``` sing-box version 1.3-beta12-yaott-8e639dd Environment: go1.20.4 linux/arm64 Tags: with_proxyprovider,with_clash_ui,with_sideload,with_quic,with_grpc,with_dhcp,with_wireguard,with_shadowsocksr,with_ech,with_utls,with_reality_server,with_acme,with_clash_api,with_v2ray_api,with_gvisor Revision: 8e639dd7659774d843dfc870373dbec5d484360e CGO: enabled

Server and client configuration file

```console # paste json here ``` { "log": { "disabled": false, "level": "info", "output": "box.log", "timestamp": true }, "dns": { "servers": [ { "tag": "default", "address": "tls://8.8.4.4:853", "address_resolver": "local", "strategy": "prefer_ipv6", "detour": "direct" }, { "tag": "local", "address": "223.5.5.5", "strategy": "prefer_ipv6", "detour": "direct" } ], "rules": [ { "outbound":[ "any" ], "server": "local" }, { "geosite": [ "cn", "apple" ], "server": "local", "disable_cache": false } ], "final": "default" }, "inbounds": [ { "type": "tun", "inet4_address": "172.19.0.1/30", "inet6_address": "fdfe:dcba:9876::1/126", "auto_route": true, "strict_route": true, "sniff": true } ], "proxyproviders": [ { "tag": "CLM", "url": "https://XXXXXXX", "cache_file": "./proxy_providers/CLM.cache", "force_update": "1h", "filter": { "rule": [ "香港", "日本", "新加坡" ], "white_mode": true }, "custom_group": [ { "tag": "CLM-All", "type": "urltest", "interval": "5m", "tolerance": 50, "url": "http://www.gstatic.com/generate_204" }, { "tag": "CLM-HK", "type": "selector", "rule": ["香港"], "white_mode": true }, { "tag": "CLM-JP", "type": "selector", "rule": ["日本"], "white_mode": true } ] }, { "tag": "WLY", "url": "https://XXXXXXX", "cache_file": "./proxy_providers/CLM.cache", "force_update": "1h", "filter": { "rule": [ "香港", "日本", "新加坡" ], "white_mode": true }, "custom_group": [ { "tag": "WLY-All", "type": "urltest", "interval": "5m", "tolerance": 50, "url": "http://www.gstatic.com/generate_204" }, { "tag": "WLY-HK", "type": "selector", "rule": ["香港"], "white_mode": true }, { "tag": "WLY-JP", "type": "selector", "rule": ["日本"], "white_mode": true } ] }, { "tag": "V2B", "url": "https://XXXXXXX", // 此订阅地址所包含的节点类型均为vmess,报错无法正常转换 "cache_file": "./proxy_providers/V2B.cache", "force_update": "1h", "custom_group": [ { "tag": "V2B-All", "type": "urltest", "interval": "5m", "tolerance": 50, "url": "http://www.gstatic.com/generate_204" } ] } ], "outbounds": [ { "type": "selector", "tag": "proxy", "outbounds": [ "HK", "JP", "V2B-All", "CLM-All", "WLY-All", "Mine" ] }, { "outbounds": [ "CLM-HK", "WLY-HK" ], "tag": "HK", "type": "selector" }, { "outbounds": [ "CLM-JP", "WLY-JP" ], "tag": "JP", "type": "selector" }, { "outbounds": [ "Hys-TW", "Vmess-HK", "Vless-HK", "Vmess-TEST" ], "tag": "Mine", "type": "selector" }, { "type": "hysteria", "tag": "Hys-TW", "server": "xxxxx", "server_port": 5200, "up_mbps": 80, "down_mbps": 240, "auth_str": "8JCsPssfgS8tiRwiMlhARg==", "recv_window_conn": 15728640, "recv_window": 67108864, "disable_mtu_discovery": true, "tls": { "enabled": true, "server_name": "xxx.com", "alpn": [ "h3" ] } }, // 此节点套了CDN无法正常使用 { "type": "vmess", "tag": "Vmess-HK", "server": "xxxxx", // CDN IP "server_port": 80, "uuid": "3c1890e2-c768-4247-8a3b-032f6ed13a64", "security": "auto", "alter_id": 0, "transport": { "type": "ws", "path": "/stream", "headers": { "host": "xxx.com" // VPS域名 }, "max_early_data": 0, "early_data_header_name": "Sec-WebSocket-Protocol" } }, // 此节点套了CDN无法正常使用 { "type": "vless", "tag": "Vless-HK", // CDN IP "server": "xxxxx", "server_port": 443, "uuid": "b7625108-80fb-4544-a1f2-aa40c931aa52", "transport": { "type": "ws", "path": "/vless", "headers": { "host": "xxx.com" // VPS域名 }, "max_early_data": 0, "early_data_header_name": "Sec-WebSocket-Protocol" } }, // 此节点未套CDN可以正常使用 { "type": "vmess", "tag": "Vmess-TEST", "server": "xxxxx", "server_port": 443, "uuid": "cd9c187c-c656-4be0-a786-7632cb23c577", "security": "auto", "alter_id": 0, "transport": { "type": "ws", "max_early_data": 0, "early_data_header_name": "Sec-WebSocket-Protocol" } }, { "type": "direct", "tag": "direct" }, { "type": "block", "tag": "block" }, { "type": "dns", "tag": "dns-out" } ], "route": { "rules": [ { "protocol": "dns", "outbound": "dns-out" }, { "geosite": "tiktok", "outbound": "proxy" }, { "geosite": "cn", "outbound": "direct" }, { "geoip": "private", "outbound": "direct" }, { "geoip": "cn", "outbound": "direct" } ], "auto_detect_interface": true }, "experimental": { "clash_api": { "external_controller": "127.0.0.1:9090", "external_ui_build_in": true, "default_mode": "rule", "store_selected": true, "cache_file": "cache.db" } } }

Server and client log file

```console # paste log here ``` get outbounds from proxy provider[2]: parse proxyprovider[V2B] outbound[V2B]: missing tags
cw2023 commented 1 year ago

其中vmess节点订阅地址内所包含的节点信息示例如上,没有节点信息里没有包含ws-opts、path、 headers就无法转换成功

0xffffharry commented 1 year ago

Try 58a9375

cw2023 commented 1 year ago

Try 58a9375

问题已解决