microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
107.43k stars 6.34k forks source link

Hosts File Editor: Considers destination IP as duplicates #32703

Open Coldblackice opened 2 months ago

Coldblackice commented 2 months ago

Microsoft PowerToys version

0.80.1

Installation method

PowerToys auto-update

Running as admin

Yes

Area(s) with issue?

Hosts File Editor

Steps to reproduce

PowerToys "Hosts File Editor" currently factors destination IPs in its duplicate-detect function. Given that hosts files are commonly used to dead-end a range of sites and/or redirect sites to a common endpoint, this can lead to "Hosts File Editor" deeming an entire hosts file as duplicates.

Expected behavior would be evaluating only host names when determining duplicates -- or at least a setting toggle to choose which column(s) to evaluate in dupe-detection.

image

✔️ Expected Behavior

Expectation is evaluating only host names in detection of duplicates, given more than one host is commonly mapped to a specific IP (like to dead-end ad/spam domains).

Or, at least a settings toggle/checkboxes for which column(s) to evaluate for duplicates.

❌ Actual Behavior

Both columns -- IP-addresses and host-names -- are evaluated in dupe-detection, hence if more than one host is mapped to a common IP/dead-end, the entire hosts file will be deemed duplicates, nulling the ability to locate duplicate host name entries.

Other Software

Windows 10 Pro x64 | 22H2 v19045.4291

github-actions[bot] commented 2 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

davidegiacometti commented 6 days ago

Turning off the option below should achieve this: image

Also note that 0.0.0.0 has been added only in 0.82 so be sure to update PowerToys to the latest version: https://github.com/microsoft/PowerToys/releases/tag/V0.82.1

/needinfo

microsoft-github-policy-service[bot] commented 1 day ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 5 days. It will be closed if no further activity occurs within 5 days of this comment.