Developer edition and Winpcap incompatibility

Post your questions about SoftEther VPN software here. Please answer questions if you can afford.
Post Reply
john96
Posts: 13
Joined: Wed Mar 16, 2022 8:42 pm

Developer edition and Winpcap incompatibility

Post by john96 » Sat May 13, 2023 9:59 pm

Hi,
On Windows 10 (2004 as well as 22H2) when I install developer edition say softether-vpnserver_vpnbridge-5.02..x64 then it fails to create local bridge.
When trying to create local bridge it throws following errors.

Image

However when I install the rtm release softether-vpnserver_vpnbridge-v4.41-9787-rtm-2023.03.14-windows-x86_x64-intel everything works just fine.
Does anyone have any idea what is going wrong here?

I can separately install 4.1.3 from external sources but trying to understand what's happening here.
Why winpcap in developer release is incompatible with Windows 10 whereas one in rtm is?
Thanks

hiura
Posts: 143
Joined: Wed Mar 10, 2021 1:56 am

Re: Developer edition and Winpcap incompatibility

Post by hiura » Sun May 14, 2023 12:33 pm

Install WIRESHARK in WINPCAP API-COMPATIBLE mode.
Try again.

https://www.vpnusers.com/viewtopic.php? ... 068#p97068

john96
Posts: 13
Joined: Wed Mar 16, 2022 8:42 pm

Re: Developer edition and Winpcap incompatibility

Post by john96 » Mon May 15, 2023 9:00 pm

Thanks. As I mentioned I can always install winpcap 4.1.3 but the subsequent issue I face is that when Winpcap bundled with Softether app is not used then Windows 10 built-in L2tp connection fails. Softether client works fine though on TCP 5555.
It only works when Winpcap bundled with softether gets installed.
This issue comes only with dev edition.
With rtm bundled winpcap gets successfully installed in the background and bridge gets created almost automatically.

hiura
Posts: 143
Joined: Wed Mar 10, 2021 1:56 am

Re: Developer edition and Winpcap incompatibility

Post by hiura » Tue May 16, 2023 7:03 am

>Windows 10 built-in L2tp connection fails.
It is VPN Server side problem.
https://www.vpnusers.com/viewtopic.php?f=15&t=68215

Stable Edition:
The path separator of "hamcore.se2" for VPN4.0 (VER4.38, BUILD 9760) is \ .

Developer Edition:
The path separator of "hamcore.se2" for VPN5.02 is /.

Maybe developer made a mistake in trying to change the path separator from \ to /.
Access to the hamcore.se2 archive seems to be a bug.

By changing the source code below, it would work.
<<< FileIO.c >>>

Code: Select all

// Top of Replace on APR.1, 2023
wchar_t * UniStrReplW(wchar_t *src, wchar_t c, wchar_t  newc) {
	for (; *src; src++) {
		if (*src == c) {
			*src = newc;
		}
	}
	return (wchar_t *)src;
}
// Bottom of Replace on APR.1, 2023

IO *FileOpenExW(wchar_t *name, bool write_mode, bool read_lock)
{
	wchar_t tmp[MAX_SIZE];
	// Validate arguments
	if (name == NULL)
	{
		return NULL;
	}

	InnerFilePathW(tmp, sizeof(tmp), name);

	if (name[0] == L'|')
	{
Debug("_____ FileOpenExW()  |1  ReadHamcoreW()    name =%S\n", name);

		IO *o = ZeroMalloc(sizeof(IO));
		name++;

		// Top of Replace "\" with "/" on APR.1, 2023
		wchar_t name2[MAX_SIZE];
		UniStrCpy(name2, sizeof(name2), name);
		UniStrReplW(name2, L'\\', L'/');
		// Bottom of Replace "\" with "/" on APR.1, 2023

		UniStrCpy(o->NameW, sizeof(o->NameW), name2);	// path separator / is used
		UniToStr(o->Name, sizeof(o->Name), o->NameW);
		o->HamMode = true;
		o->HamBuf = ReadHamcoreW(name2);		// path separator / is used

Debug("_____ FileOpenExW()  |2  ReadHamcoreW() o->Name =%s, o->HamBuf =%u\n", o->Name, o->HamBuf);
		if (o->HamBuf == NULL)
		{
			Free(o);
			return NULL;
		}
		return o;
	}
	else
	{
Debug("_____ FileOpenExW()   3  FileOpenInnerW()   tmp =%S\n", tmp);
		return FileOpenInnerW(tmp, write_mode, read_lock);
	}
}

