$res_account[0]['uid'], "state"=>'1', "host"=>"vmess.yimian.xyz", "uuid"=>$item, "comments"=>"auto by v2ray.api" )); $o .= gCode('vmess.yimian.xyz', $item); echo base64_encode($o); die(); } } echo ''; }else{ echo base64_encode($o); } $o = ''; function gCode($host, $uuid){ if($host == 'vmess.yimian.xyz'){ $pack = array( "v" => "2", "ps" => "Los_Angeles", "add" => "vmess.yimian.xyz", "port" => "443", "id" => $uuid, "aid" => "0", "net" => "ws", "type" => "none", "host" => $host, "path" => "/", "tls" => "tls" ); //return 'vless://'.$uuid.'@v-usa.yimian.xyz:443?encryption=none&security=tls&type=ws&host=v-usa.yimian.xyz&path=%2f#Los_Angeles'; }elseif($host == 'v-china.yimian.xyz'){ $pack = array( "v" => "2", "ps" => "China-Taian", "add" => "v-china.yimian.xyz", "port" => "443", "id" => $uuid, "aid" => "0", "net" => "ws", "type" => "none", "host" => $host, "path" => "/", "tls" => "tls" ); //return 'vless://'.$uuid.'@v-china.yimian.xyz:443?encryption=none&security=tls&type=ws&host=v-china.yimian.xyz&path=%2f#China-Taian'; }else{ $pack = array( "v" => "2", "ps" => "Unknown", "add" => $host, "port" => "443", "id" => $uuid, "aid" => "0", "net" => "ws", "type" => "none", "host" => $host, "path" => "/", "tls" => "tls" ); } return 'vmess://'.base64_encode(json_encode($pack)); }