From 42f8c7f3b726cec0248af2db6ead69df21cc6e1b Mon Sep 17 00:00:00 2001 From: wanghe-fit2cloud Date: Fri, 2 Aug 2024 16:13:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20frp=20=E5=AE=89=E8=A3=85=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E9=85=8D=E7=BD=AE=E5=AF=86=E9=92=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/frpc/0.59.0/data.yml | 76 ++++++++++++++++------------- apps/frpc/0.59.0/data/frpc.toml | 1 - apps/frpc/0.59.0/docker-compose.yml | 8 +-- apps/frpc/0.59.0/scripts/init.sh | 4 +- apps/frps/0.59.0/data.yml | 64 +++++++++++++----------- apps/frps/0.59.0/docker-compose.yml | 8 +-- apps/frps/0.59.0/scripts/init.sh | 4 +- 7 files changed, 87 insertions(+), 78 deletions(-) diff --git a/apps/frpc/0.59.0/data.yml b/apps/frpc/0.59.0/data.yml index 3a407839..02b34ce4 100644 --- a/apps/frpc/0.59.0/data.yml +++ b/apps/frpc/0.59.0/data.yml @@ -1,36 +1,42 @@ additionalProperties: - formFields: - - 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 - rule: paramPort - - default: 7400 - envKey: PANEL_APP_PORT_HTTP - labelEn: Dashboard Port - labelZh: Dashboard 端口 - required: true - type: number - rule: paramPort - - 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 + formFields: + - 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 + rule: paramPort + - default: 7400 + envKey: PANEL_APP_PORT_HTTP + labelEn: Dashboard Port + labelZh: Dashboard 端口 + required: true + type: number + rule: paramPort + - 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 + - default: 'token123456' + envKey: AUTH_TOKEN + labelEn: Auth Token + labelZh: 密钥 + required: true + type: text diff --git a/apps/frpc/0.59.0/data/frpc.toml b/apps/frpc/0.59.0/data/frpc.toml index a172f59a..b4ca280d 100644 --- a/apps/frpc/0.59.0/data/frpc.toml +++ b/apps/frpc/0.59.0/data/frpc.toml @@ -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" diff --git a/apps/frpc/0.59.0/docker-compose.yml b/apps/frpc/0.59.0/docker-compose.yml index 0d53dc19..666d9416 100644 --- a/apps/frpc/0.59.0/docker-compose.yml +++ b/apps/frpc/0.59.0/docker-compose.yml @@ -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: + - ./data/frpc.toml:/etc/frp/frpc.toml + - ./data/ssl:/etc/frp/ssl + labels: createdBy: "Apps" diff --git a/apps/frpc/0.59.0/scripts/init.sh b/apps/frpc/0.59.0/scripts/init.sh index 659752e4..124b534e 100644 --- a/apps/frpc/0.59.0/scripts/init.sh +++ b/apps/frpc/0.59.0/scripts/init.sh @@ -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 - +sed -i "s/webServer\.password = \".*\"/webServer.password = \"${PASSWORD}\"/" ./data/frpc.toml \ No newline at end of file diff --git a/apps/frps/0.59.0/data.yml b/apps/frps/0.59.0/data.yml index c1316502..66861b77 100644 --- a/apps/frps/0.59.0/data.yml +++ b/apps/frps/0.59.0/data.yml @@ -1,30 +1,36 @@ additionalProperties: - formFields: - - default: 7000 - envKey: PANEL_APP_PORT_SERVICE - labelEn: Service Port - labelZh: 服务端口 - required: true - type: number - rule: paramPort - - default: 7500 - envKey: PANEL_APP_PORT_HTTP - labelEn: Dashboard Port - labelZh: Dashboard 端口 - required: true - type: number - rule: paramPort - - 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 + formFields: + - default: 7000 + envKey: PANEL_APP_PORT_SERVICE + labelEn: Service Port + labelZh: 服务端口 + required: true + type: number + rule: paramPort + - default: 7500 + envKey: PANEL_APP_PORT_HTTP + labelEn: Dashboard Port + labelZh: Dashboard 端口 + required: true + type: number + rule: paramPort + - 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 + - default: 'token123456' + envKey: AUTH_TOKEN + labelEn: Auth Token + labelZh: 密钥 + required: true + type: text diff --git a/apps/frps/0.59.0/docker-compose.yml b/apps/frps/0.59.0/docker-compose.yml index fb962572..12f486af 100644 --- a/apps/frps/0.59.0/docker-compose.yml +++ b/apps/frps/0.59.0/docker-compose.yml @@ -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: + - ./data/frps.toml:/etc/frp/frps.toml + - ./data/ssl:/etc/frp/ssl + labels: createdBy: "Apps" diff --git a/apps/frps/0.59.0/scripts/init.sh b/apps/frps/0.59.0/scripts/init.sh index 0e4de58a..88588f90 100644 --- a/apps/frps/0.59.0/scripts/init.sh +++ b/apps/frps/0.59.0/scripts/init.sh @@ -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 - - -