mirror of
				https://github.com/v2board/v2board.git
				synced 2025-10-31 09:21:46 +08:00 
			
		
		
		
	Merge branch 'dev' of https://github.com/v2board/v2board into dev
This commit is contained in:
		| @@ -101,13 +101,20 @@ class ClientController extends Controller | |||||||
|         $proxyGroup = ''; |         $proxyGroup = ''; | ||||||
|         foreach ($server as $item) { |         foreach ($server as $item) { | ||||||
|             // [Proxy] |             // [Proxy] | ||||||
|             $proxies .= $item->name . ' = vmess, ' . $item->host . ', ' . $item->port . ', username=' . $user->v2ray_uuid . ', tls=' . ($item->tls ? "true" : "false"); |             $proxies .= $item->name . ' = vmess, ' . $item->host . ', ' . $item->port . ', username=' . $user->v2ray_uuid; | ||||||
|  |             if ($item->tls) { | ||||||
|  |                 $tlsSettings = json_decode($item->tlsSettings); | ||||||
|  |                 $proxies .= ', tls=' . ($item->tls ? "true" : "false"); | ||||||
|  |                 if (isset($tlsSettings->allowInsecure)) { | ||||||
|  |                   $proxies .= ', skip-cert-verify=true'; | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|             if ($item->network == 'ws') { |             if ($item->network == 'ws') { | ||||||
|                 $proxies .= ', ws=true'; |                 $proxies .= ', ws=true'; | ||||||
|                 if ($item->networkSettings) { |                 if ($item->networkSettings) { | ||||||
|                     $wsSettings = json_decode($item->networkSettings); |                     $wsSettings = json_decode($item->networkSettings); | ||||||
|                     if (isset($wsSettings->path)) $proxies .= ', ws-path=' . $wsSettings->path; |                     if (isset($wsSettings->path)) $proxies .= ', ws-path=' . $wsSettings->path; | ||||||
|                     if (isset($wsSettings->headers->Host)) $proxies .= ', ws-headers=' . $wsSettings->headers->Host; |                     if (isset($wsSettings->headers->Host)) $proxies .= ', ws-headers=host:' . $wsSettings->headers->Host; | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|             $proxies .= "\r\n"; |             $proxies .= "\r\n"; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user