Files
openvpn-manager/README.md
2021-01-15 16:06:06 +08:00

49 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# OpenVPN Manager
# 一、简介
OpenVPN Manager一个简单的OpenVPN Web管理工具。通过OpenVPN的管理端口获取数据然后在Web页面上展示或者操作。
OpenVPN的管理端口详细介绍文章请参考https://openvpn.net/community-resources/management-interface/
# 二、功能
- 显示当前登录的客户端信息
- 可下线用户
- 简单的用户名密码认证
![](assets/openvpn-manager-1.png)
# 三、安装部署
## 1、部署所需条件
- **OpenVPN 服务端需要开起管理端口**
在OpenVPN服务端配置文件中追加`management 127.0.0.1 123456`然后重启OpenVPN即可。
- 支持的OpenVPN 版本
2.4.x2.4.4已测试)
## 2、源码编译部署
> 注意编译安装时需要第三方命令行工具statikstatik可以将静态资源文件打包进二进制文件中
```bash
git clone
cd openvpn-manager
go get github.com/rakyll/statik
go install github.com/rakyll/statik
statik -src=$PWD/public
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o openvpn-manager main.go
nohup ./openvpn-manager -host openvpn服务端主机IP地址 -port openvpn管理端口 -admin-passwd OpenVPN Manager管理员admin的密码 >> /var/log/openvpn-manager.log 2>&1 &
```
# 四、TODO
新增功能
- [ ] 增加显示最近五条登录日志
- [ ] 增加新增用户的功能
- [ ] 增加对低版本OpenVPN的支持
- [ ] 增加Docker部署方式及二进制包下载集成