Skip to content

Commit

Permalink
Add REALITY share link
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed Mar 21, 2023
1 parent 79e3881 commit 6cdcbb0
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,11 @@ object AngConfigManager {
queryParam["host"], queryParam["path"], queryParam["seed"], queryParam["quicSecurity"], queryParam["key"],
queryParam["mode"], queryParam["serviceName"])
fingerprint = queryParam["fp"] ?: ""
val pbk = queryParam["pbk"] ?: ""
val sid = queryParam["sid"] ?: ""
val spx = Utils.urlDecode(queryParam["spx"] ?: "")
streamSetting.populateTlsSettings(queryParam["security"] ?: "", allowInsecure,
queryParam["sni"] ?: sni, fingerprint, queryParam["alpn"], null, null, null)
queryParam["sni"] ?: sni, fingerprint, queryParam["alpn"], pbk, sid, spx)
}
if (config == null){
return R.string.toast_incorrect_protocol
Expand Down Expand Up @@ -544,6 +547,15 @@ object AngConfigManager {
if (!TextUtils.isEmpty(tlsSetting.fingerprint)) {
dicQuery["fp"] = tlsSetting.fingerprint!!
}
if (!TextUtils.isEmpty(tlsSetting.publicKey)) {
dicQuery["pbk"] = tlsSetting.publicKey!!
}
if (!TextUtils.isEmpty(tlsSetting.shortId)) {
dicQuery["sid"] = tlsSetting.shortId!!
}
if (!TextUtils.isEmpty(tlsSetting.spiderX)) {
dicQuery["spx"] = Utils.urlEncode(tlsSetting.spiderX!!)
}
}
dicQuery["type"] = streamSetting.network.ifEmpty { V2rayConfig.DEFAULT_NETWORK }

Expand Down

0 comments on commit 6cdcbb0

Please # to comment.