自定义VPN

2018/08/17 Linux - 次.

自定义VPN

本篇文章主要讲解如何使用海外服务器为自己配置VPN

适用环境 : Linux 依赖工具 : pip 依赖包 : shadowsocks

1 安装依赖包

如果服务器上没有pip请先安装pip,此处不再赘述安装过程,安装完成后,输入以下指令安装依赖包

pip install shadowsocks

2 配置环境文件

创建配置文件并写入配置内容

vi /etc/shadowsocks.json

{
"server":"私网ip",
"server_port":自定义端口例如8088,
"local_address":"127.0.0.1",
"local_port":1080,
"password":"密码",
"timeout":300,
"method":"aes-256-cfb",
"fast_open":false,
"workers":10 
}

3 配置完成后,启动服务

ssserver -c /etc/shadowsocks.json -d start

需要的话可以为服务器添加自启动文件:vi /etc/rc.local ssserver -c /etc/shadowsocks.json -d start

4 客户段添加VPN

根据需要下载所需要的VPN客户端,此处使用的shadowsocks,打开客户端口后直接配置,服务器公网IP,端口,加密方式,和密码即可

5 小米路由器安装Misstar

安装命令
curl -s -k https://beta.misstar.com/download/$(uname -m)/mtinstall -o /tmp/mtinstall && chmod +x /tmp/mtinstall && /tmp/mtinstall
卸载2.0
wget http://www.misstar.com/tools/uninstall.sh -O /tmp/uninstall.sh && chmod +x /tmp/uninstall.sh && /tmp/uninstall.sh

Misstar Tools 中拥有Shadowsocks 插件,可以直接安装并使用

Search

    Table of Contents