Created
May 19, 2017 05:31
-
-
Save anonymous/f1630d9385f5d787690800e34c070bd6 to your computer and use it in GitHub Desktop.
Debian 8 部署 Mysterium Network Node(密链网络节点)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
下面方法在 Debian 8 已通过 Mysterium 服务器端部署,Ubuntu 14.04+ 应该也没问题。 | |
OpenVPN 安装参考官方文档,建议安装新版 2.4.2 (多谢 @Shacl0w 提醒) | |
https://community.openvpn.net/openvpn/wiki/OpenvpnSoftwareRepos#InstallingOpenVPN | |
安装 Mysterium Node | |
$ wget https://github.com/MysteriumNetwork/node/releases/download/0.0.6/mysterium-node_linux_amd64.deb | |
$ sudo dpkg -i --force-depends mysterium-node_linux_amd64.deb | |
$ sudo apt-get install --fix-broken | |
会提示输入节点 key,任意输入一段字符,然后启动 mysterium-node 服务并查看状态 | |
$ sudo service mysterium-node start | |
$ sudo service mysterium-node status | |
查看状态时应该有红色报错内容,不用理会,暴力杀死 mysterium-node 进程 | |
$ sudo pkill mysterium-node | |
节点的 Key 可以随时修改,一段随机字符,长短和内容都不太要紧 | |
$ sudo vi /etc/default/mysterium-node | |
在 =(等号)后面加上节点名称 | |
MYSTERIUM_SERVER_NODE=zifu12kjg8 | |
修改证书权限 | |
$ sudo chmod 600 /etc/mysterium-node/server.key | |
$ sudo chmod 600 /etc/mysterium-node/ta.key | |
启动 mysterium-node 服务 | |
$ sudo mysterium_server --config-dir=/etc/mysterium-node --node=zifu12kjg8 | |
可以用 pm2 后台值守进程,pm2 要另装,编辑一个脚本 mysterium.sh | |
#!/bin/bash | |
mysterium_server --config-dir=/etc/mysterium-node --node=zifu12kjg8 | |
保存后用 pm2 后台启动 | |
$ chmod +x mysterium.sh | |
$ pm2 start mysterium.sh | |
$ pm2 startup | |
$ pm2 update | |
查看进程是否正常,如果列表中有绿色内容就没问题 | |
$ pm2 list | |
完成的话就可以通过客户端测试,以下是客户端部分,Debian && Ubuntu && Raspberry Pi | |
如果已经有 OpenVPN 就方便了,没有的话参考官方文档 | |
https://community.openvpn.net/openvpn/wiki/OpenvpnSoftwareRepos | |
OpenVPN 可用后,下载编译好的客户端二进制文件或 deb 安装包,推荐编译好的客户端,Raspberry Pi 用 arm 版 | |
$ wget https://github.com/MysteriumNetwork/node/releases/download/0.0.6/mysterium_client_linux_amd64 | |
$ chmod +x mysterium_client_linux_amd64 | |
启动客户端,会自动调用 OpenVPN,不用其他设置 | |
$ sudo ./mysterium_client_linux_amd64 --node=zifu12kjg8 | |
几十秒的连接时间,如果打印的命令末尾是 itialization Sequence Completed,说明连接成功了,测试是否翻墙成功 | |
$ curl https://ping.pe | |
倒数几行显示 Your IP: 123.123.123.123, IP Location: United States 或其他 IP 和国家,说明翻墙成功了。 | |
macOS 可以安装 OpenVPN 2.4.2,但 mysterium_client 调用麻烦,可以安装客户端 Tunnelblick,再启动 mysterium_client_osx_amd64 就没问题 | |
有误之处请各位 Google 搜索解决。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment