Commit Graph

  • 0a70d4120d - Remove duplicate code from last commit. basil00 2014-11-13 18:52:16 +08:00
  • 4edd82f55f - Ignore the checksum info for loopback packets. This info seems to be unreliable for whatever reason, so better to ignore until a better solution is found. basil00 2014-11-13 18:47:46 +08:00
  • 7235b687b3 - WinDivertHelperParsePacket() now skips IPv6 extension headers. basil00 2014-11-10 19:16:33 +08:00
  • 7952724127 - Driver now calculates checksums for IPv6 packets (fix issue #28). - Bump version to 1.1.7 basil00 2014-11-09 12:44:21 +08:00
  • d46a902c90 - Fix issue #29 found by MarlosChida: the IPv6 pseudo-header definition was incorrect leading to invalid checksums. basil00 2014-11-08 15:15:54 +08:00
  • bbf06c9503 - Fix missing '\'. basil00 2014-09-16 00:04:07 +08:00
  • d43aa57014 - Reduce number of work items to 2; 4 was overkill. v1.1.6 basil00 2014-09-15 23:48:32 +08:00
  • 50aecbda75 - Towards version 1.1.6 basil00 2014-09-05 12:36:55 +08:00
  • 6b3fd714c0 - Fix silly bug in last commit, remove the .exe name from the path. basil00 2014-09-05 12:27:25 +08:00
  • 7bd52aed76 - Use GetModuleFileName instead of GetCurrentDirectory as discussed in issue #24. basil00 2014-08-15 18:15:25 +08:00
  • 5e706931f0 - New version 1.1.5 v1.1.5 basil00 2014-05-25 11:54:13 +08:00
  • 9a13606030 - Insert WinDivert as the highest weighted sublayer. basil00 2014-05-19 19:18:10 +08:00
  • 98c4a51fad - Fix issue #18 that causes a BSOD when a NULL pointer is passed as an address parameter to either WinDivertRecv or WinDivertSend. - Use better NT_STATUS codes for some errors. - Bump the version number to WinDivert 1.1.4 v1.1.4 basil00 2014-04-02 19:40:54 +08:00
  • 874d147b9b - Update copyright year. - Use exact version number in driver binary. v1.1.3 basil00 2014-03-24 18:15:05 +08:00
  • d5d8e163e3 - Towards version 1.1.3 basil00 2014-03-24 18:07:00 +08:00
  • 4b708f0c16 - Wrap the sublayer/filter/callout setup in transactions. This appears to make it less likely to break networking if something goes wrong. It may also solve issue #15. - Fix bug in last commit. basil00 2014-03-23 22:33:46 +08:00
  • 7f0e697092 - Fix bug (see issue #14) where some outbound TCP packets were never handled by the classify function and silently dropped. This can degrade outbound speed significantly, as it forces the Windows TCP/IP stack to re-send the missing data. Thanks to GhalemB who found the bug & fix. basil00 2014-03-23 11:18:05 +08:00
  • 33f6bec1e5 - Refactor driver unload functions. - Packet direction fix for netfilter example. - Bump version to 1.1.2-rc. v1.1.2-rc basil00 2013-12-25 11:28:01 +08:00
  • 57934712c6 - Refactor the WFP interface: * WinDivert sublayers are created and inserted when the driver is loaded. * All WinDivert callouts are installed at the same sublayer. - Clean-up the implementation of priorities. - Re-introduce deep copying for SNIFF mode. This avoids referencing the sniffed packets. - Fix-up the netfilter example: * Don't send RSTs to RST/FINs, this can start a RST war. * Don't inject ICMP outbound - this may not be a problem despite 1233 errors. basil00 2013-12-23 11:03:02 +08:00
  • 4f81c315d6 - Use FwpsAllocateCloneNetBufferList0 for the packet queue, as opposed to copying the data. basil00 2013-12-18 16:28:58 +08:00
  • 76459ac3fe - Use WDF work items instead of threads. Also use multiple work items so that read_service() can be run in parallel. basil00 2013-12-18 09:54:01 +08:00
  • 6ac77a644b - Fix some bugs introduced by recent commits. basil00 2013-12-13 17:09:37 +08:00
  • 08fef993ba - Update documentation to reflect the new installation instructions. basil00 2013-12-12 22:55:19 +08:00
  • f21217fdb1 - Slim down the MINGW version of WinDivert.dll (>60KB -> ~15KB) - Remove some WinDivert.dll dependencies. basil00 2013-12-12 17:45:48 +08:00
  • 8c2bb01565 - Several changes to simplify the WinDivert Driver installation: 1) Remove the dependency on the WdfCoInstaller*.dll file. This file appears to be unnecessary for Windows 7 and up, and for patched Vista+2008. 2) Remove the WinDivert.inf file (only used by the co-installer). 3) 32/64-bit versions of the driver are now explicitly named, meaning that the two can co-exist in the same directory. 4) The 32-bit WinDivert.dll can now automatically load the 64-bit driver on 64-bit Windows. This means it is possible to write 32-bit WinDivert applications that automatically work on 64-bit windows. 5) WinDivert.dll now schedules the WinDivert service to be deleted right away. This should fix some cases where the service is never deleted, even during reboot. 6) Updated build scripts to reflect the changes. basil00 2013-12-10 22:48:11 +08:00
  • e27e13cdf2 - Fix build type glitch for x86. v1.1.1 basil00 2013-12-03 11:57:37 +08:00
  • 3f7e289c95 - Update changelog for version 1.1.1 basil00 2013-12-03 08:53:35 +08:00
  • 7f3bbe94ee - Copy most of the packet after error checking. basil00 2013-12-03 08:43:05 +08:00
  • 8c48b0f1dd - Fix issue #8 by replacing incorrect function call NdisFreeNetBufferPool() with NdisAllocateNetBufferListPool(). - Removed some dead code. - Cleanup handles if DriverEntry() fails. - Bump version. basil00 2013-12-03 08:11:19 +08:00
  • 8878d79300 - Fix Issue #7 basil00 2013-11-30 12:56:36 +08:00
  • 8a4c62d981 - Verify that injected packets have the correct length (after copying). basil00 2013-11-30 12:37:08 +08:00
  • f9f11c0e23 - Documentation tweaks and improvements. basil00 2013-11-27 23:49:00 +08:00
  • 03fbfa74d6 - Increase the maximum filter length to 128. v1.1.0-rc basil00 2013-11-02 11:43:21 +08:00
  • 4b7e6a08bb - Simplify the WinDivert callout code: no longer handles multiple NET_BUFFERs in a single NET_BUFFER_LIST. Apparently this should only ever occur in the FORWARD layer in certain circumstances, and even then each fragment should be indicated individually anyway. This change removes a lot of needless complexity. basil00 2013-10-07 22:57:16 +08:00
  • dce8ebd459 - If driver installation fails, then also attempt to delete the service. This should fix some confusing errors caused by a zombie WinDivert service. basil00 2013-10-06 15:15:59 +08:00
  • 8ecfc1e52b - Add documentation for WinDivertRecvEx() and WinDivertSendEx(). basil00 2013-10-05 13:03:33 +08:00
  • 3eed5aca39 - Writes (via WinDivertSend()) are now copied before being injected. This ensures that the user program does not clobber the buffer before the injection is complete. - Update the changelog. basil00 2013-09-28 23:25:51 +08:00
  • 63b72288d5 - Fix function names in README. basil00 2013-09-24 14:29:40 +08:00
  • fd9d8eb0c3 - Documentation tweaks, including comments in (1275) errors. basil00 2013-09-24 14:15:28 +08:00
  • a59c70ae0a - WinDivert now queues copies of packets, rather than simply referencing the original packet. The former turns out to be problematic, since there is no guarantee that something else (e.g. another callout driver) modifies/overwrites the packet data whilst it is in the queue. Copying the data is not ideal either, but seems to be the only way to ensure the packet is not changed later. basil00 2013-09-21 10:43:42 +08:00
  • 0b15b26d45 - (Missing from last commit) remove the PASSTHRU flag from windivert_device.h basil00 2013-09-10 17:58:08 +08:00
  • 835d604d4e - Remove the PASSTHRU flag; The same result can be achieved with a "false" filter. basil00 2013-09-10 17:52:43 +08:00
  • bbd3b0e9e9 - Update documentation to version 1.1 API basil00 2013-08-16 22:50:00 +08:00
  • 09b7cd45a2 - Add support for the legacy WinDivert API. basil00 2013-07-26 18:01:49 +08:00
  • dc149f281b - Fix README out-of-date reference to VS2010. basil00 2013-07-17 11:55:36 +08:00
  • 38f1f3a16d - Towards WinDivert 1.1: * Re-brand "DIVERT" to "WINDIVERT" throughout the code-base. * New flags: > WINDIVERT_FLAG_PASSTHRU: Do not drop nor capture packets. Useful for injection-only handles. > WINDIVERT_FLAG_NO_CHECKSUM: Do not guarantee that diverted packets have a correct checksum. NOTE: Not yet tested! * New default values and limits for various WinDivert parameters, including WINDIVERT_PARAM_QUEUE_LEN, WINDIVERT_PARAM_QUEUE_TIME, and the maximum filter length. * New extended WinDivert functions that support asynchronous I/O: > WinDivertRecvEx(..) > WinDivertSendEx(..) NOTE: Not yet tested! * The WinDivert driver now services reads (receives) out-of-band. The motivation is because WFP callouts are run at DISPATCH_LEVEL, so we should not be doing expensive work in the ClassifyFn. This is also the same reason why the filter length has been restricted. basil00 2013-06-30 15:58:21 +08:00
  • 7f70f9a575 - Fix FwpsInjectionHandleCreate flags for NETWORK and FORWARD layers. - Strip debug symbols from WinDivert.dll for MinGW builds. basil00 2013-06-26 13:44:56 +08:00
  • e0e1feabad - Update support to Visual Studio 2012. basil00 2013-06-25 23:22:41 +08:00
  • 5481e6edd5 - New version 1.0.5 basil00 2013-06-25 19:58:13 +08:00
  • 3d7d3e4fd4 - Documentation improvements. basil00 2013-06-20 18:31:32 +08:00
  • ed56b1871b - Change filter action type from UNKNOWN to TERMINATING. basil00 2013-06-13 13:02:34 +08:00
  • 437d64d9e3 - Fix issue #6: * Use type 0 for FwpsInjectionHandleCreate0 for the FORWARD layer. * Use FWPS_FIELD_IPFORWARD_V{4|6}_DESTINATION_INTERFACE_INDEX to get addr->IfIdx * Replace FWP_ACTION_CONTINUE with FWP_ACTION_PERMIT. basil00 2013-06-13 12:57:59 +08:00
  • 9687d945e6 - Strip MinGW .exe files. basil00 2013-06-04 00:01:29 +08:00
  • eb667e4c32 - New version 1.0.4 - Documentation tweaks - Use a newer version of MinGW - Use signed driver in release. basil00 2013-06-03 18:32:30 +08:00
  • 6ef0028edd - Fix stray `;' in code sample (issue #5). basil00 2013-05-02 11:09:00 +08:00
  • 7636b0acc2 - Fix MinGW wcscpy_s() workaround. basil00 2013-04-13 14:46:45 +08:00
  • 59ef023fb1 - New version 1.0.3 basil00 2013-04-07 17:53:29 +08:00
  • 6d8d0b3134 - Improved version stamping. basil00 2013-04-07 11:27:21 +08:00
  • 3b486d49af - Code clean up [credit: GliderPro] basil00 2013-04-07 10:42:08 +08:00
  • 3d881423d6 - Replace (110) errors with more meaningful error codes. - Add two new helper API functions: DivertHelperParseIPv?Addr(..) - Document these new features. basil00 2013-04-06 23:41:00 +08:00
  • e34a69abc6 Merge branch 'master' of github.com:basil00/Divert basil00 2013-04-02 12:21:31 +08:00
  • 8cc8299f26 - Fix mis-placed decli bug. [credit GliderPro] basil00 2013-04-02 12:14:45 +08:00
  • 6b6901278e Merge pull request #3 from azerton/master basil00 2013-03-07 19:20:58 -08:00
  • 0266a1048f Type error compiling examples on VS2012 Daan Raman 2013-03-07 11:40:13 +01:00
  • d9e1d687cc - Fix the implementation of DivertParseIPv6Address() basil00 2013-01-31 23:48:19 +08:00
  • 89bf2fb622 - New VERSION 1.0.2 - Add a CHANGELOG - Add note to webfilter.c - CHANGELOG and VERSION now included in release packages. basil00 2012-12-25 18:26:23 +08:00
  • 700f91e7fb - Remove copyright notice (not really code). basil00 2012-10-28 02:22:41 +08:00
  • 091e3025ce - Change WinDivert device permission: Administrator now required for any device access. basil00 2012-10-28 02:21:10 +08:00
  • a0e50dfd79 - add a VERSION file basil00 2012-10-26 14:12:34 +08:00
  • 3a59af9f25 - Ignore ERROR_INVALID_PARAMETER from pfnWdfPostDeviceInstall() as these errors appear to be benign. basil00 2012-10-24 22:46:13 +08:00
  • 898ea780e2 - Fix typo basil00 2012-10-24 21:58:43 +08:00
  • 934019aec5 - In divert_filter_compile(), do not use the stack for filter0; instead allocate from the heap. Stacks are small (12Kb on x86). basil00 2012-10-24 21:30:27 +08:00
  • 5ce2f868d6 - Expand documentation regarding test signing the WinDivert driver. (this was causing some confusion). basil00 2012-06-01 23:14:46 +08:00
  • 498fbaab98 - MSVC build system now supports x64 - passthru.c now compiles on all 3 compilers. basil00 2012-03-31 18:32:01 +08:00
  • 53b45c4e8c - Complete build-system revamp. * Updated sources files to target install\WDDK * Remove wdfinstaller.h dependency from dll/divert.dll * Fix passthru error in newer compilers. basil00 2012-03-27 17:39:46 +08:00
  • 47e2764c20 - Fix typo basil00 2012-03-26 22:32:47 +08:00
  • 7cb25b8a1e - Added build-system documentation basil00 2012-03-26 22:31:21 +08:00
  • 9b132946de - Add WDDK build script. - Add documentation for new build system. basil00 2012-03-26 22:28:48 +08:00
  • 6dfed99c28 Build system revamp: - VS2010 support added via msvc-build.bat and *.vcxproj files - MinGW now also builds example programs - Documentation and examples are now included in the binary packages basil00 2012-03-26 21:55:55 +08:00
  • f9b1619adb - Fix bad priority in the webfilter sample. - Minor comments tweaks. basil00 2012-02-22 11:00:05 +08:00
  • 13b2ab4418 ***MAJOR UPDATE*** basil00 2012-02-21 23:18:45 +08:00
  • 1d2b3a4649 - Fix a bug caused by missing FILE_FLAG_OVERLAPPED flag. basil00 2012-02-08 23:46:22 +08:00
  • 27b6f47de7 - Now include the divert.lib files in the MSVC release package. basil00 2012-02-06 12:54:33 +08:00
  • ec6ef9e0ce - Fix bug where NDIS pool was freed before a packet injection was complete, possibly resulting in a BSOD. basil00 2012-02-06 12:50:31 +08:00
  • bf6a557fea - Fix typo. basil00 2011-11-13 22:43:54 +08:00
  • eac5628198 - Add a simple release build script. basil00 2011-11-10 00:10:45 +08:00
  • a205259bec - Divert driver and library now fully support multi-threaded code. This includes making the driver handle I/O requests in parallel, and changing the library such that it uses overlapped I/O. Overall the package is now significantly faster. - The divert driver now only adds WFP callouts when a filter is set, instead of when a handle is created. - The divert driver now attempts to avoid adding WFP callouts that are superfluous with respect to the filter. - The divert driver now explicitly deletes filters and callouts during cleanup. This appears to resolve a bug where network connectivity is sometimes lost. - Added a new sample program: passthru.exe. This example doesn't do anything interesting but is useful for speed testing. - Rename build.sh to mingw-build.sh to avoid confusion. basil00 2011-11-08 23:54:01 +08:00
  • 88c7e404ca - Don't strip DLL basil00 2011-10-24 00:25:13 +08:00
  • 5dce077e86 - Fix bug where WdfRequestProbeAndLockUserBufferFor* was not in the caller context, resulting in an occasional BSOD. - Fix bug where the driver rejects the "false" filter. - Update documentation to reflect that the "false" filter is still useful for packet injection. basil00 2011-10-19 20:53:49 +08:00
  • f1b7ead828 The divert.dll library can now be build with MinGW Linux cross-compilation. basil00 2011-10-15 17:40:18 +08:00
  • 8906eaa02c - Move some mis-placed text basil00 2011-08-23 23:37:41 +08:00
  • 84a73c28fd Really beef up README basil00 2011-08-23 23:06:29 +08:00
  • 0ff63cda99 - Make the package compile for i386 - Make the pAddr arg for DivertRecv() optional - Make the i386 user binaries compatible with an amd64 driver. (useful for projects not yet ported to amd64) basil00 2011-08-23 22:18:02 +08:00
  • 378df755bc Beef up README basil00 2011-08-21 18:12:06 +08:00
  • ee386df032 Figured out a way to split the "address" part of the buffer from the packet data itself. This makes for a much cleaner interface. basil00 2011-08-21 17:59:13 +08:00
  • cf80d12e5d Fix out-of-date documentation basil00 2011-08-19 22:08:29 +08:00
  • 019f9d509b First commit of the Windows Divert project basil00 2011-08-19 20:11:17 +08:00