Spaces:
Paused
Paused
Update entrypoint.sh
Browse files- entrypoint.sh +3 -31
entrypoint.sh
CHANGED
|
@@ -1,35 +1,7 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
|
| 3 |
-
#
|
| 4 |
-
|
| 5 |
|
| 6 |
-
#
|
| 7 |
-
: "${WARP_SLEEP:=2}"
|
| 8 |
-
|
| 9 |
-
# Start the WARP service in the background
|
| 10 |
-
echo "Starting WARP service..."
|
| 11 |
-
warp-svc --accept-tos &
|
| 12 |
-
|
| 13 |
-
# Wait for the WARP service to start
|
| 14 |
-
echo "Sleeping for $WARP_SLEEP seconds to allow WARP service to start..."
|
| 15 |
-
sleep "$WARP_SLEEP"
|
| 16 |
-
|
| 17 |
-
# Set WARP to proxy mode and connect
|
| 18 |
-
echo "Setting WARP to proxy mode..."
|
| 19 |
-
warp-cli --accept-tos set-mode proxy
|
| 20 |
-
warp-cli --accept-tos connect
|
| 21 |
-
|
| 22 |
-
# Check if WARP is connected
|
| 23 |
-
if warp-cli --accept-tos status | grep -q "Connected"; then
|
| 24 |
-
echo "WARP is running in proxy mode."
|
| 25 |
-
else
|
| 26 |
-
echo "Failed to connect WARP in proxy mode."
|
| 27 |
-
exit 1
|
| 28 |
-
fi
|
| 29 |
-
|
| 30 |
-
# Placeholder for executing a Python script (uncomment to use)
|
| 31 |
-
# echo "Executing Python script..."
|
| 32 |
-
# python3 /path/to/your_script.py
|
| 33 |
-
|
| 34 |
-
# Keep the script running to maintain the container alive
|
| 35 |
tail -f /dev/null
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
|
| 3 |
+
# Start WireGuard service
|
| 4 |
+
wg-quick up wgcf
|
| 5 |
|
| 6 |
+
# Keep the container running
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
tail -f /dev/null
|