Asterisk4Magisk / Xray4Magisk

Xray core with service scripts for Android
387 stars 44 forks source link

sing-box wont startup with system #99

Closed defectly closed 3 months ago

defectly commented 3 months ago

In previous versions it was working even after system restart. Please return this feature 🥺

whalechoi commented 3 months ago

check helper.log, this feature no change since 1.0

defectly commented 3 months ago

check helper.log, this feature no change since 1.0

FATAL[0000] start service: initialize rule-set[2]: initial rule-set: geoip-cn: Get "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs": dial tcp 185.204.3.148:443: connect: network is unreachable | initialize rule-set[2]: initial rule-set: geosite-cn: Get "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-cn.srs": dial tcp 185.204.3.148:443: connect: network is unreachable | initialize rule-set[2]: initial rule-set: geosite-google: Get "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-google.srs": context canceled

soo sing-box core just wont start with system because of unreachable connection? what can i do with that?

whalechoi commented 3 months ago

check helper.log, this feature no change since 1.0

FATAL[0000] start service: initialize rule-set[2]: initial rule-set: geoip-cn: Get "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs": dial tcp 185.204.3.148:443: connect: network is unreachable | initialize rule-set[2]: initial rule-set: geosite-cn: Get "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-cn.srs": dial tcp 185.204.3.148:443: connect: network is unreachable | initialize rule-set[2]: initial rule-set: geosite-google: Get "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-google.srs": context canceled

soo sing-box core just wont start with system because of unreachable connection? what can i do with that?

Replace file /data/adb/service.d/xray4magisk_service.sh with:

#!/system/bin/sh

(
    until [ $(ping -q -c1 1.1.1.1 &>/dev/null && echo 1 || echo 2) -eq 1 ]; do
        sleep 5
    done
    /data/adb/xray/scripts/start.sh
) &

This scritp will wait for network ready, then startup the module service, and you can change the test IP with you want to use.

defectly commented 3 months ago

check helper.log, this feature no change since 1.0

FATAL[0000] start service: initialize rule-set[2]: initial rule-set: geoip-cn: Get "https://raw.githubusercontent.com/SagerNet/sing-geoip/rule-set/geoip-cn.srs": dial tcp 185.204.3.148:443: connect: network is unreachable | initialize rule-set[2]: initial rule-set: geosite-cn: Get "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-cn.srs": dial tcp 185.204.3.148:443: connect: network is unreachable | initialize rule-set[2]: initial rule-set: geosite-google: Get "https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-google.srs": context canceled soo sing-box core just wont start with system because of unreachable connection? what can i do with that?

Replace file /data/adb/service.d/xray4magisk_service.sh with:

#!/system/bin/sh

(
    until [ $(ping -q -c1 1.1.1.1 &>/dev/null && echo 1 || echo 2) -eq 1 ]; do
        sleep 5
    done
    /data/adb/xray/scripts/start.sh
) &

This scritp will wait for network ready, then startup the module service, and you can change the test IP with you want to use.

thank you