SagerNet / sing-box

The universal proxy platform
https://sing-box.sagernet.org/
Other
19.69k stars 2.34k forks source link

1.8.0-beta.2 failed to load if there's a comment in multiple config files #1232

Closed lux5am closed 10 months ago

lux5am commented 10 months ago

Operating system

Android

System version

a13

Installation type

Original sing-box Command Line

If you are using a graphical client, please provide the version of the client.

modified box for root

Version

sing-box version v1.8.0-beta.2-7ec275b5 Tue Dec 12 09:21:29 UTC 2023

Environment: go1.21.5 android/arm64
Tags: with_gvisor,with_dhcp,with_wireguard,with_utls,with_clash_api,with_quic,with_ech
Revision: 7ec275b54bc49945077af16890f4f735f50e4398
CGO: enabled

Description

while loading multiple config files with a comment in one of the file it would fail to load. but it's fine if I load a single file with a comment in it. it's useful to put a note in the config file.

All good in v1.7.0-alpha

Reproduction

check, merge and run fail with below files

config.zip

Logs

sing-box check -C ./config
FATAL[0000] merge config at config/02_inbounds.json: decode source: decode value for inbounds: invalid character '/' looking for beginning of object key string
onlyno999 commented 10 months ago

parse route options: netlink socket in Android is banned by Google, use the root or system (ADB) user to run sing-box,or switch to the sing-box Adnroid graphical interface client

onlyno999 commented 10 months ago

1.8.0-beta.1Add subscription link, there is no such problem, and the new version of add subscription will pop up.

lux5am commented 10 months ago

parse route options: netlink socket in Android is banned by Google, use the root or system (ADB) user to run sing-box,or switch to the sing-box Adnroid graphical interface client

you have to use root. I'm using Box for root (magisk). anyway it's just an example. it's reproducible in windows, linux and openwrt as well.

1.8.0-beta.1Add subscription link, there is no such problem, and the new version of add subscription will pop up.

I don't understand what you are talking about

lux5am commented 10 months ago

tried latest commit. it's fine now. thanks