updated everything to not require gs-secret manually

This commit is contained in:
Luxferre
2026-07-26 09:50:04 +03:00
parent f7e67801a5
commit 7b0d1582d7
5 changed files with 23 additions and 25 deletions
-2
View File
@@ -3,8 +3,6 @@ services:
build: .
container_name: gsocket-vpn
restart: unless-stopped
environment:
- GS_SECRET=${GS_SECRET}
dns:
- 1.1.1.1
- 8.8.8.8
+4 -6
View File
@@ -1,11 +1,8 @@
#!/usr/bin/env bash
set -e
# Server-side core (entrypoint) for GS-Warp
# Created by Luxferre in 2026, released into the public domain
if [ -z "$GS_SECRET" ]; then
echo "[!] ERROR: GS_SECRET environment variable is missing."
echo " Please start the container with -e GS_SECRET=\"your_secret_key\""
exit 1
fi
set -e
# Ensure TUN device node exists in container namespace
if [ ! -c /dev/net/tun ]; then
@@ -151,5 +148,6 @@ openvpn --config /vpn/server.conf \
sleep 2
# 4. Forward GSocket stream directly to 127.0.0.1:1194
GS_SECRET="$(md5sum /vpn/client.ovpn | cut -d ' ' -f 1)"
echo "[+] Starting gs-netcat port forwarder..."
exec gs-netcat -s "$GS_SECRET" -l -d 127.0.0.1 -p 1194