Description:
The script currently hardcodes "sniff": true and "sniff_override_destination": true inside the inbounds objects across multiple configuration generator functions (e.g., generate_naive_config, generate_vless_config, generate_vmess_config, etc.).
According to the official sing-box migration guide, legacy inbound fields were completely removed in sing-box 1.13.0. Because the script installs the latest version of sing-box by default, the generated config.json is invalid, causing the sing-box service to immediately crash with the following error:
FATAL decode config at ...: inbounds[0]: legacy inbound fields are deprecated in sing-box 1.11.0 and removed in sing-box 1.13.0, checkout migration...
Steps to Reproduce:
- Run the script and choose
[1] Download and install sing-box (Latest version).
- Generate any proxy node (for example,
[12] NaiveProxy).
- Check the service status:
systemctl status sing-box.
- Observe the
Result: exit-code and the FATAL decode config error in the logs.
Expected Behavior:
The script should generate a config.json compatible with sing-box 1.13.0+, where sniffing is configured as a routing rule rather than an inbound property.
Proposed Solution:
In all awk blocks within generate_*_config functions:
- Remove the print statements for
sniff and sniff_override_destination inside the inbounds generation.
- Add a new rule with
"action": "sniff" in the rules array.
Example fix for generate_naive_config:
found_rules && /"rules": \[/{
print " {";
print " \"inbound\": [\"" tag_label "\"],";
print " \"action\": \"sniff\""; print " },";
print " {";
print " \"inbound\": [\"" tag_label "\"],";
print " \"outbound\": \"direct\""; print " },";
found_rules=0}
Description:
The script currently hardcodes
"sniff": trueand"sniff_override_destination": trueinside theinboundsobjects across multiple configuration generator functions (e.g.,generate_naive_config,generate_vless_config,generate_vmess_config, etc.).According to the official sing-box migration guide, legacy inbound fields were completely removed in sing-box
1.13.0. Because the script installs the latest version of sing-box by default, the generatedconfig.jsonis invalid, causing the sing-box service to immediately crash with the following error:FATAL decode config at ...: inbounds[0]: legacy inbound fields are deprecated in sing-box 1.11.0 and removed in sing-box 1.13.0, checkout migration...Steps to Reproduce:
[1] Download and install sing-box (Latest version).[12] NaiveProxy).systemctl status sing-box.Result: exit-codeand theFATAL decode configerror in the logs.Expected Behavior:
The script should generate a
config.jsoncompatible with sing-box 1.13.0+, where sniffing is configured as a routing rule rather than an inbound property.Proposed Solution:
In all
awkblocks withingenerate_*_configfunctions:sniffandsniff_override_destinationinside theinboundsgeneration."action": "sniff"in therulesarray.Example fix for
generate_naive_config: