feat: frp 应用增加参数

This commit is contained in:
zhengkunwang223 2023-10-18 17:28:28 +08:00
parent 048e805efb
commit d914ff210d
8 changed files with 93 additions and 22 deletions

View File

@ -1,9 +1,34 @@
additionalProperties:
formFields:
- default: 6000
disabled: true
envKey: PANEL_APP_PORT_HTTP
labelEn: Port
labelZh: 端口
- default: 127.0.0.1
envKey: SERVER_ADDRESS
labelEn: Server Address
labelZh: 服务端IP
required: true
type: text
- default: 7000
envKey: SERVER_PORT
labelEn: Server Port
labelZh: 服务端端口
required: true
type: number
- default: 7400
envKey: PANEL_APP_PORT_HTTP
labelEn: Dashboard Port
labelZh: Dashboard 端口
required: true
type: number
- default: admin
envKey: USER_NAME
labelEn: Dashboard Username
labelZh: Dashboard 用户名
required: true
type: text
- default: admin
envKey: PASSWORD
labelEn: Dashboard Password
labelZh: Dashboard 密码
required: true
random: true
rule: paramComplexity
type: password

View File

@ -1,9 +1,8 @@
serverAddr = "0.0.0.0"
serverPort = 7000
[[proxies]]
name = "ssh"
type = "tcp"
localIP = "127.0.0.1"
localPort = 22
remotePort = 6001
webServer.addr = "0.0.0.0"
webServer.port = 40001
webServer.user = "admin"
webServer.password = "password123456"
webServer.pprofEnable = false

View File

@ -3,9 +3,10 @@ services:
frpc:
container_name: ${CONTAINER_NAME}
restart: always
network_mode: "host"
network_mode: host
volumes:
- "./data/frpc.toml:/etc/frp/frpc.toml"
image: "snowdreamtech/frpc:0.52.1"
- ./data/frpc.toml:/etc/frp/frpc.toml
image: snowdreamtech/frpc:0.52.1
labels:
createdBy: "Apps"

View File

@ -0,0 +1,11 @@
#!/bin/bash
source .env
sed -i "s/serverAddr = \".*\"/serverAddr = \"${SERVER_ADDRESS}\"/" ./data/frpc.toml
sed -i "s/serverPort = .*$/serverPort = ${SERVER_PORT}/" ./data/frpc.toml
sed -i "s/webServer\.addr = \".*\"/webServer.addr = \"${SERVER_ADDRESS}\"/" ./data/frpc.toml
sed -i "s/webServer\.port = .*$/webServer.port = ${PANEL_APP_PORT_HTTP}/" ./data/frpc.toml
sed -i "s/webServer\.user = \".*\"/webServer.user = \"${USER_NAME}\"/" ./data/frpc.toml
sed -i "s/webServer\.password = \".*\"/webServer.password = \"${PASSWORD}\"/" ./data/frpc.toml

View File

@ -1,9 +1,28 @@
additionalProperties:
formFields:
- default: 7000
disabled: true
envKey: PANEL_APP_PORT_HTTP
labelEn: Port
labelZh: 端口
envKey: PANEL_APP_PORT_SERVICE
labelEn: Service Port
labelZh: 服务端口
required: true
type: number
- default: 7500
envKey: PANEL_APP_PORT_HTTP
labelEn: Dashboard Port
labelZh: Dashboard 端口
required: true
type: number
- default: admin
envKey: USER_NAME
labelEn: Username
labelZh: 用户名
required: true
type: text
- default: admin
envKey: PASSWORD
labelEn: Password
labelZh: 密码
required: true
random: true
rule: paramComplexity
type: password

View File

@ -1 +1,6 @@
bindPort = 7000
bindPort = 7000
webServer.addr = "0.0.0.0"
webServer.port = 7500
webServer.user = "admin"
webServer.password = "admin"

View File

@ -3,9 +3,9 @@ services:
frps:
container_name: ${CONTAINER_NAME}
restart: always
network_mode: "host"
network_mode: host
volumes:
- "./data/frps.toml:/etc/frp/frps.toml"
image: "snowdreamtech/frps:0.52.1"
- ./data/frps.toml:/etc/frp/frps.toml
image: snowdreamtech/frps:0.52.1
labels:
createdBy: "Apps"

View File

@ -0,0 +1,11 @@
#!/bin/bash
source ./.env
sed -i "s/bindPort = .*$/bindPort = ${PANEL_APP_PORT_SERVICE}/" ./data/frps.toml
sed -i "s/webServer\.port = .*$/webServer.port = ${PANEL_APP_PORT_HTTP}/" ./data/frps.toml
sed -i "s/webServer\.user = \".*\"/webServer.user = \"${USER_NAME}\"/" ./data/frps.toml
sed -i "s/webServer\.password = \".*\"/webServer.password = \"${PASSWORD}\"/" ./data/frps.toml