mirror of
https://github.com/yhl452493373/frps-panel.git
synced 2026-04-04 06:16:59 +08:00
rename to frps-panel
add i18n for some words
This commit is contained in:
8
Makefile
8
Makefile
@@ -3,10 +3,10 @@ export CGO_ENABLED=0
|
|||||||
export GOOS=linux
|
export GOOS=linux
|
||||||
export GOARCH=amd64
|
export GOARCH=amd64
|
||||||
|
|
||||||
build: frps-multiuser
|
build: frps-panel
|
||||||
cp ./config/frps-multiuser.ini ./bin/frps-multiuser.ini
|
cp ./config/frps-panel.ini ./bin/frps-panel.ini
|
||||||
cp -r ./assets/ ./bin/assets/
|
cp -r ./assets/ ./bin/assets/
|
||||||
|
|
||||||
frps-multiuser:
|
frps-panel:
|
||||||
rm -rf ./bin
|
rm -rf ./bin
|
||||||
go build -o ./bin/frps-multiuser ./cmd/frps-multiuser
|
go build -o ./bin/frps-panel ./cmd/frps-panel
|
||||||
|
|||||||
@@ -5,20 +5,20 @@ package: copy
|
|||||||
sh ./package.sh
|
sh ./package.sh
|
||||||
|
|
||||||
copy: build
|
copy: build
|
||||||
cp ./config/frps-multiuser.ini ./release/frps-multiuser.ini
|
cp ./config/frps-panel.ini ./release/frps-panel.ini
|
||||||
cp -r ./assets/ ./release/assets/
|
cp -r ./assets/ ./release/assets/
|
||||||
|
|
||||||
build:
|
build:
|
||||||
env CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o ./release/frps-multiuser-darwin-amd64 ./cmd/frps-multiuser
|
env CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o ./release/frps-panel-darwin-amd64 ./cmd/frps-panel
|
||||||
env CGO_ENABLED=0 GOOS=freebsd GOARCH=386 go build -ldflags "$(LDFLAGS)" -o ./release/frps-multiuser-freebsd-386 ./cmd/frps-multiuser
|
env CGO_ENABLED=0 GOOS=freebsd GOARCH=386 go build -ldflags "$(LDFLAGS)" -o ./release/frps-panel-freebsd-386 ./cmd/frps-panel
|
||||||
env CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o ./release/frps-multiuser-freebsd-amd64 ./cmd/frps-multiuser
|
env CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o ./release/frps-panel-freebsd-amd64 ./cmd/frps-panel
|
||||||
env CGO_ENABLED=0 GOOS=linux GOARCH=386 go build -ldflags "$(LDFLAGS)" -o ./release/frps-multiuser-linux-386 ./cmd/frps-multiuser
|
env CGO_ENABLED=0 GOOS=linux GOARCH=386 go build -ldflags "$(LDFLAGS)" -o ./release/frps-panel-linux-386 ./cmd/frps-panel
|
||||||
env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o ./release/frps-multiuser-linux-amd64 ./cmd/frps-multiuser
|
env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o ./release/frps-panel-linux-amd64 ./cmd/frps-panel
|
||||||
env CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -ldflags "$(LDFLAGS)" -o ./release/frps-multiuser-linux-arm ./cmd/frps-multiuser
|
env CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -ldflags "$(LDFLAGS)" -o ./release/frps-panel-linux-arm ./cmd/frps-panel
|
||||||
env CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags "$(LDFLAGS)" -o ./release/frps-multiuser-linux-arm64 ./cmd/frps-multiuser
|
env CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags "$(LDFLAGS)" -o ./release/frps-panel-linux-arm64 ./cmd/frps-panel
|
||||||
env CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -ldflags "$(LDFLAGS)" -o ./release/frps-multiuser-windows-386.exe ./cmd/frps-multiuser
|
env CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -ldflags "$(LDFLAGS)" -o ./release/frps-panel-windows-386.exe ./cmd/frps-panel
|
||||||
env CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o ./release/frps-multiuser-windows-amd64.exe ./cmd/frps-multiuser
|
env CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "$(LDFLAGS)" -o ./release/frps-panel-windows-amd64.exe ./cmd/frps-panel
|
||||||
env CGO_ENABLED=0 GOOS=linux GOARCH=mips64 go build -ldflags "$(LDFLAGS)" -o ./release/frps-multiuser-linux-mips64 ./cmd/frps-multiuser
|
env CGO_ENABLED=0 GOOS=linux GOARCH=mips64 go build -ldflags "$(LDFLAGS)" -o ./release/frps-panel-linux-mips64 ./cmd/frps-panel
|
||||||
env CGO_ENABLED=0 GOOS=linux GOARCH=mips64le go build -ldflags "$(LDFLAGS)" -o ./release/frps-multiuser-linux-mips64le ./cmd/frps-multiuser
|
env CGO_ENABLED=0 GOOS=linux GOARCH=mips64le go build -ldflags "$(LDFLAGS)" -o ./release/frps-panel-linux-mips64le ./cmd/frps-panel
|
||||||
env CGO_ENABLED=0 GOOS=linux GOARCH=mips GOMIPS=softfloat go build -ldflags "$(LDFLAGS)" -o ./release/frps-multiuser-linux-mips ./cmd/frps-multiuser
|
env CGO_ENABLED=0 GOOS=linux GOARCH=mips GOMIPS=softfloat go build -ldflags "$(LDFLAGS)" -o ./release/frps-panel-linux-mips ./cmd/frps-panel
|
||||||
env CGO_ENABLED=0 GOOS=linux GOARCH=mipsle GOMIPS=softfloat go build -ldflags "$(LDFLAGS)" -o ./release/frps-multiuser-linux-mipsle ./cmd/frps-multiuser
|
env CGO_ENABLED=0 GOOS=linux GOARCH=mipsle GOMIPS=softfloat go build -ldflags "$(LDFLAGS)" -o ./release/frps-panel-linux-mipsle ./cmd/frps-panel
|
||||||
32
README.md
32
README.md
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
frp server plugin to support multiple users for [frp](https://github.com/fatedier/frp).
|
frp server plugin to support multiple users for [frp](https://github.com/fatedier/frp).
|
||||||
|
|
||||||
frps-multiuser will run as one single process and accept HTTP requests from frps.
|
frps-panel will run as one single process and accept HTTP requests from frps.
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||
@@ -13,8 +13,8 @@ frps-multiuser will run as one single process and accept HTTP requests from frps
|
|||||||
|
|
||||||
## Update Notes
|
## Update Notes
|
||||||
|
|
||||||
+ **the default tokens file is frps-multiuser.ini now,ini file support comment**
|
+ **the default tokens file is frps-panel.ini now,ini file support comment**
|
||||||
+ **remove `-l`,it configure in `frps-multiuser.ini` now**
|
+ **remove `-l`,it configure in `frps-panel.ini` now**
|
||||||
+ **change `-f` to `-c`,the same as `frps`**
|
+ **change `-f` to `-c`,the same as `frps`**
|
||||||
+ **if \[users\] section is empty,the authentication will only be handle by frps**
|
+ **if \[users\] section is empty,the authentication will only be handle by frps**
|
||||||
+ **if user under \[disabled\] section ,and the value is `disable`, it means that user is be disabled, and can not connect to server**
|
+ **if user under \[disabled\] section ,and the value is `disable`, it means that user is be disabled, and can not connect to server**
|
||||||
@@ -34,7 +34,7 @@ frps-multiuser will run as one single process and accept HTTP requests from frps
|
|||||||
|
|
||||||
### Download
|
### Download
|
||||||
|
|
||||||
Download frps-multiuser binary file from [Release](../../releases).
|
Download frps-panel binary file from [Release](../../releases).
|
||||||
|
|
||||||
### Requirements
|
### Requirements
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ frp version >= v0.31.0
|
|||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
1. Create file `frps-multiuser.ini` including all support usernames and tokens.
|
1. Create file `frps-panel.ini` including all support usernames and tokens.
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
[common]
|
[common]
|
||||||
@@ -80,9 +80,9 @@ user2 = disable
|
|||||||
|
|
||||||
One user each line. Username and token are split by `=`.
|
One user each line. Username and token are split by `=`.
|
||||||
|
|
||||||
2. Run frps-multiuser:
|
2. Run frps-panel:
|
||||||
|
|
||||||
`./frps-multiuser -c ./frps-multiuser.ini`
|
`./frps-panel -c ./frps-panel.ini`
|
||||||
|
|
||||||
3. Register plugin in frps.
|
3. Register plugin in frps.
|
||||||
|
|
||||||
@@ -135,8 +135,8 @@ remote_port = 6000
|
|||||||
|
|
||||||
this example is for `ubuntu` and with `root` user
|
this example is for `ubuntu` and with `root` user
|
||||||
|
|
||||||
+ 1.unzip `frps-multiuser.zip` to dir `/root/frps-multiuser`
|
+ 1.unzip `frps-panel.zip` to dir `/root/frps-panel`
|
||||||
+ 2.touch a file with command `touch frps-multiuser.service` in dir `/root/frps-multiuser`.the file content is:
|
+ 2.touch a file with command `touch frps-panel.service` in dir `/root/frps-panel`.the file content is:
|
||||||
```ini
|
```ini
|
||||||
[Unit]
|
[Unit]
|
||||||
Description = frp multiuser service
|
Description = frp multiuser service
|
||||||
@@ -145,23 +145,23 @@ Wants = network.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type = simple
|
Type = simple
|
||||||
# config of frps-multiuser.ini,you should change the file path
|
# config of frps-panel.ini,you should change the file path
|
||||||
Environment=FRPS_MULTIUSER_OPTS="-c /root/frps-multiuser/frps-multiuser.ini"
|
Environment=FRPS_MULTIUSER_OPTS="-c /root/frps-panel/frps-panel.ini"
|
||||||
# command of run frps-multiuser,you should change the file path
|
# command of run frps-panel,you should change the file path
|
||||||
ExecStart = /root/frps-multiuser/frps-multiuser $FRPS_MULTIUSER_OPTS
|
ExecStart = /root/frps-panel/frps-panel $FRPS_MULTIUSER_OPTS
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy = multi-user.target
|
WantedBy = multi-user.target
|
||||||
```
|
```
|
||||||
+ 3.copy `frps-multiuser.service` to `/etc/systemd/system/` with command `cp /root/frps-multiuser.service /etc/systemd/system/`
|
+ 3.copy `frps-panel.service` to `/etc/systemd/system/` with command `cp /root/frps-panel.service /etc/systemd/system/`
|
||||||
+ 4.reload service with command `systemctl daemon-reload`
|
+ 4.reload service with command `systemctl daemon-reload`
|
||||||
+ 5.start service with command `service frps-multiuser start`
|
+ 5.start service with command `service frps-panel start`
|
||||||
|
|
||||||
## Issues & Ideas
|
## Issues & Ideas
|
||||||
|
|
||||||
___If you want visit mange ui from internet, you should change `plugin_addr` to `0.0.0.0`___
|
___If you want visit mange ui from internet, you should change `plugin_addr` to `0.0.0.0`___
|
||||||
|
|
||||||
If you have any issues or ideas, put it on [issues](https://github.com/yhl452493373/frps-multiuser/issues). I will try my best to achieve it.
|
If you have any issues or ideas, put it on [issues](https://github.com/yhl452493373/frps-panel/issues). I will try my best to achieve it.
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
|
|||||||
32
README_zh.md
32
README_zh.md
@@ -1,10 +1,10 @@
|
|||||||
# frps-multiuser
|
# frps-panel
|
||||||
|
|
||||||
[README](README.md) | [中文文档](README_zh.md)
|
[README](README.md) | [中文文档](README_zh.md)
|
||||||
|
|
||||||
frps-multiuser 是 [frp](https://github.com/fatedier/frp) 的一个服务端插件,用于支持多用户鉴权。
|
frps-panel 是 [frp](https://github.com/fatedier/frp) 的一个服务端插件,用于支持多用户鉴权。
|
||||||
|
|
||||||
frps-multiuser 会以一个单独的进程运行,并接收 frps 发送过来的 HTTP 请求。
|
frps-panel 会以一个单独的进程运行,并接收 frps 发送过来的 HTTP 请求。
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||
@@ -14,7 +14,7 @@ frps-multiuser 会以一个单独的进程运行,并接收 frps 发送过来
|
|||||||
## 更新说明
|
## 更新说明
|
||||||
|
|
||||||
+ **配置文件改为ini格式,便于增加注释**
|
+ **配置文件改为ini格式,便于增加注释**
|
||||||
+ **删除-l参数,其需要的配置由`frps-multiuser.ini`决定**
|
+ **删除-l参数,其需要的配置由`frps-panel.ini`决定**
|
||||||
+ **指定配置文件的参数由`-f`改为`-c`,和`frps`一致**
|
+ **指定配置文件的参数由`-f`改为`-c`,和`frps`一致**
|
||||||
+ **配置文件中,\[users\]节下如无用户信息,则直接由frps的token认证**
|
+ **配置文件中,\[users\]节下如无用户信息,则直接由frps的token认证**
|
||||||
+ **配置文件中,\[disabled\]节下用户名对应的值如果为`disable`,则说明该账户被禁用,无法连接到服务器**
|
+ **配置文件中,\[disabled\]节下用户名对应的值如果为`disable`,则说明该账户被禁用,无法连接到服务器**
|
||||||
@@ -42,7 +42,7 @@ frps-multiuser 会以一个单独的进程运行,并接收 frps 发送过来
|
|||||||
|
|
||||||
### 使用示例
|
### 使用示例
|
||||||
|
|
||||||
1. 创建 `frps-multiuser.ini` 文件,内容为所有支持的用户名和 token。
|
1. 创建 `frps-panel.ini` 文件,内容为所有支持的用户名和 token。
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
[common]
|
[common]
|
||||||
@@ -80,9 +80,9 @@ user2 = disable
|
|||||||
|
|
||||||
每一个用户占一行,用户名和 token 之间以 `=` 号分隔。
|
每一个用户占一行,用户名和 token 之间以 `=` 号分隔。
|
||||||
|
|
||||||
2. 运行 frps-multiuser,指定监听地址以及 token 存储文件路径。
|
2. 运行 frps-panel,指定监听地址以及 token 存储文件路径。
|
||||||
|
|
||||||
`./frps-multiuser -c ./frps-multiuser.ini`
|
`./frps-panel -c ./frps-panel.ini`
|
||||||
|
|
||||||
3. 在 frps 的配置文件中注册插件,并启动。
|
3. 在 frps 的配置文件中注册插件,并启动。
|
||||||
|
|
||||||
@@ -135,8 +135,8 @@ remote_port = 6000
|
|||||||
|
|
||||||
本实例是在 `ubuntu` 下, 以 `root` 用户执操作
|
本实例是在 `ubuntu` 下, 以 `root` 用户执操作
|
||||||
|
|
||||||
+ 1、解压 `frps-multiuser.zip` 到目录 `/root/frps-multiuser`
|
+ 1、解压 `frps-panel.zip` 到目录 `/root/frps-panel`
|
||||||
+ 2、在目录 `/root/frps-multiuser` 下 用命令创建文件:`touch frps-multiuser.service`。创建后修改文件内容:
|
+ 2、在目录 `/root/frps-panel` 下 用命令创建文件:`touch frps-panel.service`。创建后修改文件内容:
|
||||||
```ini
|
```ini
|
||||||
[Unit]
|
[Unit]
|
||||||
Description = frp multiuser service
|
Description = frp multiuser service
|
||||||
@@ -145,23 +145,23 @@ Wants = network.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type = simple
|
Type = simple
|
||||||
# 启动frps-multiuser的配置文件路径,需修改为您的frps-multiuser.ini的路径
|
# 启动frps-panel的配置文件路径,需修改为您的frps-panel.ini的路径
|
||||||
Environment=FRPS_MULTIUSER_OPTS="-c /root/frps-multiuser/frps-multiuser.ini"
|
Environment=FRPS_MULTIUSER_OPTS="-c /root/frps-panel/frps-panel.ini"
|
||||||
# 启动frps-multiuser的命令,需修改为您的frps-multiuser的安装路径
|
# 启动frps-panel的命令,需修改为您的frps-panel的安装路径
|
||||||
ExecStart = /root/frps-multiuser/frps-multiuser $FRPS_MULTIUSER_OPTS
|
ExecStart = /root/frps-panel/frps-panel $FRPS_MULTIUSER_OPTS
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy = multi-user.target
|
WantedBy = multi-user.target
|
||||||
```
|
```
|
||||||
+ 3、复制服务文件: `cp /root/frps-multiuser.service /etc/systemd/system/`
|
+ 3、复制服务文件: `cp /root/frps-panel.service /etc/systemd/system/`
|
||||||
+ 4、重载服务: `systemctl daemon-reload`
|
+ 4、重载服务: `systemctl daemon-reload`
|
||||||
+ 5、启动服务: `service frps-multiuser start`
|
+ 5、启动服务: `service frps-panel start`
|
||||||
|
|
||||||
## 使用
|
## 使用
|
||||||
|
|
||||||
___如果要从外网访问管理界面, 需要把配置中的 `plugin_addr` 改为 `0.0.0.0`___
|
___如果要从外网访问管理界面, 需要把配置中的 `plugin_addr` 改为 `0.0.0.0`___
|
||||||
|
|
||||||
如果使用中有问题或者有其他想法,在[issues](https://github.com/yhl452493373/frps-multiuser/issues)上提出来。 如果我能搞定的话,我尽量搞。
|
如果使用中有问题或者有其他想法,在[issues](https://github.com/yhl452493373/frps-panel/issues)上提出来。 如果我能搞定的话,我尽量搞。
|
||||||
|
|
||||||
## 致谢
|
## 致谢
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"User Manage": "User Manage",
|
"Frps Panel": "Frps Panel",
|
||||||
"frps multiuser": "frps multiuser",
|
|
||||||
"User": "User",
|
"User": "User",
|
||||||
"Token": "Token",
|
"Token": "Token",
|
||||||
"Notes": "Notes",
|
"Notes": "Notes",
|
||||||
@@ -46,5 +45,8 @@
|
|||||||
"Subdomains is invalid": "Subdomains is invalid",
|
"Subdomains is invalid": "Subdomains is invalid",
|
||||||
"Comment is invalid": "Comment is invalid, it cannot include line breaks",
|
"Comment is invalid": "Comment is invalid, it cannot include line breaks",
|
||||||
"Not limit": "Not limit",
|
"Not limit": "Not limit",
|
||||||
"None": "None"
|
"None": "None",
|
||||||
|
"Server Info": "Server Info",
|
||||||
|
"Users": "Users",
|
||||||
|
"Proxies": "Proxies"
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"User Manage": "用户管理",
|
"Frps Panel": "Frps 面板",
|
||||||
"frps multiuser": "frps用户管理",
|
|
||||||
"User": "用户名(user)",
|
"User": "用户名(user)",
|
||||||
"Token": "凭证(meta_token)",
|
"Token": "凭证(meta_token)",
|
||||||
"Notes": "备注",
|
"Notes": "备注",
|
||||||
@@ -46,5 +45,8 @@
|
|||||||
"Subdomains is invalid": "子域名不正确",
|
"Subdomains is invalid": "子域名不正确",
|
||||||
"Comment is invalid": "备注不正确,不能包含换行",
|
"Comment is invalid": "备注不正确,不能包含换行",
|
||||||
"Not limit": "无限制",
|
"Not limit": "无限制",
|
||||||
"None": "无"
|
"None": "无",
|
||||||
|
"Server Info": "服务器信息",
|
||||||
|
"Users": "用户列表",
|
||||||
|
"Proxies": "代理列表"
|
||||||
}
|
}
|
||||||
@@ -239,8 +239,11 @@ var loadUserList = (function ($) {
|
|||||||
verify: verifyRules
|
verify: verifyRules
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var $section = $('#content > section');
|
||||||
layui.table.render({
|
layui.table.render({
|
||||||
elem: '#tokenTable',
|
elem: '#tokenTable',
|
||||||
|
height: $section.height() - $('#searchForm').height() + 8,
|
||||||
|
text: {none: lang['EmptyData']},
|
||||||
url: '/tokens',
|
url: '/tokens',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
where: {},
|
where: {},
|
||||||
@@ -249,7 +252,6 @@ var loadUserList = (function ($) {
|
|||||||
page: navigator.language.indexOf("zh") !== -1,
|
page: navigator.language.indexOf("zh") !== -1,
|
||||||
toolbar: '#userListToolbarTemplate',
|
toolbar: '#userListToolbarTemplate',
|
||||||
defaultToolbar: false,
|
defaultToolbar: false,
|
||||||
text: {none: lang['EmptyData']},
|
|
||||||
cols: [[
|
cols: [[
|
||||||
{type: 'checkbox'},
|
{type: 'checkbox'},
|
||||||
{field: 'user', title: lang['User'], width: 150, sort: true},
|
{field: 'user', title: lang['User'], width: 150, sort: true},
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="">
|
<html lang="">
|
||||||
<head>
|
<head>
|
||||||
<title>${ .UserManage }</title>
|
<title>${ .FrpsPanel }</title>
|
||||||
<link rel="stylesheet" href="./static/lib/layui/css/layui.css">
|
<link rel="stylesheet" href="./static/lib/layui/css/layui.css">
|
||||||
<link rel="stylesheet" href="./static/css/layui-theme-dark.css">
|
<link rel="stylesheet" href="./static/css/layui-theme-dark.css">
|
||||||
<link rel="stylesheet" href="./static/css/index.css">
|
<link rel="stylesheet" href="./static/css/index.css">
|
||||||
@@ -31,20 +31,20 @@
|
|||||||
<body>
|
<body>
|
||||||
<div class="layui-layout layui-layout-admin">
|
<div class="layui-layout layui-layout-admin">
|
||||||
<div class="layui-header layui-bg-blue">
|
<div class="layui-header layui-bg-blue">
|
||||||
<div class="layui-logo layui-hide-xs layui-bg-black">${ .FrpsMultiuser }</div>
|
<div class="layui-logo layui-hide-xs layui-bg-black">${ .FrpsPanel }</div>
|
||||||
<div class="layui-title" id="title"></div>
|
<div class="layui-title" id="title"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-side layui-bg-black">
|
<div class="layui-side layui-bg-black">
|
||||||
<div class="layui-side-scroll">
|
<div class="layui-side-scroll">
|
||||||
<ul class="layui-nav layui-nav-tree" lay-filter="leftNav" id="leftNav">
|
<ul class="layui-nav layui-nav-tree" lay-filter="leftNav" id="leftNav">
|
||||||
<li class="layui-nav-item layui-this">
|
<li class="layui-nav-item layui-this">
|
||||||
<a href="javascript:void(0)" id="serverInfo">服务器信息</a>
|
<a href="javascript:void(0)" id="serverInfo">${ .ServerInfo }</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="layui-nav-item">
|
<li class="layui-nav-item">
|
||||||
<a href="javascript:void(0)" id="userList">用户列表</a>
|
<a href="javascript:void(0)" id="userList">${ .Users }</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="layui-nav-item layui-nav-itemed" id="proxyList">
|
<li class="layui-nav-item layui-nav-itemed" id="proxyList">
|
||||||
<a class="" href="javascript:void(0)">代理列表</a>
|
<a class="" href="javascript:void(0)">${ .Proxies }</a>
|
||||||
<dl class="layui-nav-child">
|
<dl class="layui-nav-child">
|
||||||
<dd>
|
<dd>
|
||||||
<a href="javascript:void(0)" id="tcp">TCP</a>
|
<a href="javascript:void(0)" id="tcp">TCP</a>
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"frps-multiuser/pkg/server"
|
"frps-panel/pkg/server"
|
||||||
"frps-multiuser/pkg/server/controller"
|
"frps-panel/pkg/server/controller"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"gopkg.in/ini.v1"
|
"gopkg.in/ini.v1"
|
||||||
"io/fs"
|
"io/fs"
|
||||||
@@ -21,13 +21,13 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
rootCmd.PersistentFlags().BoolVarP(&showVersion, "version", "v", false, "version of frps-multiuser")
|
rootCmd.PersistentFlags().BoolVarP(&showVersion, "version", "v", false, "version of frps-panel")
|
||||||
rootCmd.PersistentFlags().StringVarP(&configFile, "config", "c", "./frps-multiuser.ini", "config file of frps-multiuser")
|
rootCmd.PersistentFlags().StringVarP(&configFile, "config", "c", "./frps-panel.ini", "config file of frps-panel")
|
||||||
}
|
}
|
||||||
|
|
||||||
var rootCmd = &cobra.Command{
|
var rootCmd = &cobra.Command{
|
||||||
Use: "frps-multiuser",
|
Use: "frps-panel",
|
||||||
Short: "frps-multiuser is the server plugin of frp to support multiple users.",
|
Short: "frps-panel is the server plugin of frp to support multiple users.",
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
if showVersion {
|
if showVersion {
|
||||||
log.Println(version)
|
log.Println(version)
|
||||||
@@ -42,7 +42,7 @@ var rootCmd = &cobra.Command{
|
|||||||
|
|
||||||
common, tokens, ports, domains, subdomains, iniFile, err := ParseConfigFile(configFile)
|
common, tokens, ports, domains, subdomains, iniFile, err := ParseConfigFile(configFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("fail to start frps-multiuser : %v", err)
|
log.Printf("fail to start frps-panel : %v", err)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
s, err := server.New(
|
s, err := server.New(
|
||||||
@@ -5,16 +5,14 @@ plugin_addr = 127.0.0.1
|
|||||||
plugin_port = 7200
|
plugin_port = 7200
|
||||||
admin_user = admin
|
admin_user = admin
|
||||||
admin_pwd = admin
|
admin_pwd = admin
|
||||||
|
|
||||||
; frp dashboard config info
|
; frp dashboard config info
|
||||||
dashboard_addr = 127.0.0.1
|
dashboard_addr = frp.yanghuanglin.com
|
||||||
dashboard_port = 7500
|
dashboard_port = 7500
|
||||||
dashboard_user = admin
|
dashboard_user = admin
|
||||||
dashboard_pwd = admin
|
dashboard_pwd = 19910621
|
||||||
|
|
||||||
; user tokens
|
; user tokens
|
||||||
[users]
|
[users]
|
||||||
user1 = token1
|
|
||||||
|
|
||||||
; user been disabled
|
; user been disabled
|
||||||
[disabled]
|
[disabled]
|
||||||
10
package.sh
10
package.sh
@@ -1,12 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cd ./release || exit
|
cd ./release || exit
|
||||||
rm -rf *.zip
|
rm -rf *.zip
|
||||||
list=$(ls frps-multiuser-*)
|
list=$(ls frps-panel-*)
|
||||||
echo "$list"
|
echo "$list"
|
||||||
for binFile in $list
|
for binFile in $list
|
||||||
do
|
do
|
||||||
cp "$binFile" frps-multiuser
|
cp "$binFile" frps-panel
|
||||||
zip -r "$binFile".zip frps-multiuser frps-multiuser.ini assets -x "*.git*" "*.idea*" "*.DS_Store" "*.contentFlavour"
|
zip -r "$binFile".zip frps-panel frps-panel.ini assets -x "*.git*" "*.idea*" "*.DS_Store" "*.contentFlavour"
|
||||||
rm -rf "$binFile" frps-multiuser
|
rm -rf "$binFile" frps-panel
|
||||||
done
|
done
|
||||||
rm -rf frps-multiuser.ini assets
|
rm -rf frps-panel.ini assets
|
||||||
|
|||||||
@@ -176,8 +176,7 @@ func (c *HandleController) MakeHandlerFunc() gin.HandlerFunc {
|
|||||||
func (c *HandleController) MakeManagerFunc() func(context *gin.Context) {
|
func (c *HandleController) MakeManagerFunc() func(context *gin.Context) {
|
||||||
return func(context *gin.Context) {
|
return func(context *gin.Context) {
|
||||||
context.HTML(http.StatusOK, "index.html", gin.H{
|
context.HTML(http.StatusOK, "index.html", gin.H{
|
||||||
"UserManage": ginI18n.MustGetMessage(context, "User Manage"),
|
"FrpsPanel": ginI18n.MustGetMessage(context, "Frps Panel"),
|
||||||
"FrpsMultiuser": ginI18n.MustGetMessage(context, "frps multiuser"),
|
|
||||||
"User": ginI18n.MustGetMessage(context, "User"),
|
"User": ginI18n.MustGetMessage(context, "User"),
|
||||||
"Token": ginI18n.MustGetMessage(context, "Token"),
|
"Token": ginI18n.MustGetMessage(context, "Token"),
|
||||||
"Notes": ginI18n.MustGetMessage(context, "Notes"),
|
"Notes": ginI18n.MustGetMessage(context, "Notes"),
|
||||||
@@ -201,6 +200,9 @@ func (c *HandleController) MakeManagerFunc() func(context *gin.Context) {
|
|||||||
"PleaseInputAllowedSubdomains": ginI18n.MustGetMessage(context, "Please input allowed subdomains"),
|
"PleaseInputAllowedSubdomains": ginI18n.MustGetMessage(context, "Please input allowed subdomains"),
|
||||||
"NotLimit": ginI18n.MustGetMessage(context, "Not limit"),
|
"NotLimit": ginI18n.MustGetMessage(context, "Not limit"),
|
||||||
"None": ginI18n.MustGetMessage(context, "None"),
|
"None": ginI18n.MustGetMessage(context, "None"),
|
||||||
|
"ServerInfo": ginI18n.MustGetMessage(context, "Server Info"),
|
||||||
|
"Users": ginI18n.MustGetMessage(context, "Users"),
|
||||||
|
"Proxies": ginI18n.MustGetMessage(context, "Proxies"),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"frps-multiuser/pkg/server/controller"
|
"frps-panel/pkg/server/controller"
|
||||||
ginI18n "github.com/gin-contrib/i18n"
|
ginI18n "github.com/gin-contrib/i18n"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"golang.org/x/text/language"
|
"golang.org/x/text/language"
|
||||||
|
|||||||
Reference in New Issue
Block a user