| 718 | |
| 719 | // Function to show missing core files error |
| 720 | function showMissingCoreFilesError() { |
| 721 | if (isWindows) { |
| 722 | dialog.showErrorBox( |
| 723 | 'Missing Core Files', |
| 724 | 'The required Xray core files were not found.\n\n' + |
| 725 | 'Please make sure you have the following files in the "core/xray" folder:\n' + |
| 726 | '- xray.exe\n' + |
| 727 | 'You can download the Xray core files from the official website and place them in the core/xray directory.' |
| 728 | ); |
| 729 | } else if (isLinux) { |
| 730 | dialog.showErrorBox( |
| 731 | 'Missing Core Files', |
| 732 | 'The required Xray core files were not found.\n\n' + |
| 733 | 'Please make sure you have the following files in the "core/linux/xray" folder:\n' + |
| 734 | '- xray\n' + |
| 735 | 'You can download the Xray core files from the official website and place them in the core/linux/xray directory.' |
| 736 | ); |
| 737 | } else { |
| 738 | dialog.showErrorBox( |
| 739 | 'Missing Core Files', |
| 740 | 'The required Xray core files were not found.\n\n' + |
| 741 | 'Please make sure you have the Xray core files in the appropriate directory.' |
| 742 | ); |
| 743 | } |
| 744 | } |
| 745 | |
| 746 | // Optimized startV2ray function with better process management |
| 747 | function startV2ray(configUrl, isSwitching = false) { |