feat: frp 安装支持配置密钥

This commit is contained in:
wanghe-fit2cloud 2024-08-02 16:13:27 +08:00
parent 5016b0bd77
commit 42f8c7f3b7
7 changed files with 87 additions and 78 deletions

View File

@ -34,3 +34,9 @@ additionalProperties:
random: true
rule: paramComplexity
type: password
- default: 'token123456'
envKey: AUTH_TOKEN
labelEn: Auth Token
labelZh: 密钥
required: true
type: text

View File

@ -10,7 +10,6 @@ webServer.user = "admin"
webServer.password = "password123456"
webServer.pprofEnable = false
# tls
#transport.tls.certFile = "/etc/frp/ssl/client.crt"
#transport.tls.keyFile = "/etc/frp/ssl/client.key"

View File

@ -1,11 +1,11 @@
services:
frpc:
image: snowdreamtech/frpc:0.59.0
container_name: ${CONTAINER_NAME}
restart: always
network_mode: host
volumes:
- ./data/frpc.toml:/etc/frp/frpc.toml
- ./data/ssl:/etc/frp/ssl
image: snowdreamtech/frpc:0.59.0
labels:
createdBy: "Apps"

View File

@ -4,7 +4,7 @@ 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/auth\.token = \".*\"/auth.token = \"${AUTH_TOKEN}\"/" ./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

@ -28,3 +28,9 @@ additionalProperties:
random: true
rule: paramComplexity
type: password
- default: 'token123456'
envKey: AUTH_TOKEN
labelEn: Auth Token
labelZh: 密钥
required: true
type: text

View File

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

View File

@ -3,9 +3,7 @@
source ./.env
sed -i "s/bindPort = .*$/bindPort = ${PANEL_APP_PORT_SERVICE}/" ./data/frps.toml
sed -i "s/auth\.token = \".*\"/auth.token = \"${AUTH_TOKEN}\"/" ./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