INNER CODE UNIT · JavaScript

ipType

ClickDevTech/CELERITY-panel · index.js:510

            const ipType = indexes.find(idx => idx.name === 'ip_1_type_1');
            if (ipType && !ipType.partialFilterExpression) {
                await mongoose.connection.collection('hynodes').dropIndex('ip_1_type_1');
                logger.info('[Migration] Dropped legacy ip_1_type_1 (non-partial) index');
                await HyNode.syncIndexes();
                logger.info('[Migration] Recreated hynodes indexes with partialFilterExpression');
            }
        } catch (e) {
            logger.warn(`[Migration] hynodes index sync skipped: ${e.message}`);
        }

        // Migration: ensure all users have xrayUuid (for Xray VLESS support)
        const usersWithoutUuid = await HyUser.find({
            $or: [{ xrayUuid: { $exists: false } }, { xrayUuid: null }, { xrayUuid: '' }]
        }).select('_id');
        if (usersWithoutUuid.length > 0) {
            const crypto = require('crypto');
            const bulkOps = usersWithoutUuid.map(u => ({

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…