adds local servers to the "local definition" of the Normalized Url
This commit is contained in:
+1
-1
@@ -43,4 +43,4 @@ fun NormalizedRelayUrl.toHttp() =
|
|||||||
|
|
||||||
fun NormalizedRelayUrl.isOnion() = url.endsWith(".onion/")
|
fun NormalizedRelayUrl.isOnion() = url.endsWith(".onion/")
|
||||||
|
|
||||||
fun NormalizedRelayUrl.isLocalHost() = url.contains("127.0.0.1") || url.contains("localhost")
|
fun NormalizedRelayUrl.isLocalHost() = url.contains("127.0.0.1") || url.contains("localhost") || url.contains(".local:")
|
||||||
|
|||||||
+1
-1
@@ -27,7 +27,7 @@ val normalizedUrls = LruCache<String, NormalizedRelayUrl>(5000)
|
|||||||
|
|
||||||
class RelayUrlNormalizer {
|
class RelayUrlNormalizer {
|
||||||
companion object {
|
companion object {
|
||||||
fun isLocalHost(url: String) = url.contains("127.0.0.1") || url.contains("localhost")
|
fun isLocalHost(url: String) = url.contains("127.0.0.1") || url.contains("localhost") || url.contains(".local:")
|
||||||
|
|
||||||
fun isOnion(url: String) = url.endsWith(".onion") || url.endsWith(".onion/")
|
fun isOnion(url: String) = url.endsWith(".onion") || url.endsWith(".onion/")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user