cpolar官网:https://www.cpolar.com/
4.1 ubuntu安装cpolar内网穿透
本次教程我们使用的是ubuntu 图形化系统,我们需要先在ubuntu上安装配置cpolar内网穿透,支持一键自动安装脚本。
- 国内安装
curl -L https://www.cpolar.com/static/downloads/install-release-cpolar.sh | sudo bash
- 或 cpolar短链接安装方式:(国外使用)
curl -sL https://git.io/cpolar | sudo bash
- 查看版本号,正常显示即为安装成功
cpolar version
- token认证
登录cpolar官网后台,点击左侧的验证,查看自己的认证token,之后将token贴在命令行里
cpolar authtoken xxxxxxx
- 简单穿透测试
cpolar http 8080
有正常生成相应的公网地址,按ctrl+c退出
- 向系统添加服务
sudo systemctl enable cpolar
- 启动cpolar服务
sudo systemctl start cpolar
- 查看服务状态,显示如下图所示为
active
则为已启动状态
sudo systemctl status cpolar