R
R
rxsx2021-09-26 16:39:05
go
rxsx, 2021-09-26 16:39:05

Is it possible to track Internet traffic using Go (and its libraries)?

Can Go (and its libraries) keep track of which application is using the internet?
Like glasswire . That is, if the application uses the Internet - it is fixed as well as its location.
Searched for queries like -

golang internet traffic monitoring
but didn't find anything. Or, in the case of windows, is it possible to implement this only on .NET?

If that's possible, then how would capturing an application's internet traffic usage roughly work?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Korotenko, 2021-09-26
@firedragon

The first is calls from x functions in your program to go
https://github.com/hanselrd/go-c-interop
iphlpapi.dll, display total traffic using the GetIfTable() function
https://docs.microsoft.com/en -us/windows/win32/api...

A
Alexander Pavlyuk, 2021-09-26
@pav5000

Traffic interception can be done using the package https://github.com/google/gopacket
It is based on libpcap

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question