准备工作:#
需要一台有公網 IP 的伺服器並開放 TCP 協議端口 8080
開始搭建:#
分別在本地 Linux 電腦和公網伺服器上編譯 n2n,步驟如下
- 安裝 git
apt install git
- 克隆 n2n 專案
git clone https://github.com/ntop/n2n
- 進入指定資料夾
cd n2n
- 安裝 autoconf
apt install autoconf
- 編譯專案
./autogen.sh
./configure
make
make install
- 服務端啟動
./supernode -p 10086 -f
- 客戶端啟動
./edge -c nekool -a 192.168.100.1 -f -l 公網伺服器IP:8080