mirror of
				https://github.com/v2board/v2board.git
				synced 2025-10-31 17:31:49 +08:00 
			
		
		
		
	vmess: fix possible config issue
This commit is contained in:
		| @@ -174,17 +174,20 @@ class ServerService | |||||||
|         if ($server->ruleSettings) { |         if ($server->ruleSettings) { | ||||||
|             $rules = json_decode($server->ruleSettings); |             $rules = json_decode($server->ruleSettings); | ||||||
|             // domain |             // domain | ||||||
|             if (isset($rules->domain) && !empty($rules->domain)) { |             if (isset($rules->domain)) { | ||||||
|                 $rules->domain = array_filter($rules->domain); |                 $rules->domain = array_filter($rules->domain); | ||||||
|  |                 if (!empty($rules->domain)) { | ||||||
|                     $domainObj = new \StdClass(); |                     $domainObj = new \StdClass(); | ||||||
|                     $domainObj->type = 'field'; |                     $domainObj->type = 'field'; | ||||||
|                     $domainObj->domain = $rules->domain; |                     $domainObj->domain = $rules->domain; | ||||||
|                     $domainObj->outboundTag = 'block'; |                     $domainObj->outboundTag = 'block'; | ||||||
|                     array_push($json->routing->rules, $domainObj); |                     array_push($json->routing->rules, $domainObj); | ||||||
|                 } |                 } | ||||||
|  |             } | ||||||
|             // protocol |             // protocol | ||||||
|             if (isset($rules->protocol) && !empty($rules->protocol)) { |             if (isset($rules->protocol)) { | ||||||
|                 $rules->protocol = array_filter($rules->protocol); |                 $rules->protocol = array_filter($rules->protocol); | ||||||
|  |                 if (!empty($rules->protocol)) { | ||||||
|                     $protocolObj = new \StdClass(); |                     $protocolObj = new \StdClass(); | ||||||
|                     $protocolObj->type = 'field'; |                     $protocolObj->type = 'field'; | ||||||
|                     $protocolObj->protocol = $rules->protocol; |                     $protocolObj->protocol = $rules->protocol; | ||||||
| @@ -193,6 +196,7 @@ class ServerService | |||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|     private function setTls(Server $server, object $json) |     private function setTls(Server $server, object $json) | ||||||
|     { |     { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user