在服务端配置过程中遇到一个问题就是不能下发明细路由,这里叫他拆分隧道。如果不处理这个问题,所有请求都会从VPN饶。
但是在SoftEther VPN下发明细路由推送的时候提示:不支持此功能。它尚未在SoftEther VPN的开源版本上实施。

解除限制方法 1 :
编译Softethervpn的源码
主要看下源码中的限制位置,Softethervpn 4.38 Build 9760
限制代码在src/Cedar/Server.c
// The SoftEther VPN Project intentionally disables these functions for users
// in Japan and China. The reason is: Daiyuu Nobori, the chief author of
// SoftEther VPN, has been liable to observe the existing agreements and
// restrictions between him and some companies. The agreements have regulated
// the region-limited restriction to implement and distribute the above
// enterprise functions on the SoftEther VPN open-source program.
//
// Therefore, the SoftEther VPN Project distributes the binary program and
// the source code with the "SiIsEnterpriseFunctionsRestrictedOnOpenSource"
// function. This function identifies whether the SoftEther VPN Server
// program is running in either Japan or China. If the restricted region is
// detected, then the above enterprise functions will be disabled.
//
// Please note that the above restriction has been imposed only on the
// original binaries and source codes from the SoftEther VPN Project.
// Anyone, except Daiyuu Nobori, who understands and writes the C language
// program can remove this restriction at his own risk.
//
bool SiIsEnterpriseFunctionsRestrictedOnOpenSource(CEDAR *c)
{
char region[128];
bool ret = false;
// Validate arguments
if (c == NULL)
{
return false;
}
SiGetCurrentRegion(c, region, sizeof(region));
if (StrCmpi(region, "JP") == 0 || StrCmpi(region, "CN") == 0)
{
ret = true;
}
return ret;
}
直接改为return false就行了
解除限制方法 2 :
安装好服务端以后,修改vpnsmgr_x64和vpnserver_x64函数返回值就可以,OD载入搜索CN,JP关键字,看到或条件的比较满足条件就会触发
mov dword ptr ss:[rsp+B0],1
将1的写入,改成0的写入

实测可用
附已经修改版本
Softethervpn 4.38 Build 9760
补丁下载
链接: https://pan.baidu.com/s/1nW83Zn5IHmfuWOPVIgZfeg?pwd=qgi6
提取码: qgi6
安装服务端后,把压缩包里面的vpnserver_x64文件覆盖到安装目录里面,重启Softether服务。
x64dbg修改方法:
打开vpnserver_x64.exe

使用所有模块模式搜索字符串

在搜索框里面搜索CN,选中第二个CN

需要我们修改的位置00007FF6D7CADEFA | C78424 B0000000 01000000 | mov dword ptr ss:[rsp+B0],1

现在开始制作补丁,选中修改的内容,然后选中汇编

把原来的mov dword ptr ss:[rsp+0xB0], 0x1改成mov dword ptr ss:[rsp+0xB0], 0x0

修改成功后,开始制作补丁

点修补文件

保存后,会提示补丁应用成功

接下来就需要把受限的vpnserver_x64.exe替换成我们修改过的vpnserver_x64.exe文件就可以了。
替换的时候需要停止服务