mirror of
				https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
				synced 2025-10-31 16:11:05 +08:00 
			
		
		
		
	feat: VMess 支持 kcp/quic
This commit is contained in:
		
							parent
							
								
									9e0028219d
								
							
						
					
					
						commit
						2d5ed65f8d
					
				| @ -1,6 +1,6 @@ | ||||
| { | ||||
|   "name": "sub-store", | ||||
|   "version": "2.19.52", | ||||
|   "version": "2.19.53", | ||||
|   "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.", | ||||
|   "main": "src/main.js", | ||||
|   "scripts": { | ||||
|  | ||||
| @ -473,8 +473,8 @@ function URI_VMess() { | ||||
|                 ['http'].includes(params.type) | ||||
|             ) { | ||||
|                 proxy.network = 'http'; | ||||
|             } else if (['grpc'].includes(params.net)) { | ||||
|                 proxy.network = 'grpc'; | ||||
|             } else if (['grpc', 'kcp', 'quic'].includes(params.net)) { | ||||
|                 proxy.network = params.net; | ||||
|             } else if ( | ||||
|                 params.net === 'httpupgrade' || | ||||
|                 proxy.network === 'httpupgrade' | ||||
| @ -542,6 +542,10 @@ function URI_VMess() { | ||||
|                         } | ||||
|                         proxy[`${proxy.network}-opts`] = opts; | ||||
|                     } | ||||
|                 } else if (['kcp', 'quic'].includes(proxy.network)) { | ||||
|                     proxy[`${proxy.network}-opts`] = { | ||||
|                         [`_${proxy.network}-type`]: getIfNotBlank(params.type), | ||||
|                     }; | ||||
|                 } else { | ||||
|                     delete proxy.network; | ||||
|                 } | ||||
|  | ||||
| @ -156,6 +156,16 @@ export default function URI_Producer() { | ||||
|                             'gun'; | ||||
|                         result.host = | ||||
|                             proxy[`${proxy.network}-opts`]?.['_grpc-authority']; | ||||
|                     } else if (['kcp', 'quic'].includes(proxy.network)) { | ||||
|                         result.path = | ||||
|                             proxy[`${proxy.network}-opts`]?.[ | ||||
|                                 'grpc-service-name' | ||||
|                             ]; | ||||
|                         // https://github.com/XTLS/Xray-core/issues/91
 | ||||
|                         result.type = | ||||
|                             proxy[`${proxy.network}-opts`]?.[ | ||||
|                                 `_${proxy.network}-type` | ||||
|                             ] || 'none'; | ||||
|                     } | ||||
|                 } | ||||
|                 result = 'vmess://' + Base64.encode(JSON.stringify(result)); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 xream
						xream