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

Adding the support for WINDIVERT_LAYER_NETWORK_FORWARD #152

Open
cyberclau opened this issue Nov 13, 2023 · 2 comments
Open

Adding the support for WINDIVERT_LAYER_NETWORK_FORWARD #152

cyberclau opened this issue Nov 13, 2023 · 2 comments

Comments

@cyberclau
Copy link

Hi,

In the officiel/actual version, only the WINDIVERT_LAYER_NETWORK is supported/used. That restricts the utilization of Clumsy when only forwarding the packet (layer: WINDIVERT_LAYER_NETWORK_FORWARD) on the machine (ex: Internet Connection Sharing in Windows).

My need was to use a Windows PC to simulate a WAN link to a physical firewall. The Windows PC was sharing an Internet connexion with the use of Windows ICS functionality.

The only modification I needed in Clumsy to make it work was:
int divertStart(const char *filter, char buf[]) {
int ix;
//divertHandle = WinDivertOpen(filter, WINDIVERT_LAYER_NETWORK, DIVERT_PRIORITY, 0);
divertHandle = WinDivertOpen(filter, WINDIVERT_LAYER_NETWORK_FORWARD, DIVERT_PRIORITY, 0);

I think a "nice" combo BOX can be added to the Clumsy GUI for choosing between both layer.
What do you think?

Regards,

Claude-Olivier

@cyberclau
Copy link
Author

I forgot to mention two points:

  1. The code modification is only mandatory in \clumsy-master\src\divert.c line 83.
  2. I used the filter “true” when testing. I did the same as what is shown when running “\clumsy-master\external\WinDivert-2.2.0-C\x64\flowtrack.exe”

Regards,

Claude-Olivier

@jagt
Copy link
Owner

jagt commented Nov 19, 2023

Hi! You're welcome to file for a pull request.
See build instructions here: https://jagt.github.io/clumsy/download.html

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

No branches or pull requests

2 participants