mirror of
				https://github.com/v2board/v2board.git
				synced 2025-10-31 09:21:46 +08:00 
			
		
		
		
	fix
This commit is contained in:
		| @@ -53,6 +53,14 @@ class ClientController extends Controller | |||||||
|         $uri = ''; |         $uri = ''; | ||||||
|         foreach ($server as $item) { |         foreach ($server as $item) { | ||||||
|             $uri .= "vmess=" . $item->host . ":" . $item->port . ", method=none, password=" . $user->v2ray_uuid . ", fast-open=false, udp-relay=false, tag=" . $item->name; |             $uri .= "vmess=" . $item->host . ":" . $item->port . ", method=none, password=" . $user->v2ray_uuid . ", fast-open=false, udp-relay=false, tag=" . $item->name; | ||||||
|  |             if ($item->network == 'ws') { | ||||||
|  |                 $uri .= ', obfs=' . ($item->tls ? 'wss' : 'ws'); | ||||||
|  |                 if ($item->networkSettings) { | ||||||
|  |                     $wsSettings = json_decode($item->networkSettings); | ||||||
|  |                     if (isset($wsSettings->path)) $uri .= ', obfs-uri=' . $wsSettings->path; | ||||||
|  |                     if (isset($wsSettings->headers->Host)) $uri .= ', obfs-host=' . $wsSettings->headers->Host; | ||||||
|  |                 } | ||||||
|  |             } else { | ||||||
|                 if ($item->tls) { |                 if ($item->tls) { | ||||||
|                     $tlsSettings = json_decode($item->tlsSettings); |                     $tlsSettings = json_decode($item->tlsSettings); | ||||||
|                     $uri .= ', obfs=over-tls'; |                     $uri .= ', obfs=over-tls'; | ||||||
| @@ -64,13 +72,6 @@ class ClientController extends Controller | |||||||
|                         $uri .= ', obfs-host=' . $tlsSettings->serverName; |                         $uri .= ', obfs-host=' . $tlsSettings->serverName; | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|             if ($item->network == 'ws') { |  | ||||||
|                 $uri .= ', obfs=' . ($item->tls ? 'wss' : 'ws'); |  | ||||||
|                 if ($item->networkSettings) { |  | ||||||
|                     $wsSettings = json_decode($item->networkSettings); |  | ||||||
|                     if (isset($wsSettings->path)) $uri .= ', obfs-uri=' . $wsSettings->path; |  | ||||||
|                     if (isset($wsSettings->headers->Host)) $uri .= ', obfs-host=' . $wsSettings->headers->Host; |  | ||||||
|                 } |  | ||||||
|             } |             } | ||||||
|             $uri .= "\r\n"; |             $uri .= "\r\n"; | ||||||
|         } |         } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user