mirror of
				https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
				synced 2025-10-31 18:21:10 +08:00 
			
		
		
		
	feat: Add support for targetPlatform ShadowRocket
This commit is contained in:
		
							parent
							
								
									49c8f2e521
								
							
						
					
					
						commit
						848491c0f8
					
				| @ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "sub-store", | ||||
|   "version": "2.8.6", | ||||
|   "version": "2.8.7", | ||||
|   "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.", | ||||
|   "main": "src/main.js", | ||||
|   "scripts": { | ||||
|  | ||||
| @ -282,6 +282,9 @@ async function syncToGist(files) { | ||||
| async function produceArtifact({ type, name, platform }) { | ||||
|     platform = platform || 'JSON'; | ||||
| 
 | ||||
|     // produce Clash node format for ShadowRocket
 | ||||
|     if (platform === 'ShadowRocket') platform = 'Clash'; | ||||
| 
 | ||||
|     if (type === 'subscription') { | ||||
|         const allSubs = $.read(SUBS_KEY); | ||||
|         const sub = findByName(allSubs, name); | ||||
|  | ||||
| @ -51,7 +51,7 @@ async function updateGitHubAvatar() { | ||||
| } | ||||
| 
 | ||||
| async function updateArtifactStore() { | ||||
|     console.log('Updating artifact store'); | ||||
|     $.log('Updating artifact store'); | ||||
|     const settings = $.read(SETTINGS_KEY); | ||||
|     const { githubUser, gistToken } = settings; | ||||
|     if (githubUser && gistToken) { | ||||
|  | ||||
| @ -14,7 +14,7 @@ export function getPlatformFromHeaders(headers) { | ||||
|     } else if (UA.indexOf('Decar') !== -1 || UA.indexOf('Loon') !== -1) { | ||||
|         return 'Loon'; | ||||
|     } else if (UA.indexOf('Shadowrocket') !== -1) { | ||||
|         return 'Clash'; | ||||
|         return 'ShadowRocket'; | ||||
|     } else if (UA.indexOf('Stash') !== -1) { | ||||
|         return 'Stash'; | ||||
|     } else { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Peng-YM
						Peng-YM