alireza0 / s-ui

An advanced Web Panel • Built for SagerNet/Sing-Box
https://t.me/XrayUI
GNU General Public License v3.0
2.62k stars 402 forks source link

JSON subscription is not working properly. #186

Closed lingbaoboy closed 3 months ago

lingbaoboy commented 3 months ago

There is a bug in the JSON subscription where the generated JSON file does not have any exit server nodes. Importing it into the Singbox client on iPhone results in an error. The DNS UI settings lack the export option. JSON subscription is not working properly.

alireza0 commented 3 months ago

All my tests was done by Sing-Box client on iPhone. I don't know what do you mean by exit server. Also there is no Export option in sing-box. Please update your client or provide more and correct information.

lingbaoboy commented 2 months ago

When I access my JSON subscription address in the browser, for example, https://xxx.xxx/sub/user?format=json, I get the following JSON file. It is obvious that this JSON file does not contain any exit nodes.

{ "dns": { "final": "local-dns", "rules": [ { "clash_mode": "Global", "server": "proxy-dns", "source_ip_cidr": [ "172.19.0.0/30" ] }, { "server": "proxy-dns", "source_ip_cidr": [ "172.19.0.0/30" ] }, { "clash_mode": "Direct", "server": "direct-dns" }, { "rule_set": [ "geosite-cn" ], "server": "direct-dns" } ], "servers": [ { "address": "1.1.1.1", "address_resolver": "local-dns", "detour": "proxy", "tag": "proxy-dns" }, { "address": "local", "detour": "direct", "tag": "local-dns" }, { "address": "rcode://success", "tag": "block" }, { "address": "https://223.6.6.6/dns-query", "detour": "direct", "tag": "direct-dns" } ], "strategy": "prefer_ipv4" }, "inbounds": [ { "auto_route": true, "endpoint_independent_nat": false, "inet4_address": "172.19.0.1/30", "mtu": 9000, "platform": { "http_proxy": { "enabled": true, "server": "127.0.0.1", "server_port": 2080 } }, "sniff": true, "stack": "system", "strict_route": false, "type": "tun" }, { "listen": "127.0.0.1", "listen_port": 2080, "sniff": true, "type": "mixed", "users": [] } ], "log": { "level": "info", "timestamp": true }, "outbounds": [ { "outbounds": [ "auto", "direct" ], "tag": "proxy", "type": "selector" }, { "interval": "10m", "outbounds": null, "tag": "auto", "tolerance": 50, "type": "urltest", "url": "http://www.gstatic.com/generate_204" }, { "tag": "direct", "type": "direct" }, { "tag": "dns-out", "type": "dns" }, { "tag": "block", "type": "block" } ], "route": { "auto_detect_interface": true, "final": "proxy", "rule_set": [ { "download_detour": "direct", "format": "binary", "tag": "geosite-ads", "type": "remote", "url": "https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@sing/geo/geosite/category-ads-all.srs" }, { "download_detour": "direct", "format": "binary", "tag": "geosite-private", "type": "remote", "url": "https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@sing/geo/geosite/private.srs" }, { "download_detour": "direct", "format": "binary", "tag": "geosite-cn", "type": "remote", "url": "https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@sing/geo/geosite/cn.srs" }, { "download_detour": "direct", "format": "binary", "tag": "geoip-private", "type": "remote", "url": "https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@sing/geo/geoip/private.srs" }, { "download_detour": "direct", "format": "binary", "tag": "geoip-cn", "type": "remote", "url": "https://testingcf.jsdelivr.net/gh/MetaCubeX/meta-rules-dat@sing/geo/geoip/cn.srs" } ], "rules": [ { "clash_mode": "Direct", "outbound": "direct" }, { "clash_mode": "Global", "outbound": "proxy" }, { "outbound": "dns-out", "protocol": "dns" }, { "outbound": "block", "rule_set": [ "geosite-ads" ] }, { "outbound": "direct", "rule_set": [ "geosite-cn", "geosite-private", "geoip-private", "geoip-cn" ] } ] } }

lingbaoboy commented 2 months ago

I have found the root cause of the issue. When I upgraded from version 0.0.5 to version 1.0.0, the error occurred. Everything worked fine when I uninstalled version 0.0.5 and did a fresh installation of version 1.0.0.

alireza0 commented 2 months ago

In Major version change, there are always some differences. I have mentioned what to do if you are going to update in release description. Please always check the release data.