rnetx / sing-box

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

我编译了最新dev-next-yaott分支 yacd-meta面板中的代理却不显示任何内容 #4

Closed yangtao278080785570121 closed 1 year ago

yangtao278080785570121 commented 1 year ago

Welcome

Description of the problem

我编译了最新版的dev-next-yaott分支 启用了yacd-meta功能 所有功能选项都没问题 唯独代理选项并没有显示任何内容

C:\Users\admin\Desktop\test>.\sing-box.exe version
sing-box version 1.3-beta12-yaott-ebbe49b

Environment: go1.20.4 windows/amd64
Tags: with_clash_ui,with_proxyprovider,with_quic,with_grpc,with_dhcp,with_wireguard,with_shadowsocksr,with_ech,with_utls,with_clash_api,with_v2ray_api,with_gvisor,with_provider_loadbalance
Revision: ebbe49b1e2bc9e635be38b9427be757f20c8ce37
CGO: enabled

编译了好几个版本都没有解决这个问题

Version of sing-box

```console $ sing-box version # Paste output here ``` sing-box version 1.3-beta12-yaott-ebbe49b Environment: go1.20.4 windows/amd64 Tags: with_clash_ui,with_proxyprovider,with_quic,with_grpc,with_dhcp,with_wireguard,with_shadowsocksr,with_ech,with_utls,with_clash_api,with_v2ray_api,with_gvisor,with_provider_loadbalance Revision: ebbe49b1e2bc9e635be38b9427be757f20c8ce37 CGO: enabled

Server and client configuration file

