-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
nobug
committed
Dec 24, 2023
1 parent
6943078
commit c054a1d
Showing
11 changed files
with
66 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
version: '3' | ||
services: | ||
frp-http-server: | ||
build: . | ||
container_name: frp-http-server | ||
# tty: true | ||
# stdin_open: true | ||
environment: | ||
- FRP_SUBDOMAIN_HOST=yhfrp.tk | ||
# volumes: | ||
# - ./src/html/client.sh:/usr/share/nginx/html/client.sh | ||
- FRP_SUBDOMAIN_HOST=xxx.com | ||
- SERVER_IP=xxx.xxx.xxx.xxx | ||
ports: | ||
- "80:80" | ||
- "7000:7000" | ||
build: . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/command/with-contenv bash | ||
# shellcheck shell=bash | ||
echo "10-FRP_SUBDOMAIN_HOST: ${FRP_SUBDOMAIN_HOST}" | ||
exec /usr/bin/frps \ | ||
--bind_port="7000" \ | ||
--subdomain_host="${FRP_SUBDOMAIN_HOST}" \ | ||
--vhost_http_port="7080" \ | ||
--dashboard_port="7500" \ | ||
--dashboard_user="" \ | ||
--dashboard_pwd="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
longrun |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/command/with-contenv bash | ||
# shellcheck shell=bash | ||
|
||
FRPS_VER=$(frps -v) | ||
if [ -z "${SERVER_IP}" ]; then | ||
echo "20-SERVER_IP is empty, use ip.sb to get ip" | ||
SERVER_IP=$(curl -4s ip.sb) | ||
fi | ||
|
||
echo "20-FRP_SUBDOMAIN_HOST: ${FRP_SUBDOMAIN_HOST}" | ||
echo "20-SERVER_IP: ${SERVER_IP}" | ||
echo "20-FRPS_VER: ${FRPS_VER}" | ||
|
||
sed -i "s/REPLACE_MAIN_DOMAIN/${FRP_SUBDOMAIN_HOST}/g" /usr/share/nginx/html/client.sh | ||
sed -i "s/REPLACE_SERVER_IP/${SERVER_IP}/g" /usr/share/nginx/html/client.sh | ||
sed -i "s/REPLACE_VERSION/${FRPS_VER}/g" /usr/share/nginx/html/client.sh | ||
|
||
sed -i "s/REPLACE_MAIN_DOMAIN/${FRP_SUBDOMAIN_HOST}/g" /usr/share/nginx/html/client.vbs | ||
sed -i "s/REPLACE_SERVER_IP/${SERVER_IP}/g" /usr/share/nginx/html/client.vbs | ||
sed -i "s/REPLACE_VERSION/${FRPS_VER}/g" /usr/share/nginx/html/client.vbs | ||
|
||
exec /docker-entrypoint-nginx.sh nginx -g 'daemon off;' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
longrun |
Empty file.
File renamed without changes.