Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
BobCoderS9 committed Dec 7, 2021
2 parents ae6f017 + a9d34aa commit 2ee0941
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Utils/AppURI.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public static function getV2RayNURI(array $item)
$return = null;
switch ($item['type']) {
case 'vmess':
if ((string)$item['vtype'] == "vmess://") {
if (isset($item['vtype']) && (string)$item['vtype'] == "vmess://") {
$node = [
'v' => "2",
'ps' => $item['remark'],
Expand Down
3 changes: 1 addition & 2 deletions src/Utils/Tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -560,10 +560,9 @@ public static function v2Array($node)
}else{
$item['enable_xtls'] = "";
}
$item['vtype'] = 'vmess://';
if (array_key_exists('enable_vless', $item)) {
$item['vtype'] = 'vless://';
} else {
$item['vtype'] = 'vmess://';
}
if (!array_key_exists('sni', $item)) {
$item['sni'] = $item['host'];
Expand Down

0 comments on commit 2ee0941

Please sign in to comment.