@@ -76,7 +76,7 @@ object Parser {
76
76
}).filter(_ != null )
77
77
78
78
def findAll_ssr (data : CharSequence ) = pattern_ssr.findAllMatchIn(if (data == null ) " " else data).map(m => try {
79
- val uri = new String (Base64 .decode(m.group(1 ).replaceAll(" =" , " " ), Base64 .NO_PADDING | Base64 . URL_SAFE ), " UTF-8" )
79
+ val uri = new String (Base64 .decode(m.group(1 ).replaceAll(" =" , " " ), Base64 .URL_SAFE ), " UTF-8" )
80
80
decodedPattern_ssr.findFirstMatchIn(uri) match {
81
81
case Some (ss) =>
82
82
val profile = new Profile
@@ -85,23 +85,23 @@ object Parser {
85
85
profile.protocol = ss.group(4 ).toLowerCase
86
86
profile.method = ss.group(5 ).toLowerCase
87
87
profile.obfs = ss.group(6 ).toLowerCase
88
- profile.password = new String (Base64 .decode(ss.group(7 ).replaceAll(" =" , " " ), Base64 .NO_PADDING | Base64 . URL_SAFE ), " UTF-8" )
88
+ profile.password = new String (Base64 .decode(ss.group(7 ).replaceAll(" =" , " " ), Base64 .URL_SAFE ), " UTF-8" )
89
89
90
90
decodedPattern_ssr_obfsparam.findFirstMatchIn(uri) match {
91
91
case Some (param) =>
92
- profile.obfs_param = new String (Base64 .decode(param.group(1 ).replaceAll(" =" , " " ), Base64 .NO_PADDING | Base64 . URL_SAFE ), " UTF-8" )
92
+ profile.obfs_param = new String (Base64 .decode(param.group(1 ).replaceAll(" =" , " " ), Base64 .URL_SAFE ), " UTF-8" )
93
93
case _ => null
94
94
}
95
95
96
96
decodedPattern_ssr_protocolparam.findFirstMatchIn(uri) match {
97
97
case Some (param) =>
98
- profile.protocol_param = new String (Base64 .decode(param.group(1 ).replaceAll(" =" , " " ), Base64 .NO_PADDING | Base64 . URL_SAFE ), " UTF-8" )
98
+ profile.protocol_param = new String (Base64 .decode(param.group(1 ).replaceAll(" =" , " " ), Base64 .URL_SAFE ), " UTF-8" )
99
99
case _ => null
100
100
}
101
101
102
102
decodedPattern_ssr_remarks.findFirstMatchIn(uri) match {
103
103
case Some (param) =>
104
- profile.name = new String (Base64 .decode(param.group(1 ).replaceAll(" =" , " " ), Base64 .NO_PADDING | Base64 . URL_SAFE ), " UTF-8" )
104
+ profile.name = new String (Base64 .decode(param.group(1 ).replaceAll(" =" , " " ), Base64 .URL_SAFE ), " UTF-8" )
105
105
case _ => profile.name = ss.group(2 ).toLowerCase
106
106
}
107
107
0 commit comments