Skip to content

Conversation

@snigdhachoudhury
Copy link

Description

This PR addresses Issue #138 by improving the error handling logic within fakenet/diverters/windows.py.

Previously, when GetBestInterface failed (common in isolated VM environments), the tool would simply log "Failed calling GetBestInterface" and exit, leaving the user without clear direction.

Changes Proposed

Refactored get_best_interface to capture and log the specific Windows error code returned by iphlpapi.

Added comprehensive troubleshooting logs that guide the user to check for common configuration issues (e.g., missing network adapter, invalid IP, or disconnected Host-only/NAT interface).

@google-cla
Copy link

google-cla bot commented Nov 22, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@tinajohnson
Copy link
Contributor

tinajohnson commented Dec 18, 2025

Hi @snigdhachoudhury,

Thank you for the PR! I will review and merge this when I get a chance (likely early January).

@tinajohnson tinajohnson added this to the v3.6 milestone Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants