We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 47c088d commit 4b441a6Copy full SHA for 4b441a6
1 file changed
app/src/main/java/io/nekohasekai/sagernet/fmt/snell/SnellFmt.kt
@@ -1,7 +1,7 @@
1
package io.nekohasekai.sagernet.fmt.snell
2
3
-import io.nekohasekai.sagernet.ktx.decodeBase64UrlSafe
4
import io.nekohasekai.sagernet.ktx.urlSafe
+import io.nekohasekai.sagernet.ktx.unUrlSafe
5
import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
6
7
// URI 格式: snell://base64(psk)@server:port?version=4&obfs-mode=http&obfs-host=bing.com&reuse=true&network=tcp#name
@@ -12,7 +12,7 @@ fun parseSnell(url: String): SnellBean {
12
return SnellBean().apply {
13
serverAddress = link.host
14
serverPort = link.port
15
- psk = link.username.decodeBase64UrlSafe()
+ psk = link.username.unUrlSafe()
16
name = link.fragment ?: ""
17
18
link.queryParameter("version")?.toIntOrNull()?.let {
0 commit comments