27 lines
		
	
	
		
			1007 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			1007 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| const Database = require('better-sqlite3');
 | |
| const path = require('path');
 | |
| const os = require('os');
 | |
| 
 | |
| const dbPath = path.join(os.homedir(), 'seabox_fanyi_application', 'database', 'seabox.db');
 | |
| console.log('数据库路径:', dbPath);
 | |
| 
 | |
| try {
 | |
|   const db = new Database(dbPath);
 | |
|   
 | |
|   console.log('\n=== 局部代理配置 ===');
 | |
|   const proxyConfigs = db.prepare('SELECT * FROM proxy_config').all();
 | |
|   proxyConfigs.forEach(config => {
 | |
|     console.log(`ID: ${config.id}, partitionId: ${config.partitionId}, proxyIp: ${config.proxyIp}, proxyPort: ${config.proxyPort}, proxyStatus: ${config.proxyStatus}`);
 | |
|   });
 | |
|   
 | |
|   console.log('\n=== 全局代理配置 ===');
 | |
|   const globalConfigs = db.prepare('SELECT * FROM global_proxy_config').all();
 | |
|   globalConfigs.forEach(config => {
 | |
|     console.log(`ID: ${config.id}, proxyIp: ${config.proxyIp}, proxyPort: ${config.proxyPort}, proxyStatus: ${config.proxyStatus}`);
 | |
|   });
 | |
|   
 | |
|   db.close();
 | |
| } catch (error) {
 | |
|   console.error('数据库查询失败:', error.message);
 | |
| }
 | 
