目錄
下載工具
cmake-3.23.0-rc3-macos10.10-universal.dmg
tuntap_20150118.tar.gz
https://codeload.github.com/meyerd/n2n/zip/refs/heads/master
編譯
cd n2n_v2
mkdir build
cd build
cmake ..
make
執行
在雲服務器上執行supernode
supernode -l 5000 -v -f
-l 指定服務端口
-v -f 調試模式
在本地執行edge
edge -a 10.0.0.10 -c lgy -k lgy -l 1.2.3.4:5000 -v -f
-a 指定的虛擬ip
-c 組名
-k 組密碼 -K 可指定秘鑰文件
-l supernode 地址加端口、v2版本可指定兩個,高可用
遇到的問題和解決方法
- edge命令正確、運行成功但是ping不通VLAN內的主機;
答:檢查edge版本與supernode版本是否一致;
2.edge運行總是open /dev/tap0失敗,報錯:
Unable to open any tap devices /dev/tap0 through /dev/tap254.
sudo也解決不了,按照提示打開關於macOS.md按提示執行
brew tap homebrew/cask
brew cask install tuntap
結果報錯:
Follow the instructions here:
https://github.com/Homebrew/homebrew-cask#reporting-bugs
Warning: Unexpected method 'livecheck' called on Cask macrorecorder.
Follow the instructions here:
https://github.com/Homebrew/homebrew-cask#reporting-bugs
Error: Cask 'macrorecorder' definition is invalid: invalid 'depends_on macos' value: ">= :big_sur"
答:最后通過安裝tuntap_20150118.tar.gz解決。
3. cmake報找不到openssl的文件
答:根據CMakeLists.txt中的提示執行
cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl ..
問題解決;
4.macos如何使用類似mstsc的方法遠程Windows
答:安裝Microsoft remote desktop for mac。