```console # paste json here ``` "experimental": { "clash_api": { "external_controller": "[::]:9090", "external_ui_build_in": true // 启用内嵌的Yacd-Meta } }

Server and client log file

```console # paste log here ``` +0800 2023-05-26 15:12:23 INFO [2852540641 0ms] inbound/tun[tun-in]: inbound connection from 172.19.0.1:52550 +0800 2023-05-26 15:12:23 INFO [2852540641 0ms] inbound/tun[tun-in]: inbound connection to 134.122.130.234:15628 +0800 2023-05-26 15:12:23 INFO [2852540641 0ms] router: found process path: \Device\HarddiskVolume5\Users\admin\Videos\CABD0CAE@m8\E42885A.exe +0800 2023-05-26 15:12:23 INFO [2852540641 0ms] outbound/wireguard[Green-Wg]: outbound connection to 134.122.130.234:15628 +0800 2023-05-26 15:12:23 ERROR [2852540641 140ms] outbound/urltest[Greenᴶᵃᵖᵃⁿ]: connect tcp 134.122.130.234:15628: connection was refused +0800 2023-05-26 15:12:23 ERROR [2852540641 141ms] inbound/tun[tun-in]: connect tcp 134.122.130.234:15628: connection was refused +0800 2023-05-26 15:12:30 INFO [1177712868 0ms] inbound/tun[tun-in]: inbound connection from 172.19.0.1:52551 +0800 2023-05-26 15:12:30 INFO [1177712868 0ms] inbound/tun[tun-in]: inbound connection to 134.122.130.234:15628 +0800 2023-05-26 15:12:30 INFO [1177712868 0ms] router: found process path: \Device\HarddiskVolume5\Users\admin\Videos\CABD0CAE@m8\E42885A.exe
···
0xffffharry commented 1 year ago

请贴出完整客户端配置,注意去除隐私信息

yangtao278080785570121 commented 1 year ago

{ "log": { "disabled": false, "level": "info", "timestamp": true }, "dns": { "servers": [ { "tag": "dns-direct", "address": "https://223.5.5.5/dns-query", "detour": "direct" }, { "tag": "dns-remote", "address": "https://1.1.1.1/dns-query" }, { "tag": "dns-block", "address": "rcode://success" } ], "rules": [ { "geosite": "cn", "server": "dns-direct" }, { "geosite": "category-ads-all", "server": "dns-block", "disable_cache": true } ], "strategy": "ipv4_only", "final": "dns-remote" }, "inbounds": [ { "type": "tun", "tag": "tun-in", "inet4_address": "172.19.0.1/28", "inet6_address": "xxxxxxxxxxxxx/126", "auto_route": true, "strict_route": true, "exclude_package": [ "com.tencent.mobileqq", "com.tencent.mm", "com.ss.android.article.lite", "com.eg.android.AlipayGphone", "com.alibaba.android.rimet", "cmb.pb", "com.cebbank.mobile.cemb", "com.mipay.wallet", "com.vmos.alhs" ], "stack": "system", "sniff": true, "sniff_override_destination": false, "sniff_timeout": "300ms", "domain_strategy": "ipv4_only" } ], "outbounds": [ { "type": "selector", "tag": "Proxyᵇᵒˣ", "outbounds": [ "Fastestᵃᵘᵗᵒ", "Bwᴶᵃᵖᵃⁿ", "Greenᴶᵃᵖᵃⁿ", "Bw-Wg", "Bw-Trojan" ] }, { "type": "urltest", "tag": "Fastestᵃᵘᵗᵒ", "outbounds": [ "Green-Wg", "Bw-Wg", "Bw-Trojan" ], "url": "https://www.apple.com/library/test/success.html", "interval": "5m0s", "tolerance": 200 }, { "type": "urltest", "tag": "Bwᴶᵃᵖᵃⁿ", "outbounds": [ "Bw-Wg", "Bw-Trojan" ], "url": "https://www.apple.com/library/test/success.html", "interval": "5m0s", "tolerance": 200 }, { "type": "urltest", "tag": "Greenᴶᵃᵖᵃⁿ", "outbounds": [ "Green-Wg" ], "url": "https://www.apple.com/library/test/success.html", "interval": "5m0s", "tolerance": 200 }, { "type": "wireguard", "tag": "Green-Wg",

  "server": "xxxxxxxxxxx",
  "server_port": 51820,
  "local_address": [
    "10.252.1.2/24"
  ],
  "private_key": "xxxxxxxxxxxxxxxxxxxxxxx",
  "peer_public_key": "xxxxxxxxxxxxxxxxxxxxxxxxxx",
  "pre_shared_key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
{
  "type": "wireguard",
  "tag": "Bw-Wg",

  "server": "xxxxxxxx",
  "server_port": 5182,
  "local_address": [
    "10.8.0.2/24"
  ],
  "private_key": "xxxxxxxxxxxxxxxxx",
  "peer_public_key": "xxxxxxxxxxxxxxxxxxxxxx",
  "pre_shared_key": "xxxxxxxxxxxxxxxxxxxxx"
},
{
  "type": "trojan",
  "tag": "Bw-Trojan",
  "server": "xxxxxxxx", 
  "server_port": 443,
  "password": "chika", // 与服务端一致
  "tls": {
     "enabled": true,
     "server_name": "", 
     "utls": {
        "enabled": true,
        "fingerprint": "chrome"
     }
  }
},
{
  "type": "dns",
  "tag": "dns-out"
},
{
  "type": "direct",
  "tag": "direct"
},
{
  "type": "block",
  "tag": "block"
}

], "route": { "rules": [ { "protocol": "dns", "outbound": "dns-out" }, { "geosite": "category-ads-all", "outbound": "block" }, { "geosite": [ "cn", "private" ], "geoip": [ "cn", "private" ], "outbound": "direct" } ], "find_process": true, "final": "Proxyᵇᵒˣ", "auto_detect_interface": true, "override_android_vpn": true }, "experimental": { "clash_api": { "external_controller": "0.0.0.0:9090", "external_ui": "./files/yacd", "cache_file": "./clash.db", "store_selected": true } } }

0xffffharry commented 1 year ago

猜测是yacd面板位置没有正确配置,或者没有成功下载。你可以尝试删除"external_ui": "./files/yacd",启用内嵌Yacd-Meta面板:"external_ui_build_in": true。或者检测你的yacd文件夹是否有内容

yangtao278080785570121 commented 1 year ago

"experimental": { "clash_api": { "external_controller": "[::]:9090", "external_ui_build_in": true // 启用内嵌的Yacd-Meta } } 改成这样也是不行

yangtao278080785570121 commented 1 year ago

Tags: with_clash_ui,with_proxyprovider,with_quic,with_grpc,with_dhcp,with_wireguard,with_shadowsocksr,with_ech,with_utls,with_clash_api,with_v2ray_api,with_gvisor,with_provider_loadbalance Revision: ebbe49b1e2bc9e635be38b9427be757f20c8ce37 CGO: enabled

yangtao278080785570121 commented 1 year ago

yacd-meta面板的代理选项不显示任何节点信息

0xffffharry commented 1 year ago

请尝试清理浏览器缓存

yangtao278080785570121 commented 1 year ago

我尝试过了 没有什么效果 我朋友也编译过这个项目 碰到和我一样的问题

coomsn commented 1 year ago

我刚重新编译了一次,在ui的代理页面依然看不到节点,其他页面是正常的。 "experimental": { "clash_api": { "external_controller": "0.0.0.0:9090", // "external_ui": "./yacd", "external_ui_build_in": true, "cache_file": "./clash.db", "store_selected": true } }

0xffffharry commented 1 year ago

由于信息太少,我无法确定是源码问题。我尝试编译最新源码,入站使用Socks,并没有问题。不排除是Tun/路由配置的问题。若有Termux,你可以尝试API是否连通:curl -vv -X GET 'http://127.0.0.1:9090/proxies'

coomsn commented 1 year ago

~ $ curl -vv -X GET 'http://127.0.0.1:9090/proxies' Note: Unnecessary use of -X or --request, GET is already inferred.

coomsn commented 1 year ago

~ $ curl -vv -X GET 'http://127.0.0.1:9090/proxies' Note: Unnecessary use of -X or --request, GET is already inferred.

0xffffharry commented 1 year ago

是否有电脑,尝试打开Chrome,并打开开发者工具-网络,打开yacd,打开代理分页,查看是否有失败请求

yangtao278080785570121 commented 1 year ago

[root@yzfs-jenkins-230 ~]# curl -vv -X GET 'http://192.168.1.21:9090/proxies'

yangtao278080785570121 commented 1 year ago

Checkout the repo: https://github.com/MetaCubeX/yacd index-60c2bc7c.js:103 Version: 0.3.6 index-60c2bc7c.js:103 This web app is being served cache-first by a service worker VM508:1 Uncaught (in promise) SyntaxError: Unexpected end of JSON input at RD (index-60c2bc7c.js:103:30100) at async Promise.all (:9090/ui/index 1) at async index-60c2bc7c.js:103:30797 RD @ index-60c2bc7c.js:103 Promise.then (async) (anonymous) @ Proxies-1199dea7.js:1 (anonymous) @ Proxies-1199dea7.js:1 Ml @ index-60c2bc7c.js:41 po @ index-60c2bc7c.js:41 xv @ index-60c2bc7c.js:41 or @ index-60c2bc7c.js:39 P2 @ index-60c2bc7c.js:41 dr @ index-60c2bc7c.js:41 S0 @ index-60c2bc7c.js:41 k @ index-60c2bc7c.js:26 ce @ index-60c2bc7c.js:26 VM509:1 Uncaught (in promise) SyntaxError: Unexpected end of JSON input at RD (index-60c2bc7c.js:103:30100) at async Promise.all (:9090/ui/index 1) at async index-60c2bc7c.js:103:30797 RD @ index-60c2bc7c.js:103 Promise.then (async) (anonymous) @ Proxies-1199dea7.js:1 v @ Proxies-1199dea7.js:1

yangtao278080785570121 commented 1 year ago

网络中没有失败的请求 在控制台有失败的信息

0xffffharry commented 1 year ago

请尝试curl -vv -X GET 'http://127.0.0.1:9090/providers/proxies'

yangtao278080785570121 commented 1 year ago

[root@yzfs-jenkins-230 ~]# curl -vv -X GET 'http://192.168.1.21:9090/proxies'

0xffffharry commented 1 year ago

请检查浏览器/providers/proxies请求返回是否为json结构

yangtao278080785570121 commented 1 year ago

[root@yzfs-jenkins-230 ~]# curl -vv -X GET 'http://192.168.1.21:9090/providers/proxies'

0xffffharry commented 1 year ago

源码已更新,请重试

yangtao278080785570121 commented 1 year ago

1

yangtao278080785570121 commented 1 year ago

我重新拉取了dev-next-yaott分支 并重新进行了编译 还是很以前一样 代理页面没有任何东西

0xffffharry commented 1 year ago

查看浏览器开发者工具--控制台错误,以及请求curl -vv -X GET 'http://192.168.1.21:9090/providers/proxies',是否输出json

yangtao278080785570121 commented 1 year ago

[root@yzfs-jenkins-230 ~]# curl -vv -X GET 'http://192.168.1.21:9090/providers/proxies'

yangtao278080785570121 commented 1 year ago

Checkout the repo: https://github.com/MetaCubeX/yacd index-60c2bc7c.js:103 Version: 0.3.6 VM19:1 Uncaught (in promise) SyntaxError: Unexpected end of JSON input at RD (index-60c2bc7c.js:103:30100) at async Promise.all (:9090/ui/index 1) at async index-60c2bc7c.js:103:30797 RD @ index-60c2bc7c.js:103 Promise.then (async) (anonymous) @ Proxies-1199dea7.js:1 (anonymous) @ Proxies-1199dea7.js:1 Ml @ index-60c2bc7c.js:41 po @ index-60c2bc7c.js:41 xv @ index-60c2bc7c.js:41 or @ index-60c2bc7c.js:39 P2 @ index-60c2bc7c.js:41 dr @ index-60c2bc7c.js:41 S0 @ index-60c2bc7c.js:41 k @ index-60c2bc7c.js:26 ce @ index-60c2bc7c.js:26 index-60c2bc7c.js:103 This web app is being served cache-first by a service worker index-60c2bc7c.js:103 Content is cached for offline use.

0xffffharry commented 1 year ago

源码已更新,请重试

yangtao278080785570121 commented 1 year ago

可以了 代理有内容显示了

yangtao278080785570121 commented 1 year ago

控制台有报错 index-60c2bc7c.js:103 GET http://127.0.0.1:9090/providers/proxies 404 (Not Found)

0xffffharry commented 1 year ago

这个错误不用管,因为你没有使用proxy-provider

yangtao278080785570121 commented 1 year ago

好的 谢谢大神了 耽误您的时间了