Improve network tags for external requests
This commit is contained in:
@@ -13,8 +13,8 @@ func init() {
|
||||
}
|
||||
|
||||
const (
|
||||
netName = "Network"
|
||||
netTagKey = "net"
|
||||
netName = "Network"
|
||||
netIPTagKey = "ip"
|
||||
)
|
||||
|
||||
// NetworkHandler handles AppImage processes on Unix systems.
|
||||
@@ -30,9 +30,9 @@ func (h *NetworkHandler) Name() string {
|
||||
func (h *NetworkHandler) TagDescriptions() []process.TagDescription {
|
||||
return []process.TagDescription{
|
||||
{
|
||||
ID: netTagKey,
|
||||
Name: "Things on the Network",
|
||||
Description: "Other (virtual) devices that make requests to Portmaster, if enabled in Portmaster.",
|
||||
ID: netIPTagKey,
|
||||
Name: "IP Address",
|
||||
Description: "The remote IP address of external requests to Portmaster, if enabled.",
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -46,7 +46,7 @@ func (h *NetworkHandler) AddTags(p *process.Process) {
|
||||
// Returns nil to skip.
|
||||
func (h *NetworkHandler) CreateProfile(p *process.Process) *profile.Profile {
|
||||
for _, tag := range p.Tags {
|
||||
if tag.Key == netTagKey {
|
||||
if tag.Key == netIPTagKey {
|
||||
return profile.New(&profile.Profile{
|
||||
Source: profile.SourceLocal,
|
||||
Name: p.Name,
|
||||
|
||||
Reference in New Issue
Block a user