This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async function operator(proxies) { | |
| for (const p of proxies) { | |
| // Пробуем достать код страны из адреса сервера, если там есть сокращение (типа .ru, .fi) | |
| const match = p.server.match(/\.([a-z]{2})$/i); | |
| if (match) { | |
| const code = match[1].toUpperCase(); | |
| const flag = code.replace(/./g, char => String.fromCodePoint(char.charCodeAt(0) + 127397)); | |
| p.name = `${flag} ${p.name}`; | |
| } else { | |
| // Если в адресе IP, просто добавим значок глобуса для красоты |