forked from GyulyVGC/sniffnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
158 lines (135 loc) Β· 11.4 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
[package]
name = "sniffnet"
version = "1.2.2"
authors = [ "Giuliano Bellini" ]
edition = "2021"
description = "Application to comfortably monitor your network traffic"
readme = "README.md"
repository = "https://github.com/GyulyVGC/sniffnet"
license = "MIT OR Apache-2.0"
keywords = [ "filter", "network", "packet", "sniffer", "gui" ]
categories = [ "visualization", "gui", "network-programming" ]
include = [
"src/**/*",
"LICENSE-*",
"README.md",
"CHANGELOG.md",
"resources/countries_flags/**/*",
"resources/DB/*",
"resources/fonts/subset/*",
"resources/sounds/*"
]
[target."cfg(windows)"]
rustflags = ["-C", "target-feature=+crt-static"]
#βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[profile.release]
opt-level = 3
lto = true
strip = true
#βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[dependencies]
pcap = "1.1.0"
etherparse = "0.13.0"
chrono = { version = "0.4.31", default_features = false, features = ["clock"] }
indexmap = "2.0.0"
plotters = { version = "0.3.5", default_features = false, features = ["area_series"] }
iced = { version = "0.10.0", features = ["tokio", "svg", "advanced", "lazy"] }
plotters-iced = "0.9.0"
maxminddb = "0.23.0"
confy = "0.5.1"
serde = { version = "1.0.188", default_features = false, features = ["derive"] }
rodio = { version = "0.17.1", default_features = false, features = ["mp3"] }
dns-lookup = "2.0.3"
[target.'cfg(target_arch = "powerpc64")'.dependencies]
reqwest = { version = "0.11.20", features = ["json", "blocking"] }
[target.'cfg(not(target_arch = "powerpc64"))'.dependencies]
reqwest = { version = "0.11.20", default-features = false, features = ["json", "blocking", "rustls-tls"] }
#βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[dev-dependencies]
rstest = "0.18.2"
#βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[target."cfg(windows)".build-dependencies]
winres = "0.1.12"
#βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[package.metadata.cross.target.x86_64-unknown-linux-gnu]
pre-build = [
"dpkg --add-architecture amd64",
"apt update -y && apt install -y libfreetype6-dev:amd64 libexpat1-dev:amd64 libpcap-dev:amd64 libasound2-dev:amd64 libfontconfig1-dev:amd64"
]
[package.metadata.cross.target.i686-unknown-linux-gnu]
pre-build = [
"dpkg --add-architecture i386",
"apt update -y && apt install -y libfreetype6-dev:i386 libexpat1-dev:i386 libpcap-dev:i386 libasound2-dev:i386 libfontconfig1-dev:i386"
]
[package.metadata.cross.target.aarch64-unknown-linux-gnu]
pre-build = [
"dpkg --add-architecture arm64",
"apt update -y && apt install -y libfreetype6-dev:arm64 libexpat1-dev:arm64 libpcap-dev:arm64 libasound2-dev:arm64 libfontconfig1-dev:arm64"
]
[package.metadata.cross.target.armv7-unknown-linux-gnueabihf]
pre-build = [
"dpkg --add-architecture armhf",
"apt update -y && apt install -y libfreetype6-dev:armhf libexpat1-dev:armhf libpcap-dev:armhf libasound2-dev:armhf libfontconfig1-dev:armhf"
]
#βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[package.metadata.deb]
section="Network"
license-file="resources/packaging/LICENSE"
extended-description-file="resources/packaging/linux/description.txt"
maintainer-scripts="resources/packaging/linux/scripts/"
depends = "libasound2, libpcap0.8, libfontconfig1"
assets = [
["target/release/sniffnet", "/usr/bin/", "755"],
["resources/packaging/linux/sniffnet.desktop", "/usr/share/applications/", "644"],
["resources/packaging/linux/graphics/sniffnet_8x8.png", "/usr/share/icons/hicolor/8x8/apps/sniffnet.png", "644"],
["resources/packaging/linux/graphics/sniffnet_16x16.png", "/usr/share/icons/hicolor/16x16/apps/sniffnet.png", "644"],
["resources/packaging/linux/graphics/sniffnet_22x22.png", "/usr/share/icons/hicolor/22x22/apps/sniffnet.png", "644"],
["resources/packaging/linux/graphics/sniffnet_24x24.png", "/usr/share/icons/hicolor/24x24/apps/sniffnet.png", "644"],
["resources/packaging/linux/graphics/sniffnet_32x32.png", "/usr/share/icons/hicolor/32x32/apps/sniffnet.png", "644"],
["resources/packaging/linux/graphics/sniffnet_36x36.png", "/usr/share/icons/hicolor/36x36/apps/sniffnet.png", "644"],
["resources/packaging/linux/graphics/sniffnet_42x42.png", "/usr/share/icons/hicolor/42x42/apps/sniffnet.png", "644"],
["resources/packaging/linux/graphics/sniffnet_48x48.png", "/usr/share/icons/hicolor/48x48/apps/sniffnet.png", "644"],
["resources/packaging/linux/graphics/sniffnet_64x64.png", "/usr/share/icons/hicolor/64x64/apps/sniffnet.png", "644"],
["resources/packaging/linux/graphics/sniffnet_72x72.png", "/usr/share/icons/hicolor/72x72/apps/sniffnet.png", "644"],
["resources/packaging/linux/graphics/sniffnet_96x96.png", "/usr/share/icons/hicolor/96x96/apps/sniffnet.png", "644"],
["resources/packaging/linux/graphics/sniffnet_128x128.png", "/usr/share/icons/hicolor/128x128/apps/sniffnet.png", "644"],
["resources/packaging/linux/graphics/sniffnet_160x160.png", "/usr/share/icons/hicolor/160x160/apps/sniffnet.png", "644"],
["resources/packaging/linux/graphics/sniffnet_192x192.png", "/usr/share/icons/hicolor/192x192/apps/sniffnet.png", "644"],
["resources/packaging/linux/graphics/sniffnet_256x256.png", "/usr/share/icons/hicolor/256x256/apps/sniffnet.png", "644"],
["resources/packaging/linux/graphics/sniffnet_384x384.png", "/usr/share/icons/hicolor/384x384/apps/sniffnet.png", "644"],
["resources/packaging/linux/graphics/sniffnet_512x512.png", "/usr/share/icons/hicolor/512x512/apps/sniffnet.png", "644"],
["resources/packaging/linux/graphics/sniffnet_1024x1024.png", "/usr/share/icons/hicolor/1024x1024/apps/sniffnet.png", "644"]
]
#βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[package.metadata.generate-rpm]
post_install_script = "setcap cap_net_raw,cap_net_admin=eip /usr/bin/sniffnet"
pre_uninstall_script = "setcap '' /usr/bin/sniffnet"
assets = [
{ source = "target/release/sniffnet", dest = "/usr/bin/", mode = "755" },
{ source = "resources/packaging/linux/sniffnet.desktop", dest = "/usr/share/applications/", mode = "644" },
{ source = "resources/packaging/linux/graphics/sniffnet_8x8.png", dest = "/usr/share/icons/hicolor/8x8/apps/sniffnet.png", mode = "644" },
{ source = "resources/packaging/linux/graphics/sniffnet_16x16.png", dest = "/usr/share/icons/hicolor/16x16/apps/sniffnet.png", mode = "644" },
{ source = "resources/packaging/linux/graphics/sniffnet_22x22.png", dest = "/usr/share/icons/hicolor/22x22/apps/sniffnet.png", mode = "644" },
{ source = "resources/packaging/linux/graphics/sniffnet_24x24.png", dest = "/usr/share/icons/hicolor/24x24/apps/sniffnet.png", mode = "644" },
{ source = "resources/packaging/linux/graphics/sniffnet_32x32.png", dest = "/usr/share/icons/hicolor/32x32/apps/sniffnet.png", mode = "644" },
{ source = "resources/packaging/linux/graphics/sniffnet_36x36.png", dest = "/usr/share/icons/hicolor/36x36/apps/sniffnet.png", mode = "644" },
{ source = "resources/packaging/linux/graphics/sniffnet_42x42.png", dest = "/usr/share/icons/hicolor/42x42/apps/sniffnet.png", mode = "644" },
{ source = "resources/packaging/linux/graphics/sniffnet_48x48.png", dest = "/usr/share/icons/hicolor/48x48/apps/sniffnet.png", mode = "644" },
{ source = "resources/packaging/linux/graphics/sniffnet_64x64.png", dest = "/usr/share/icons/hicolor/64x64/apps/sniffnet.png", mode = "644" },
{ source = "resources/packaging/linux/graphics/sniffnet_72x72.png", dest = "/usr/share/icons/hicolor/72x72/apps/sniffnet.png", mode = "644" },
{ source = "resources/packaging/linux/graphics/sniffnet_96x96.png", dest = "/usr/share/icons/hicolor/96x96/apps/sniffnet.png", mode = "644" },
{ source = "resources/packaging/linux/graphics/sniffnet_128x128.png", dest = "/usr/share/icons/hicolor/128x128/apps/sniffnet.png", mode = "644" },
{ source = "resources/packaging/linux/graphics/sniffnet_160x160.png", dest = "/usr/share/icons/hicolor/160x160/apps/sniffnet.png", mode = "644" },
{ source = "resources/packaging/linux/graphics/sniffnet_192x192.png", dest = "/usr/share/icons/hicolor/192x192/apps/sniffnet.png", mode = "644" },
{ source = "resources/packaging/linux/graphics/sniffnet_256x256.png", dest = "/usr/share/icons/hicolor/256x256/apps/sniffnet.png", mode = "644" },
{ source = "resources/packaging/linux/graphics/sniffnet_384x384.png", dest = "/usr/share/icons/hicolor/384x384/apps/sniffnet.png", mode = "644" },
{ source = "resources/packaging/linux/graphics/sniffnet_512x512.png", dest = "/usr/share/icons/hicolor/512x512/apps/sniffnet.png", mode = "644" },
{ source = "resources/packaging/linux/graphics/sniffnet_1024x1024.png", dest = "/usr/share/icons/hicolor/1024x1024/apps/sniffnet.png", mode = "644" }
]
[package.metadata.generate-rpm.requires]
alsa-lib = "*"
libpcap = "*"
fontconfig = "*"
#βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[package.metadata.wix]
include = [".\\resources\\packaging\\windows\\setup.wxs"]