放一个甲骨文全区测速脚本在这儿

const ping = require('ping');

// 区域列表
const regions = [
    'ap-tokyo-1',        // Japan East (Tokyo)
    'ap-seoul-1',        // South Korea Central (Seoul)
    'ap-singapore-1',    // Singapore
    'ap-sydney-1',       // Australia East (Sydney)
    'ap-melbourne-1',    // Australia Southeast (Melbourne)
    'me-abu-dhabi-1',    // UAE Central (Abu Dhabi)
    'me-dubai-1',        // UAE East (Dubai)
    'me-jeddah-1',       // Saudi Arabia West (Jeddah)
    'eu-frankfurt-1',    // Germany Central (Frankfurt)
    'eu-zurich-1',       // Switzerland North (Zurich)
    'eu-amsterdam-1',    // Netherlands Northwest (Amsterdam)
    'eu-marseille-1',    // France South (Marseille)
    'eu-milan-1',        // Italy Northwest (Milan)
    'eu-cardiff-1',      // UK West (Newport)
    'uk-london-1',       // UK South (London)
    'ca-montreal-1',     // Canada Southeast (Montreal)
    'ca-toronto-1',      // Canada Southeast (Toronto)
    'sa-santiago-1',     // Chile Central (Santiago)
    'sa-valparaiso-1',   // Chile West (Valparaiso)
    'sa-bogota-1',       // Colombia Central (Bogota)
    'sa-saopaulo-1',     // Brazil East (Sao Paulo)
    'sa-vinhedo-1',      // Brazil South East (Vinhedo)
    'us-ashburn-1',      // US East (Ashburn)
    'us-chicago-1',      // US Midwest (Chicago)
    'us-phoenix-1',      // US West (Phoenix)
    'us-sanjose-1',      // US West (San Jose)
    'mx-queretaro-1',    // Mexico Central (Queretaro)
    'mx-monterrey-1',    // Mexico Northeast (Monterrey)
    'eu-paris-1',        // France Central (Paris)
    'af-johannesburg-1', // South Africa Central (Johannesburg)
    'eu-madrid-1',       // Spain Central (Madrid)
    'eu-stockholm-1',    // Sweden Central (Stockholm)
    'il-jerusalem-1',    // Israel Central (Jerusalem)
    'ap-hyderabad-1',    // India South (Hyderabad)
    'ap-mumbai-1',       // India West (Mumbai)
];


const generateUrls = (regions) => {
    return regions.map(region => `objectstorage.${region}.oci.oraclecloud.com`);
};

const testRegions = async () => {
    const urls = generateUrls(regions);
    for (const url of urls) {
        try {
            const res = await ping.promise.probe(url, {
                timeout: 2 
            });
            console.log(`Region: ${url}, Alive: ${res.alive}, Time: ${res.time}ms`);
        } catch (error) {
            console.log(`Error testing ${url}:`, error.message);
        }
    }
};

testRegions();


放一个甲骨文全区测速脚本在这儿
http://localhost:8090/archives/fang-yi-ge-jia-gu-wen-quan-qu-ce-su-jiao-ben-zai-zhe-er
作者
luobo233
发布于
2025年01月24日
许可协议