Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV9: Support NdisMediumIP/DLT_RAW adapters with pcap #11997

Closed
wants to merge 7 commits into from

Conversation

TheLastRar
Copy link
Contributor

@TheLastRar TheLastRar commented Nov 11, 2024

Description of Changes

Support adapters with a capture data type of DLT_RAW.
Handle point-point links with the internal DHCP.

Rationale behind Changes

Some VPN software, like Cloudflare's WARP, uses NdisMediumIP adapters (which npcap maps to DLT_RAW) which, as its name might suggest, handles IP packets directly, instead of Ethernet frames.

These VPN adapters may also present a point-point link (having a netmask of 255.255.255.255)
PS2's networking doesn't expect such networks, instead requiring a gateway IP present within the same network.
As a workaround, we set the gateway to the PS2's IP, fudging this requirement.

Suggested Testing Steps

Test pcap on VPN adapters, such as Cloudflare's WARP or ProtonVPN.
ProtonVPN might not use the point-point netmask, so is worthwhile testing both

@TheLastRar
Copy link
Contributor Author

While this PR did add support for using pcap with the prior mentioned VPNs (or any other WireGuard based ones), the advantages of this has proved minimal.

The original reasoning behind this PR was two things relating to;
A user wanting to play an online game (Syphon Filter Online) that at the time didn't function with Sockets.
Said user wanting to use a VPN to do so.

While this PR allowed connecting* to the server over these VPNs, issues with joining games was found.
The cause of this issue appears to be related to the VPN's NAT and I don't believe to be reasonably workaround-able.
Investigations into this issue led to a similar issue in Sockets, fixing Syphon Filter Online if you aren’t behind a VPN.

*Cloudflare prevents pcap from working with SSL/TLS packets, which is needed for DNAS unless a bypass patch is used.

Additionally, as these VPN networks are point to point, they aren’t an alternative to Hamachi (or equivalent) for LAN games across the internet (where pcap has the biggest advantage over Sockets).

As such I'm closing this PR, although I'm willing to reopen it if another usecase for this is found.

@TheLastRar TheLastRar closed this Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant