diff --git a/CHANGELOG.md b/CHANGELOG.md index d61f69b3f..9f88b9135 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All Sniffnet releases with the relative changes are documented in this file. -## [UNRELEASED] +## [1.4.0] - 2025-06-27 - Import PCAP files ([#795](https://github.com/GyulyVGC/sniffnet/pull/795) — fixes [#283](https://github.com/GyulyVGC/sniffnet/issues/283)) - Donut chart reporting overall traffic statistics ([#756](https://github.com/GyulyVGC/sniffnet/pull/756) — fixes [#687](https://github.com/GyulyVGC/sniffnet/issues/687)) - Notifications: more details and other improvements ([#830](https://github.com/GyulyVGC/sniffnet/pull/830) — fixes [#637](https://github.com/GyulyVGC/sniffnet/issues/637)) @@ -16,6 +16,7 @@ All Sniffnet releases with the relative changes are documented in this file. - Portuguese ([#690](https://github.com/GyulyVGC/sniffnet/pull/690)) - Ukrainian ([#692](https://github.com/GyulyVGC/sniffnet/pull/692)) - Spanish ([#805](https://github.com/GyulyVGC/sniffnet/pull/805)) +- Do not apply new notification thresholds while user is typing them ([#777](https://github.com/GyulyVGC/sniffnet/pull/777) — fixes [#658](https://github.com/GyulyVGC/sniffnet/issues/658)) - Show more information when domain name is short ([#720](https://github.com/GyulyVGC/sniffnet/pull/720) — fixes [#696](https://github.com/GyulyVGC/sniffnet/issues/696)) - Added new themes _A11y (Night)_ and _A11y (Day)_ based on palettes optimized for Accessibility ([#785](https://github.com/GyulyVGC/sniffnet/pull/785) — fixes [#786](https://github.com/GyulyVGC/sniffnet/issues/786)) - Avoid directory traversal when selecting file name for PCAP exports ([#776](https://github.com/GyulyVGC/sniffnet/pull/776) — fixes [#767](https://github.com/GyulyVGC/sniffnet/issues/767)) @@ -23,7 +24,6 @@ All Sniffnet releases with the relative changes are documented in this file. - Update footer buttons and links ([#755](https://github.com/GyulyVGC/sniffnet/pull/755) — fixes [#553](https://github.com/GyulyVGC/sniffnet/issues/553)) - Handle errors to reduce the number of possible crash occurrences ([#784](https://github.com/GyulyVGC/sniffnet/pull/784)) - Use asynchronous channels to update app state from backend ([#806](https://github.com/GyulyVGC/sniffnet/pull/806)) -- Do not apply new notification thresholds while user is typing them ([#777](https://github.com/GyulyVGC/sniffnet/pull/777) — fixes [#658](https://github.com/GyulyVGC/sniffnet/issues/658)) - Fix _crates.io_ package for Windows ([#718](https://github.com/GyulyVGC/sniffnet/pull/718) — fixes [#681](https://github.com/GyulyVGC/sniffnet/issues/681)) - Fix crash when inserting characters longer than one byte in the text input for byte threshold notification setting ([#747](https://github.com/GyulyVGC/sniffnet/pull/747) — fixes [#744](https://github.com/GyulyVGC/sniffnet/issues/744)) - Remove pre-uninstall script on Linux (fixes [#644](https://github.com/GyulyVGC/sniffnet/issues/644)) diff --git a/Cargo.lock b/Cargo.lock index bb2687347..3d4bf9818 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -29,9 +29,9 @@ dependencies = [ [[package]] name = "adler2" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "ahash" @@ -364,7 +364,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -399,7 +399,7 @@ checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -410,9 +410,9 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "backtrace" @@ -437,9 +437,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bindgen" -version = "0.70.1" +version = "0.72.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" +checksum = "4f72209734318d0b619a5e0f5129918b848c416e122a3c4ce054e03cb87b726f" dependencies = [ "bitflags 2.9.1", "cexpr", @@ -448,9 +448,9 @@ dependencies = [ "proc-macro2", "quote", "regex", - "rustc-hash 1.1.0", + "rustc-hash 2.1.1", "shlex", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -534,9 +534,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.18.1" +version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db76d6187cd04dff33004d8e6c9cc4e05cd330500379d2394209271b4aeee" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "by_address" @@ -546,9 +546,9 @@ checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06" [[package]] name = "bytemuck" -version = "1.23.0" +version = "1.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9134a6ef01ce4b366b50689c94f82c14bc72bc5d0386829828a2e2752ef7958c" +checksum = "5c76a5792e44e4abe34d3abf15636779261d45a7450612059293d1d2cfc63422" dependencies = [ "bytemuck_derive", ] @@ -561,7 +561,7 @@ checksum = "7ecc273b49b3205b83d648f0690daa588925572cc5063745bfe547fe7ec8e1a1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -604,9 +604,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.26" +version = "1.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "956a5e21988b87f372569b66183b78babf23ebc2e744b733e4350a752c4dafac" +checksum = "d487aa071b5f64da6f19a3e848e3578944b726ee5a4854b82172f02aa876bfdc" dependencies = [ "jobserver", "libc", @@ -630,9 +630,9 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" [[package]] name = "cfg_aliases" @@ -700,14 +700,14 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] name = "clap_lex" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" +checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" [[package]] name = "clipboard-win" @@ -919,9 +919,9 @@ dependencies = [ [[package]] name = "coreaudio-sys" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ce857aa0b77d77287acc1ac3e37a05a8c95a2af3647d23b15f263bdaeb7562b" +checksum = "ceec7a6067e62d6f931a2baf6f3a751f4a892595bcec1461a3c94ef9949864b6" dependencies = [ "bindgen", ] @@ -1017,9 +1017,9 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crunchy" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "crypto-common" @@ -1152,7 +1152,7 @@ dependencies = [ "libc", "option-ext", "redox_users 0.5.0", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -1191,7 +1191,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1301,9 +1301,9 @@ checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf" [[package]] name = "enumflags2" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba2f4b465f5318854c6f8dd686ede6c0a9dc67d4b1ac241cf0eb51521a309147" +checksum = "1027f7680c853e056ebcec683615fb6fbbc07dbaa13b4d5d9442b146ded4ecef" dependencies = [ "enumflags2_derive", "serde", @@ -1311,13 +1311,13 @@ dependencies = [ [[package]] name = "enumflags2_derive" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc4caf64a58d7a6d65ab00639b046ff54399a39f5f2554728895ace4b297cd79" +checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1339,12 +1339,12 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.12" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18" +checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -1467,9 +1467,9 @@ checksum = "94c970b525906eb37d3940083aa65b95e481fc1857d467d13374e1d925cfc163" [[package]] name = "flate2" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece" +checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" dependencies = [ "crc32fast", "miniz_oxide", @@ -1566,7 +1566,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1660,7 +1660,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -1738,7 +1738,7 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.11.1+wasi-snapshot-preview1", "wasm-bindgen", ] @@ -1758,9 +1758,9 @@ dependencies = [ [[package]] name = "gif" -version = "0.13.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb2d69b19215e18bb912fa30f7ce15846e301408695e44e0ef719f1da9e19f2" +checksum = "4ae047235e33e2829703574b54fdec96bfbad892062d97fed2f76022287de61b" dependencies = [ "color_quant", "weezl", @@ -1928,9 +1928,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.3" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" +checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" [[package]] name = "hassle-rs" @@ -1961,9 +1961,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f154ce46856750ed433c8649605bf7ed2de3bc35fd9d2a9f30cddd873c80cb08" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" [[package]] name = "hex" @@ -2440,12 +2440,12 @@ checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284" [[package]] name = "indexmap" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" +checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" dependencies = [ "equivalent", - "hashbrown 0.15.3", + "hashbrown 0.15.4", ] [[package]] @@ -2543,9 +2543,9 @@ dependencies = [ [[package]] name = "jpeg-decoder" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" +checksum = "00810f1d8b74be64b13dbf3db89ac67740615d6c891f0e7b6179326533011a07" dependencies = [ "rayon", ] @@ -2620,9 +2620,9 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" [[package]] name = "libc" -version = "0.2.172" +version = "0.2.174" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" +checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" [[package]] name = "libloading" @@ -2641,7 +2641,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" dependencies = [ "cfg-if", - "windows-targets 0.53.0", + "windows-targets 0.53.2", ] [[package]] @@ -2652,13 +2652,13 @@ checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" [[package]] name = "libredox" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" +checksum = "1580801010e535496706ba011c15f8532df6b42297d2e471fec38ceadd8c0638" dependencies = [ "bitflags 2.9.1", "libc", - "redox_syscall 0.5.12", + "redox_syscall 0.5.13", ] [[package]] @@ -2767,9 +2767,9 @@ dependencies = [ [[package]] name = "mach2" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709" +checksum = "d640282b302c0bb0a2a8e0233ead9035e3bed871f0b7e81fe4a1ec829765db44" dependencies = [ "libc", ] @@ -2798,9 +2798,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.4" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[package]] name = "memmap2" @@ -2849,9 +2849,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", "simd-adler32", @@ -2864,7 +2864,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" dependencies = [ "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.11.1+wasi-snapshot-preview1", "windows-sys 0.59.0", ] @@ -3008,7 +3008,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -3033,23 +3033,24 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" +checksum = "a973b4e44ce6cad84ce69d797acf9a044532e4184c4f267913d1b546a0727b7a" dependencies = [ "num_enum_derive", + "rustversion", ] [[package]] name = "num_enum_derive" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" +checksum = "77e878c846a8abae00dd069496dbe8751b16ac1c3d6bd2a7283a938e8228f90d" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -3384,7 +3385,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -3461,7 +3462,7 @@ dependencies = [ "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -3482,7 +3483,7 @@ dependencies = [ "approx", "fast-srgb8", "palette_derive", - "phf", + "phf 0.11.3", ] [[package]] @@ -3494,7 +3495,7 @@ dependencies = [ "by_address", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -3546,7 +3547,7 @@ checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.12", + "redox_syscall 0.5.13", "smallvec", "windows-targets 0.52.6", ] @@ -3585,17 +3586,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" dependencies = [ "phf_macros", - "phf_shared", + "phf_shared 0.11.3", +] + +[[package]] +name = "phf" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "913273894cec178f401a31ec4b656318d95473527be05c0752cc41cdc32be8b7" +dependencies = [ + "phf_shared 0.12.1", + "serde", ] [[package]] name = "phf_codegen" -version = "0.11.3" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a" +checksum = "efbdcb6f01d193b17f0b9c3360fa7e0e620991b193ff08702f78b3ce365d7e61" dependencies = [ - "phf_generator", - "phf_shared", + "phf_generator 0.12.1", + "phf_shared 0.12.1", ] [[package]] @@ -3604,21 +3615,31 @@ version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" dependencies = [ - "phf_shared", + "phf_shared 0.11.3", "rand 0.8.5", ] +[[package]] +name = "phf_generator" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cbb1126afed61dd6368748dae63b1ee7dc480191c6262a3b4ff1e29d86a6c5b" +dependencies = [ + "fastrand", + "phf_shared 0.12.1", +] + [[package]] name = "phf_macros" version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" dependencies = [ - "phf_generator", - "phf_shared", + "phf_generator 0.11.3", + "phf_shared 0.11.3", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -3630,6 +3651,15 @@ dependencies = [ "siphasher", ] +[[package]] +name = "phf_shared" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06005508882fb681fd97892ecff4b7fd0fee13ef1aa569f8695dae7ab9099981" +dependencies = [ + "siphasher", +] + [[package]] name = "pico-args" version = "0.5.0" @@ -3653,7 +3683,7 @@ checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -3800,16 +3830,16 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "version_check", "yansi", ] [[package]] name = "profiling" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afbdc74edc00b6f6a218ca6a5364d6226a259d4b8ea1af4a0ea063f27e179f4d" +checksum = "3eb8486b569e12e2c32ad3e204dbaba5e4b5b216e9367044f25f1dba42341773" [[package]] name = "qoi" @@ -3872,9 +3902,9 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.12" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee4e529991f949c5e25755532370b8af5d114acae52326361d68d47af64aa842" +checksum = "fcebb1209ee276352ef14ff8732e24cc2b02bbac986cd74a4c81bcb2f9881970" dependencies = [ "cfg_aliases 0.2.1", "libc", @@ -3895,9 +3925,9 @@ dependencies = [ [[package]] name = "r-efi" -version = "5.2.0" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] name = "rand" @@ -4026,9 +4056,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.12" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "928fca9cf2aa042393a8325b9ead81d2f0df4cb12e1e24cef072922ccd99c5af" +checksum = "0d04b7d0ee6b4a0207a0a7adb104d23ecb0b47d6beae7152d0fa34b692b29fd6" dependencies = [ "bitflags 2.9.1", ] @@ -4245,7 +4275,7 @@ dependencies = [ "regex", "relative-path", "rustc_version", - "syn 2.0.101", + "syn 2.0.104", "unicode-ident", ] @@ -4261,9 +4291,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.24" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" [[package]] name = "rustc-hash" @@ -4293,7 +4323,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ "bitflags 2.9.1", - "errno 0.3.12", + "errno 0.3.13", "libc", "linux-raw-sys 0.4.15", "windows-sys 0.59.0", @@ -4306,7 +4336,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" dependencies = [ "bitflags 2.9.1", - "errno 0.3.12", + "errno 0.3.13", "libc", "linux-raw-sys 0.9.4", "windows-sys 0.59.0", @@ -4314,9 +4344,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.27" +version = "0.23.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "730944ca083c1c233a75c09f199e973ca499344a2b7ba9e755c457e86fb4a321" +checksum = "7160e3e10bf4535308537f3c4e1641468cd0e485175d6163087c0393c7d46643" dependencies = [ "once_cell", "ring", @@ -4502,7 +4532,7 @@ checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -4525,7 +4555,7 @@ checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -4578,7 +4608,7 @@ checksum = "5d69265a08751de7844521fd15003ae0a888e035773ba05695c5c759a6f89eef" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -4640,12 +4670,9 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] +checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" [[package]] name = "slotmap" @@ -4709,7 +4736,7 @@ dependencies = [ [[package]] name = "sniffnet" -version = "1.3.2" +version = "1.4.0" dependencies = [ "async-channel", "chrono", @@ -4722,9 +4749,9 @@ dependencies = [ "iced", "maxminddb", "pcap", - "phf", + "phf 0.12.1", "phf_codegen", - "phf_shared", + "phf_shared 0.12.1", "plotters", "plotters-iced", "reqwest", @@ -4771,7 +4798,7 @@ dependencies = [ "objc2-foundation 0.2.2", "objc2-quartz-core", "raw-window-handle", - "redox_syscall 0.5.12", + "redox_syscall 0.5.13", "rustix 0.38.44", "tiny-xlib", "wasm-bindgen", @@ -4920,9 +4947,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.101" +version = "2.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" +checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" dependencies = [ "proc-macro2", "quote", @@ -4946,7 +4973,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -5027,7 +5054,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -5038,7 +5065,7 @@ checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -5140,7 +5167,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -5284,13 +5311,13 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.29" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1ffbcf9c6f6b99d386e7444eb608ba646ae452a36b39737deb9663b610f662" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -5514,9 +5541,9 @@ dependencies = [ [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasi" @@ -5549,7 +5576,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "wasm-bindgen-shared", ] @@ -5584,7 +5611,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5744,9 +5771,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2853738d1cc4f2da3a225c18ec6c3721abb31961096e9dbf5ab35fa88b19cfdb" +checksum = "8782dd5a41a24eed3a4f40b606249b3e236ca61adf1f25ea4d45c73de122b502" dependencies = [ "rustls-pki-types", ] @@ -5975,7 +6002,7 @@ checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -5986,20 +6013,20 @@ checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] name = "windows-link" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" [[package]] name = "windows-registry" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3bab093bdd303a1240bb99b8aba8ea8a69ee19d34c9e2ef9594e708a4878820" +checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e" dependencies = [ "windows-link", "windows-result 0.3.4", @@ -6082,6 +6109,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.2", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -6130,9 +6166,9 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.53.0" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" +checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef" dependencies = [ "windows_aarch64_gnullvm 0.53.0", "windows_aarch64_msvc 0.53.0", @@ -6408,9 +6444,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06928c8748d81b05c9be96aad92e1b6ff01833332f281e8cfca3be4b35fc9ec" +checksum = "74c7b26e3480b707944fc872477815d29a8e429d2f93a1ce000f5fa84a15cbcd" dependencies = [ "memchr", ] @@ -6482,9 +6518,9 @@ checksum = "ec107c4503ea0b4a98ef47356329af139c0a4f7750e621cf2973cd3385ebcb3d" [[package]] name = "xcursor" -version = "0.3.8" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ef33da6b1660b4ddbfb3aef0ade110c8b8a781a3b6382fa5f2b5b040fd55f61" +checksum = "bec9e4a500ca8864c5b47b8b482a73d62e4237670e5b5f1d6b9e3cae50f28f2b" [[package]] name = "xdg-home" @@ -6559,7 +6595,7 @@ checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "synstructure", ] @@ -6643,7 +6679,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "zvariant_utils 2.1.0", ] @@ -6656,7 +6692,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "zbus_names 4.2.0", "zvariant 5.5.3", "zvariant_utils 3.2.0", @@ -6693,22 +6729,22 @@ checksum = "dd15f8e0dbb966fd9245e7498c7e9e5055d9e5c8b676b95bd67091cd11a1e697" [[package]] name = "zerocopy" -version = "0.8.25" +version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" +checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.25" +version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" +checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -6728,7 +6764,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "synstructure", ] @@ -6768,7 +6804,7 @@ checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -6817,7 +6853,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "zvariant_utils 2.1.0", ] @@ -6830,7 +6866,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", "zvariant_utils 3.2.0", ] @@ -6842,7 +6878,7 @@ checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 2.0.104", ] [[package]] @@ -6855,6 +6891,6 @@ dependencies = [ "quote", "serde", "static_assertions", - "syn 2.0.101", + "syn 2.0.104", "winnow", ] diff --git a/Cargo.toml b/Cargo.toml index 203a59d1a..1eb4d2939 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sniffnet" -version = "1.3.2" +version = "1.4.0" authors = ["Giuliano Bellini "] edition = "2024" description = "Application to comfortably monitor your network traffic" @@ -51,8 +51,8 @@ dns-lookup = "2.0.4" toml = "0.8.23" ctrlc = { version = "3.4.7", features = ["termination"] } rfd = "0.15.3" -phf = "0.11.3" -phf_shared = "0.11.3" +phf = "0.12.1" +phf_shared = "0.12.1" splines = "5.0.0" clap = { version = "4.5.40", features = ["derive"] } tokio = { version = "1.45.1", features = ["macros"] } @@ -77,8 +77,8 @@ serial_test = { version = "3.2.0", default-features = false } #─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── [build-dependencies] -phf_codegen = "0.11.3" -phf_shared = "0.11.3" +phf_codegen = "0.12.1" +phf_shared = "0.12.1" rustrict = { version = "0.7.35", default-features = false, features = ["censor"] } [target."cfg(windows)".build-dependencies] diff --git a/README.md b/README.md index 9ba58243f..4fd163140 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Application to comfortably monitor your Internet traffic.
Cross-platform. Intuitive. Reliable. Translated in:
-🇨🇳 🇩🇪 🇫🇷 🇷🇺 🇵🇹 🇪🇦 🇮🇹 🇵🇱 [+ 12 more languages](https://github.com/GyulyVGC/sniffnet/issues/60) +🇨🇳 🇩🇪 🇫🇷 🇷🇺 🇵🇹 🇪🇦 🇮🇹 🇵🇱 [+ 14 more languages](https://github.com/GyulyVGC/sniffnet/issues/60)

@@ -25,7 +25,7 @@ Translated in:
- + @@ -77,14 +77,14 @@ Not what you're looking for? Check out [alternative installation methods](https: - 📖 view overall **statistics** about your Internet traffic - 📈 view **real-time charts** about traffic intensity - 📌 keep an eye on your network even when the application is **minimized** -- 📁 **export** comprehensive capture reports as **PCAP files** +- 📁 **import** and **export** comprehensive capture reports as **PCAP files** - 🔎 identify **6000+ upper layer services**, protocols, trojans, and worms - 🌐 find out **domain name** and **ASN** of the hosts you are exchanging traffic with - 🏠 identify connections in your **local network** -- 🌍 get information about the country of remote hosts (**IP geolocation**) +- 🌍 discover the **geographical location** of remote hosts - ⭐ save your **favorite** network hosts - 🕵️‍♂️ search and **inspect** each of your network connections in real time -- 🔉 set **custom notifications** to inform you when defined network events occur +- 🔉 set custom **notifications** to inform you when defined network events occur - 🎨 choose the **style** that fits you the most, including custom themes support - ...and more! diff --git a/build.rs b/build.rs index 8ded898c9..92d90c9d1 100644 --- a/build.rs +++ b/build.rs @@ -1,6 +1,7 @@ #[cfg(windows)] extern crate winres; +use std::borrow::Cow; use std::env; use std::fs::File; use std::io::{BufRead, BufReader, BufWriter, Write}; @@ -42,14 +43,14 @@ fn build_services_phf() { let line = line_res.unwrap(); let mut parts = line.split('\t'); // we want to panic if one of the service names is invalid - let val = get_valid_service_fmt_const(parts.next().unwrap()); + let val = Cow::Owned(get_valid_service_fmt_const(parts.next().unwrap())); // we want to panic if port is not a u16, or protocol is not TCP or UDP let key = get_valid_service_query(parts.next().unwrap()); assert!(parts.next().is_none()); - services_map.entry(key, &val); + services_map.entry(key, val); num_entries += 1; } - assert_eq!(num_entries, 12078); + assert_eq!(num_entries, 12084); writeln!( &mut output, diff --git a/resources/DB/GeoLite2-ASN.mmdb b/resources/DB/GeoLite2-ASN.mmdb index 8b359ecc9..bb64f7354 100644 Binary files a/resources/DB/GeoLite2-ASN.mmdb and b/resources/DB/GeoLite2-ASN.mmdb differ diff --git a/resources/DB/GeoLite2-Country.mmdb b/resources/DB/GeoLite2-Country.mmdb index f32738e62..98d59b774 100644 Binary files a/resources/DB/GeoLite2-Country.mmdb and b/resources/DB/GeoLite2-Country.mmdb differ diff --git a/resources/repository/hr.png b/resources/repository/hr.png index dc98d3174..c74f03283 100644 Binary files a/resources/repository/hr.png and b/resources/repository/hr.png differ diff --git a/resources/repository/old/hr_1.png b/resources/repository/old/hr_1.png new file mode 100644 index 000000000..dc98d3174 Binary files /dev/null and b/resources/repository/old/hr_1.png differ diff --git a/resources/repository/pages/deep_cosmos.png b/resources/repository/pages/deep_cosmos.png new file mode 100644 index 000000000..ba27e9ced Binary files /dev/null and b/resources/repository/pages/deep_cosmos.png differ diff --git a/resources/repository/pages/inspect.png b/resources/repository/pages/inspect.png index 544ca43c9..b6a891699 100644 Binary files a/resources/repository/pages/inspect.png and b/resources/repository/pages/inspect.png differ diff --git a/resources/repository/pages/notifications.png b/resources/repository/pages/notifications.png index ebe3ee248..951c17134 100644 Binary files a/resources/repository/pages/notifications.png and b/resources/repository/pages/notifications.png differ diff --git a/resources/repository/pages/overview.png b/resources/repository/pages/overview.png index 25bb095de..5d670af96 100644 Binary files a/resources/repository/pages/overview.png and b/resources/repository/pages/overview.png differ diff --git a/resources/repository/pages/thumbnail.png b/resources/repository/pages/thumbnail.png index fb33a2491..90cc7d109 100644 Binary files a/resources/repository/pages/thumbnail.png and b/resources/repository/pages/thumbnail.png differ diff --git a/resources/repository/roadmap.png b/resources/repository/roadmap.png index ce4d52d33..9827f01e8 100644 Binary files a/resources/repository/roadmap.png and b/resources/repository/roadmap.png differ diff --git a/services.txt b/services.txt index 68e24b1e5..502ba5d6e 100644 --- a/services.txt +++ b/services.txt @@ -4930,6 +4930,7 @@ f5-globalsite 2792/tcp f5-globalsite 2792/udp initlsmsad 2793/tcp initlsmsad 2793/udp +urp 2794/tcp livestats 2795/tcp livestats 2795/udp ac-tech 2796/tcp @@ -9185,6 +9186,7 @@ fis 5912/tcp fis 5912/udp ads-c 5913/tcp ads-c 5913/udp +ipsdtls 5914/tcp teamviewer 5938/tcp indy 5963/tcp indy 5963/udp @@ -9489,6 +9491,7 @@ scup-disc 6315/udp abb-escp 6316/tcp abb-escp 6316/udp nav-data-cmd 6317/tcp +iona-data 6318/tcp repsvc 6320/tcp repsvc 6320/udp emp-server1 6321/tcp @@ -10149,6 +10152,7 @@ dell-eql-asm 7569/tcp aries-kfinder 7570/tcp aries-kfinder 7570/udp coherence 7574/tcp +wtmi-panel 7575/tcp sun-lm 7588/tcp sun-lm 7588/udp qaz 7597/tcp @@ -10473,6 +10477,7 @@ pando-sec 8276/udp synapse-nhttp 8280/tcp synapse-nhttp 8280/udp libelle 8282/tcp +winbox 8291/tcp blp3 8292/tcp blp3 8292/udp hiperscan-id 8293/tcp @@ -11737,6 +11742,7 @@ flexlm9 27009/tcp flex-lm 27009/udp flexlm10 27010/tcp halflife 27015/udp +chlenix 27016/tcp mongod 27017/tcp mongod 27018/tcp mongod 27019/tcp diff --git a/src/chart/manage_chart_data.rs b/src/chart/manage_chart_data.rs index 5686fb7b5..27558ec38 100644 --- a/src/chart/manage_chart_data.rs +++ b/src/chart/manage_chart_data.rs @@ -16,11 +16,11 @@ impl TrafficChart { self.ticks += 1; #[allow(clippy::cast_precision_loss)] - let out_bytes_entry = -1.0 * info_traffic_msg.tot_data_info.outgoing_bytes() as f32; + let out_bytes_entry = -(info_traffic_msg.tot_data_info.outgoing_bytes() as f32); #[allow(clippy::cast_precision_loss)] let in_bytes_entry = info_traffic_msg.tot_data_info.incoming_bytes() as f32; #[allow(clippy::cast_precision_loss)] - let out_packets_entry = -1.0 * info_traffic_msg.tot_data_info.outgoing_packets() as f32; + let out_packets_entry = -(info_traffic_msg.tot_data_info.outgoing_packets() as f32); #[allow(clippy::cast_precision_loss)] let in_packets_entry = info_traffic_msg.tot_data_info.incoming_packets() as f32; @@ -141,8 +141,8 @@ pub struct ChartSeries { } fn reduce_all_time_data(all_time: &mut Vec<(f32, f32)>) { - // bisect data until we have less than 300 points - while all_time.len() > 300 { + // bisect data until we have less than 150 points + while all_time.len() > 150 { let mut new_vec = Vec::new(); all_time.iter().enumerate().for_each(|(i, (x, y))| { if i % 2 == 0 { @@ -155,6 +155,58 @@ fn reduce_all_time_data(all_time: &mut Vec<(f32, f32)>) { } } +// impl TrafficChart { +// use crate::gui::styles::types::style_type::StyleType; +// use crate::translations::types::language::Language; +// use std::io::Read; +// pub fn sample_for_screenshot() -> Self { +// let get_rand = |delta: f32| { +// let mut f = std::fs::File::open("/dev/urandom").unwrap(); +// let mut buf = [0u8; 1]; +// f.read_exact(&mut buf).unwrap(); +// let x = buf[0]; +// x as f32 / 255.0 * 2.0 * delta - delta +// }; +// +// let mut chart = TrafficChart::new(StyleType::default(), Language::default()); +// +// chart.ticks = 5 * 60 - 2; +// let x_range = chart.ticks - 30..chart.ticks; +// +// let in_base = 35_000.0; +// let in_delta = 7_000.0; +// let out_base = -15_000.0; +// let out_delta = 3_000.0; +// +// chart.in_bytes.spline = Spline::from_vec( +// x_range +// .clone() +// .map(|x| { +// Key::new( +// x as f32, +// in_base + get_rand(in_delta), +// Interpolation::Cosine, +// ) +// }) +// .collect(), +// ); +// chart.out_bytes.spline = Spline::from_vec( +// x_range +// .map(|x| { +// Key::new( +// x as f32, +// out_base + get_rand(out_delta), +// Interpolation::Cosine, +// ) +// }) +// .collect(), +// ); +// chart.min_bytes = get_min(&chart.out_bytes); +// chart.max_bytes = get_max(&chart.in_bytes); +// chart +// } +// } + #[cfg(test)] mod tests { use splines::{Interpolation, Key, Spline}; diff --git a/src/chart/types/traffic_chart.rs b/src/chart/types/traffic_chart.rs index e89f9a2d4..835ff54c5 100644 --- a/src/chart/types/traffic_chart.rs +++ b/src/chart/types/traffic_chart.rs @@ -331,8 +331,8 @@ impl Chart for TrafficChart { } } -const PTS: usize = 300; fn sample_spline(spline: &Spline) -> Vec<(f32, f32)> { + let pts = spline.len() * 10; // 10 samples per key let mut ret_val = Vec::new(); let len = spline.len(); let first_x = spline @@ -344,8 +344,8 @@ fn sample_spline(spline: &Spline) -> Vec<(f32, f32)> { .unwrap_or(&Key::new(0.0, 0.0, Interpolation::Cosine)) .t; #[allow(clippy::cast_precision_loss)] - let delta = (last_x - first_x) / (PTS as f32 - 1.0); - for i in 0..PTS { + let delta = (last_x - first_x) / (pts as f32 - 1.0); + for i in 0..pts { #[allow(clippy::cast_precision_loss)] let x = first_x + delta * i as f32; let p = spline.clamped_sample(x).unwrap_or_default(); @@ -358,7 +358,7 @@ fn sample_spline(spline: &Spline) -> Vec<(f32, f32)> { mod tests { use splines::{Interpolation, Key, Spline}; - use crate::chart::types::traffic_chart::{PTS, sample_spline}; + use crate::chart::types::traffic_chart::sample_spline; #[test] fn test_spline_samples() { @@ -401,14 +401,15 @@ mod tests { let eps = 0.001; + let pts = spline.len() * 10; let samples = sample_spline(&spline); - assert_eq!(samples.len(), PTS); + assert_eq!(samples.len(), pts); let delta = samples[1].0 - samples[0].0; assert_eq!(samples[0].0, 0.0); assert_eq!(samples[0].1, -500.0); - for i in 0..PTS - 1 { + for i in 0..pts - 1 { assert_eq!( (samples[i + 1].0 * 10_000.0 - samples[i].0 * 10_000.0).round() / 10_000.0, (delta * 10_000.0).round() / 10_000.0 @@ -417,7 +418,7 @@ mod tests { assert!(samples[i].1 >= -1000.0 - eps); assert!(samples[i + 1].1 < samples[i].1 + eps); } - assert_eq!(samples[PTS - 1].0, 28.0); - assert_eq!(samples[PTS - 1].1, -1000.0); + assert_eq!(samples[pts - 1].0, 28.0); + assert_eq!(samples[pts - 1].1, -1000.0); } } diff --git a/src/gui/pages/settings_general_page.rs b/src/gui/pages/settings_general_page.rs index 45496adc2..f4b2aafc3 100644 --- a/src/gui/pages/settings_general_page.rs +++ b/src/gui/pages/settings_general_page.rs @@ -3,7 +3,7 @@ use iced::widget::tooltip::Position; use iced::widget::{ Column, Container, PickList, Row, Rule, Slider, Space, Text, Tooltip, button, vertical_space, }; -use iced::{Alignment, Font, Length}; +use iced::{Alignment, Font, Length, Padding}; use crate::gui::components::button::{button_open_file, row_open_link_tooltip}; use crate::gui::components::tab::get_settings_tabs; @@ -18,9 +18,9 @@ use crate::mmdb::types::mmdb_reader::{MmdbReader, MmdbReaders}; use crate::translations::translations::language_translation; use crate::translations::translations_2::country_translation; use crate::translations::translations_3::{ - learn_more_translation, mmdb_files_translation, params_not_editable_translation, - zoom_translation, + mmdb_files_translation, params_not_editable_translation, zoom_translation, }; +use crate::translations::translations_4::share_feedback_translation; use crate::utils::formatted_strings::get_path_termination_string; use crate::utils::types::file_info::FileInfo; use crate::utils::types::icon::Icon; @@ -133,7 +133,7 @@ fn language_picklist<'a>(language: Language, font: Font) -> Container<'a, Messag .width(20) .class(ButtonType::Alert), row_open_link_tooltip( - "The selected language is not\nfully updated to version 1.3", + "The selected language is not\nfully updated to version 1.4", font, ), Position::FollowCursor, @@ -206,7 +206,7 @@ fn need_help<'a>(language: Language, font: Font) -> Container<'a, Message, Style let content = Column::new() .align_x(Alignment::Center) .push( - Text::new(learn_more_translation(language)) + Text::new(share_feedback_translation(language)) .class(TextType::Subtitle) .size(FONT_SIZE_SUBTITLE) .font(font), @@ -215,18 +215,18 @@ fn need_help<'a>(language: Language, font: Font) -> Container<'a, Message, Style .push( Tooltip::new( button( - Icon::Book + Icon::Feedback .to_text() .align_y(Alignment::Center) .align_x(Alignment::Center) - .size(22) + .size(20) .line_height(LineHeight::Relative(1.0)), ) - .on_press(Message::OpenWebPage(WebPage::Wiki)) - .padding(2) + .on_press(Message::OpenWebPage(WebPage::Issues)) + .padding(Padding::new(2.0).top(5)) .height(40) .width(60), - row_open_link_tooltip("Wiki", font), + row_open_link_tooltip("GitHub Issues", font), Position::Right, ) .gap(5) diff --git a/src/networking/manage_packets.rs b/src/networking/manage_packets.rs index f8b501ca5..90037db66 100644 --- a/src/networking/manage_packets.rs +++ b/src/networking/manage_packets.rs @@ -1552,7 +1552,7 @@ mod tests { #[test] fn test_all_services_map_key_and_values_are_valid() { - assert_eq!(SERVICES.len(), 12078); + assert_eq!(SERVICES.len(), 12084); let mut distinct_services = HashSet::new(); for (sq, s) in &SERVICES { // only tcp or udp @@ -1573,7 +1573,7 @@ mod tests { // just to count and verify number of distinct services distinct_services.insert(name.to_string()); } - assert_eq!(distinct_services.len(), 6450); + assert_eq!(distinct_services.len(), 6456); } #[test] diff --git a/src/translations/translations_3.rs b/src/translations/translations_3.rs index 53d2e51f9..25f5e4918 100644 --- a/src/translations/translations_3.rs +++ b/src/translations/translations_3.rs @@ -550,28 +550,28 @@ pub fn thumbnail_mode_translation(language: Language) -> &'static str { } } -pub fn learn_more_translation(language: Language) -> &'static str { - match language { - Language::EN => "Do you want to learn more?", - // Language::FA => "آیا می خواهید بیشتر یاد بگیرید؟", - Language::IT => "Vuoi saperne di più?", - Language::FR => "Voulez-vous en savoir davantage?", - Language::DE => "Mehr erfahren", - Language::PL => "Chcesz dowiedzieć się więcej?", - Language::RU => "Хотите узнать больше?", - Language::RO => "Vrei să înveți mai multe?", - Language::JA => "もっと知りたいですか?", - Language::UZ => "Ko'proq bilishni hohlaysizmi?", - Language::SV => "Vill du veta mer?", - Language::VI => "Bạn có muốn tìm hiểu thêm?", - Language::ZH => "想知道更多吗?", - Language::ZH_TW => "想了解更多嗎?", - Language::KO => "더 자세히 알고 싶으십니까?", - Language::TR => "Daha fazlasını öğrenmek ister misin?", - Language::PT => "Quer aprender mais?", - Language::UK => "Бажаєте дізнатись більше?", - Language::ID => "Apakah kamu mau belajar lebih lanjut?", - Language::ES => "¿Quieres aprender más?", - _ => "Do you want to learn more?", - } -} +// pub fn learn_more_translation(language: Language) -> &'static str { +// match language { +// Language::EN => "Do you want to learn more?", +// // Language::FA => "آیا می خواهید بیشتر یاد بگیرید؟", +// Language::IT => "Vuoi saperne di più?", +// Language::FR => "Voulez-vous en savoir davantage?", +// Language::DE => "Mehr erfahren", +// Language::PL => "Chcesz dowiedzieć się więcej?", +// Language::RU => "Хотите узнать больше?", +// Language::RO => "Vrei să înveți mai multe?", +// Language::JA => "もっと知りたいですか?", +// Language::UZ => "Ko'proq bilishni hohlaysizmi?", +// Language::SV => "Vill du veta mer?", +// Language::VI => "Bạn có muốn tìm hiểu thêm?", +// Language::ZH => "想知道更多吗?", +// Language::ZH_TW => "想了解更多嗎?", +// Language::KO => "더 자세히 알고 싶으십니까?", +// Language::TR => "Daha fazlasını öğrenmek ister misin?", +// Language::PT => "Quer aprender mais?", +// Language::UK => "Бажаєте дізнатись більше?", +// Language::ID => "Apakah kamu mau belajar lebih lanjut?", +// Language::ES => "¿Quieres aprender más?", +// _ => "Do you want to learn more?", +// } +// } diff --git a/src/translations/translations_4.rs b/src/translations/translations_4.rs index c40e30f95..41f96f856 100644 --- a/src/translations/translations_4.rs +++ b/src/translations/translations_4.rs @@ -16,14 +16,14 @@ pub fn reserved_address_translation(language: Language, info: &str) -> String { } } -// pub fn share_feedback_translation(language: Language) -> &'static str { -// match language { -// Language::EN => "Share your feedback", -// Language::IT => "Condividi il tuo feedback", -// Language::ZH_TW => "分享您的意見回饋", -// _ => "Share your feedback", -// } -// } +pub fn share_feedback_translation(language: Language) -> &'static str { + match language { + Language::EN => "Share your feedback", + Language::IT => "Condividi il tuo feedback", + Language::ZH_TW => "分享您的意見回饋", + _ => "Share your feedback", + } +} // refers to bytes or packets excluded because of the filters pub fn excluded_translation(language: Language) -> &'static str { @@ -79,3 +79,38 @@ pub fn data_exceeded_translation(language: Language) -> &'static str { _ => "Data threshold exceeded", } } + +#[allow(dead_code)] +pub fn bits_exceeded_translation(language: Language) -> &'static str { + match language { + Language::EN => "Bits threshold exceeded", + Language::IT => "Soglia di bit superata", + _ => "Bits threshold exceeded", + } +} + +#[allow(dead_code)] +pub fn bits_translation(language: Language) -> &'static str { + match language { + Language::EN | Language::IT => "Bits", + _ => "Bits", + } +} + +#[allow(dead_code)] +pub fn pause_translation(language: Language) -> &'static str { + match language { + Language::EN => "Pause", + Language::IT => "Pausa", + _ => "Pause", + } +} + +#[allow(dead_code)] +pub fn resume_translation(language: Language) -> &'static str { + match language { + Language::EN => "Resume", + Language::IT => "Riprendi", + _ => "Resume", + } +} diff --git a/src/translations/types/language.rs b/src/translations/types/language.rs index 5212fce1b..b80b814bb 100644 --- a/src/translations/types/language.rs +++ b/src/translations/types/language.rs @@ -115,28 +115,7 @@ impl Language { } pub fn is_up_to_date(self) -> bool { - matches!( - self, - Language::FR - | Language::EN - | Language::IT - | Language::DE - | Language::PL - | Language::RU - | Language::RO - | Language::JA - | Language::UZ - | Language::SV - | Language::VI - | Language::ZH - | Language::ZH_TW - | Language::KO - | Language::TR - | Language::PT - | Language::UK - | Language::ID - | Language::ES - ) + matches!(self, Language::EN | Language::IT) } } diff --git a/src/utils/types/icon.rs b/src/utils/types/icon.rs index cb708e0e8..87f16a393 100644 --- a/src/utils/types/icon.rs +++ b/src/utils/types/icon.rs @@ -19,6 +19,7 @@ pub enum Icon { Generals, Error, // Expand, + Feedback, File, Forbidden, Funnel, @@ -67,6 +68,7 @@ impl Icon { Icon::Clock => '9', Icon::Generals => 'Q', Icon::Error => 'U', + Icon::Feedback => '=', Icon::File => '8', Icon::Forbidden => 'x', Icon::Funnel => 'V', diff --git a/src/utils/types/web_page.rs b/src/utils/types/web_page.rs index 2c161bd70..3795bc017 100644 --- a/src/utils/types/web_page.rs +++ b/src/utils/types/web_page.rs @@ -13,6 +13,8 @@ pub enum WebPage { WebsiteSponsor, /// Sniffnet Roadmap Roadmap, + /// Sniffnet issues on GitHub + Issues, /// Sniffnet issue #60 on GitHub IssueLanguages, /// Sniffnet Wiki @@ -30,6 +32,7 @@ impl WebPage { WebPage::WebsiteDownload => "https://www.sniffnet.net/download", WebPage::WebsiteNews => "https://www.sniffnet.net/news", WebPage::Roadmap => "https://whimsical.com/sniffnet-roadmap-Damodrdfx22V9jGnpHSCGo", + WebPage::Issues => "https://github.com/GyulyVGC/sniffnet/issues", WebPage::IssueLanguages => "https://github.com/GyulyVGC/sniffnet/issues/60", WebPage::Wiki => "https://github.com/GyulyVGC/sniffnet/wiki", WebPage::MyGitHub => "https://github.com/GyulyVGC",