fix: 修复NapCat设备拟真hosts校验

This commit is contained in:
sunlei 2026-06-26 18:11:49 +08:00
parent 7942ec351b
commit dd53147127

View File

@ -134,7 +134,7 @@ if [ "${NAPCAT_REQUIRE_DEVICE_PROFILE:-0}" = "1" ]; then
echo "NapCat device profile check failed: mountinfo-host-leak:/proc/1/mountinfo" >&2
exit 78
fi
if grep -q "$(hostname)" /etc/hosts; then
if [ "$(hostname)" != "localhost" ] && grep -q "$(hostname)" /etc/hosts; then
echo "NapCat device profile check failed: hosts-still-contains-hostname" >&2
exit 78
fi