523 Origin is unreachable

I use Workers proxy my website to escape CN ICP
When worker is working,I use route domain access my website,It returned 523
If i use worker domain access,I can see my website
This is script(I used * to block some information)

// Custom domain of your WorkersProxy.
const main_domain = 'http://*.nya.al/'

// Subdomain of your Cloudflare Worker.
const workers_domain = 'https://shy-sea-*.shadowblog.workers.dev'

// Website you intended to retrieve for users.
const upstream = 'http://*.nya.al:2082/'

// Website you intended to retrieve for users using mobile devices.
const upstream_mobile = 'http://*.nya.al:2082/'

// Countries and regions where you wish to suspend your service.
const blocked_region = []

// IP addresses which you wish to block from using your service.
const blocked_ip_address = []

addEventListener('fetch', event => {
    event.respondWith(fetchAndApply(event.request));
})

async function fetchAndApply(request) {


    const user_agent = request.headers.get('user-agent');
    let response = null;
    let url = request.url;

    if (device_status(user_agent)){
        url = url.replace(main_domain, upstream);
        url = url.replace(workers_domain, upstream);
    } else {
        url = url.replace(main_domain, upstream_mobile);
        url = url.replace(workers_domain, upstream_mobile);
    }
    let method = request.method;
    let headers = request.headers;
    response = fetch(url, {
        method: method,
        headers: headers
    })
    return response;
}

function device_status (userAgentInfo) {
    var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"];
    var flag = true;
    for (var v = 0; v < Agents.length; v++) {
        if (userAgentInfo.indexOf(Agents[v]) > 0) {
            flag = false;
            break;
        }
    }
    return flag;
}