softether 禁用企业版功能在中国和日本使用,重编译。

在softether 的server.c中找到

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// 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转自网络

最近在寻找比较好用的开源VPN,感觉SoftEther很符合我的需求。一方面是SoftEther属于开源软件并且一直在更新,另一方面是功能强大,好用。

VPN支持路由功能和NAT功能,还支持多种类型的VPN接入,看图。目前我的需求是NAT并做用户分组,对用户做访问控制。

我的服务端部署环境是WIN2012R2_X64,可直接在官网下载服务端和客户端:https://www.softether.org/5-download

在服务端配置过程中遇到一个问题就是不能下发明细路由,这里叫他拆分隧道。如果不处理这个问题,所有请求都会从VPN饶。

 

 但是在SoftEther VPN下发明细路由推送的时候提示:不支持此功能。它尚未在SoftEther VPN的开源版本上实施。

刚开始以为是有付费授权,后来发现不是这个原因。

 在找到相关函数,所以只要保证不要满足中文环境就可以突破

修改方式:

安装好服务端以后,修改vpnsmgr_x64和vpnserver_x64函数返回值就可以,OD载入搜索CN,JP关键字,看到或条件的比较满足条件就会触发

mov dword ptr ss:[rsp+B0],1

将1的写入,改成0的写入

 测试可行

 

 

posted @   嗷嗷鹿鸣[VX|dshoub]  阅读(3463)  评论(5编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示