目录
下载工具
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。