john96
Posts: 13
Joined: Wed Mar 16, 2022 8:42 pm

Re: Developer edition and Winpcap incompatibility

Post by john96 » Tue May 16, 2023 2:17 pm

Thanks.
I do not know if this is related to winpcap and local bridge but I have a strange observation.
Install developer edition and create a local bridge it fails. Then install Winpcap separately, and you can create a bridge but still L2TP fails.

Now uninstall dev edition uninstall winpcap and install rtm and everything works
Now uninstall rtm and install dev edition and bridge gets created smoothly and L2TP works

I do not know if this is related to the file you mentioned.
I still do not know if incompatible winpcap is a bug in dev edition and if this is related to the file you mention.
I am not a developer, even compiling source code would be difficult for me!

hiura
Posts: 143
Joined: Wed Mar 10, 2021 1:56 am

Re: Developer edition and Winpcap incompatibility

Post by hiura » Sun May 21, 2023 10:08 am

Do the following temporary.
Local bridge and IPSEC will be available.
And wait untill the devlepor fix this issue.


(1).Down load "Source code (zip)"
SoftEtherVPN-5.02.5180.zip will be created
https://github.com/SoftEtherVPN/SoftEtherVPN/releases

Required files are included in the directory named "hamcore"
SoftEtherVPN-5.02.5180\src\bin\hamcore

(2).Stop VPN SERVER

(3).Copy "hamcore" to your exe directory for VPN SERVER
C:\Program Files\SoftEther VPN Server Developer Edition\hamcore

(4).Start VPN SERVER
Drivers are installed by VPN SERVER.
Without NPCAP driver, you can setup Local Bridge. Of course you can also use IPSEC.


(5).How to check if driver is running

C:\Windows\System32\drivers

2023/03/21 19:12 50,624 SeLow_x64.sys <-----Created
2023/03/21 19:12 <DIR> ..
2023/03/21 19:12 <DIR> .
2023/03/21 14:00 33,728 pxwfp.sys <-----Created


C:>sc query selow

SERVICE_NAME: selow
TYPE : 1 KERNEL_DRIVER
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0


C:>sc query pxwfp

SERVICE_NAME: pxwfp
TYPE : 1 KERNEL_DRIVER
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

C:\Program Files\SoftEther VPN Server Developer Edition>tree

C:.
├─backup.vpn_server.config
├─chain_certs
├─hamcore
│ ├─DriverPackages
│ │ ├─Neo
│ │ │ ├─x64
│ │ │ └─x86
│ │ ├─Neo6
│ │ │ ├─x64
│ │ │ └─x86
│ │ ├─Neo6_Win10
│ │ │ ├─x64
│ │ │ └─x86
│ │ ├─Neo6_Win8
│ │ │ ├─x64
│ │ │ └─x86
│ │ ├─Neo9x
│ │ │ └─x86
│ │ ├─See
│ │ │ ├─x64
│ │ │ └─x86
│ │ ├─SeLow_Win10
│ │ │ ├─x64
│ │ │ └─x86
│ │ ├─SeLow_Win8
│ │ │ ├─x64
│ │ │ └─x86
│ │ ├─Wfp
│ │ │ ├─x64
│ │ │ └─x86
│ │ └─Wfp_Win10
│ │ ├─x64
│ │ └─x86
│ ├─webui
│ └─wwwroot
│ └─admin
│ └─default
│ ├─.vscode
│ ├─out_webpack
│ │ └─ts
│ └─src
│ └─ts
├─packet_log
│ └─VPN
├─security_log
│ ├─DEFAULT
│ └─VPN
└─server_log

Post Reply