File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -395,7 +395,7 @@ private static IEnumerable<Server> ParseLine(string text)
395
395
}
396
396
397
397
data . FakeType = vmess . type ;
398
- if ( ! Global . FakeTypes . Contains ( data . FakeType ) )
398
+ if ( data . FakeType . Length != 0 && ! Global . FakeTypes . Contains ( data . FakeType ) )
399
399
{
400
400
Logging . Info ( string . Format ( "不支持的 VMess 伪装类型:{0}" , data . FakeType ) ) ;
401
401
return null ;
@@ -516,7 +516,7 @@ private static IEnumerable<Server> ParseLine(string text)
516
516
}
517
517
list . Add ( NetchLink ) ;
518
518
}
519
- else if ( text . StartsWith ( "trojan://" ) )
519
+ else if ( text . StartsWith ( "trojan://" ) )
520
520
{
521
521
var data = new Server ( ) ;
522
522
data . Type = "Trojan" ;
@@ -552,7 +552,7 @@ private static IEnumerable<Server> ParseLine(string text)
552
552
var match = finder . Match ( text ) ;
553
553
if ( ! match . Success )
554
554
{
555
- throw new FormatException ( ) ;
555
+ throw new FormatException ( ) ;
556
556
}
557
557
558
558
data . Password = match . Groups [ "psk" ] . Value ;
@@ -573,6 +573,16 @@ private static IEnumerable<Server> ParseLine(string text)
573
573
return null ;
574
574
}
575
575
576
+ byte [ ] emoji_bytes = { 240 , 159 } ;
577
+ foreach ( Server node in list )
578
+ {
579
+ var remark = Encoding . UTF8 . GetBytes ( node . Remark ) ;
580
+ int start_index = 0 ;
581
+ while ( remark . Length > start_index + 1 && remark [ start_index ] == emoji_bytes [ 0 ] && remark [ start_index + 1 ] == emoji_bytes [ 1 ] )
582
+ start_index += 4 ;
583
+ node . Remark = Encoding . UTF8 . GetString ( remark . Skip ( start_index ) . ToArray ( ) ) . Trim ( ) ;
584
+ }
585
+
576
586
return list ;
577
587
}
578
588
public static string UnBase64String ( string value )
You can’t perform that action at this time.
0 commit comments