mirror of
https://github.com/feather-wallet/feather.git
synced 2025-01-10 21:05:00 +00:00
FeatherNode: add regex for local node detection
This commit is contained in:
parent
5edea3c436
commit
09639181ba
1 changed files with 2 additions and 1 deletions
|
@ -74,7 +74,8 @@ struct FeatherNode {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isLocal() const {
|
bool isLocal() const {
|
||||||
return (url.host() == "127.0.0.1" || url.host() == "localhost");
|
QRegularExpression localNetwork(R"((^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.))");
|
||||||
|
return (localNetwork.match(url.host()).hasMatch() || url.host() == "localhost");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isOnion() const {
|
bool isOnion() const {
|
||||||
|
|
Loading…
Reference in a new issue