GyulyVGC / sniffnet

Comfortably monitor your Internet traffic 🕵️‍♂️
https://sniffnet.net
Apache License 2.0
18.59k stars 558 forks source link

How to compile ? async-net #623

Closed ds2k5 closed 1 month ago

ds2k5 commented 2 months ago

Is there an existing issue for this?

What's the problem?

Hi, using Debain 12 x86_64 rustc 1.81

  1. git clone https://github.com/GyulyVGC/sniffnet
  2. cd sniffnet
  3. cargo check Updating crates.io index error: failed to select a version for the requirement async-io = "^2.0.0" (locked to 2.3.4) candidate versions found which didn't match: 2.3.3, 2.3.2, 2.3.1, ... location searched: crates.io index required by package async-net v2.0.0 ... which satisfies dependency async-net = "^2.0.0" (locked to 2.0.0) of package ashpd v0.9.1 ... which satisfies dependency ashpd = "^0.9" (locked to 0.9.1) of package rfd v0.15.0 ... which satisfies dependency rfd = "^0.15.0" (locked to 0.15.0) of package sniffnet v1.3.1 (/home/developer/rust/sniffnet)

How to fix this issue ?

If do cargo add async-net

Updating crates.io index
  Adding async-net v2.0.0 to dependencies
Updating crates.io index

error: failed to select a version for the requirement async-io = "^2.0.0" (locked to 2.3.4) candidate versions found which didn't match: 2.3.3, 2.3.2, 2.3.1, ... location searched: crates.io index required by package async-net v2.0.0 ... which satisfies dependency async-net = "^2.0.0" (locked to 2.0.0) of package sniffnet v1.3.1 (/home/developer/rust/sniffnet)

cargo add async-io Updating crates.io index Adding async-io v2.3.3 to dependencies Updating crates.io index error: failed to select a version for the requirement async-io = "^2.3.3" (locked to 2.3.4) candidate versions found which didn't match: 2.3.3, 2.3.2, 2.3.1, ... location searched: crates.io index required by package sniffnet v1.3.1 (/home/developer/rust/sniffnet)

How did you install the app?

built locally by cloning the repository

Operating System

Linux

Additional context

No response

GyulyVGC commented 1 month ago

Can you try doing cargo update followed by cargo build?

ds2k5 commented 1 month ago

Thank you

  1. git clone https://github.com/GyulyVGC/sniffnet
  2. cd sniffnet
  3. cargo update
  4. apt-get install lib
  5. cargo build --release
  6. cp target/release/sniffnet .
  7. upx compress --brute sniffnet ( from 36MB to 12MB )
  8. ./sniffnet

it worked now !

thanks

GyulyVGC commented 1 month ago

Awesome!