在softether 的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轉自網絡
最近在尋找比較好用的開源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的寫入
測試可行