Spaces:
Paused
Paused
Commit ·
9b1e5e8
1
Parent(s): 371b4b7
Update start.sh
Browse files
start.sh
CHANGED
|
@@ -3,27 +3,35 @@
|
|
| 3 |
# Set a writable directory for the x-ui database
|
| 4 |
export XUI_DB_FOLDER=/tmp
|
| 5 |
|
|
|
|
|
|
|
|
|
|
| 6 |
# Function to run chisel client in a loop
|
| 7 |
run_chisel() {
|
| 8 |
while true; do
|
| 9 |
echo "Starting chisel client..."
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
/usr/local/bin/chisel client -v --auth "cloud:2025" wss://193.108.113.154 R:2023:127.0.0.1:2023
|
| 13 |
-
echo "Chisel client exited. Restarting in 5 seconds..."
|
| 14 |
sleep 5
|
| 15 |
done
|
| 16 |
}
|
| 17 |
|
| 18 |
# Start chisel in the background
|
| 19 |
run_chisel &
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
/usr/local/x-ui/x-ui setting -port 2023
|
|
|
|
| 21 |
# Set webBasePath
|
| 22 |
/usr/local/x-ui/x-ui setting -webBasePath /
|
| 23 |
|
| 24 |
-
# Reset x-ui admin credentials
|
| 25 |
/usr/local/x-ui/x-ui setting -username prog10 -password 04091968
|
| 26 |
|
| 27 |
# Start x-ui in the foreground
|
|
|
|
| 28 |
cd /usr/local/x-ui
|
| 29 |
./x-ui
|
|
|
|
| 3 |
# Set a writable directory for the x-ui database
|
| 4 |
export XUI_DB_FOLDER=/tmp
|
| 5 |
|
| 6 |
+
# Start socat proxy
|
| 7 |
+
socat TCP-LISTEN:9000,fork,reuseaddr TCP:vds1.iri1968.dpdns.org:443 &
|
| 8 |
+
|
| 9 |
# Function to run chisel client in a loop
|
| 10 |
run_chisel() {
|
| 11 |
while true; do
|
| 12 |
echo "Starting chisel client..."
|
| 13 |
+
/usr/local/bin/chisel client -v --auth "cloud:2025" --proxy http://127.0.0.1:9000 R:2023:127.0.0.1:2023
|
| 14 |
+
echo "Chisel client exited. Restarting in 5 seconds..."
|
|
|
|
|
|
|
| 15 |
sleep 5
|
| 16 |
done
|
| 17 |
}
|
| 18 |
|
| 19 |
# Start chisel in the background
|
| 20 |
run_chisel &
|
| 21 |
+
|
| 22 |
+
# Wait a moment for the background process to start
|
| 23 |
+
sleep 2
|
| 24 |
+
|
| 25 |
+
# Set x-ui port
|
| 26 |
/usr/local/x-ui/x-ui setting -port 2023
|
| 27 |
+
|
| 28 |
# Set webBasePath
|
| 29 |
/usr/local/x-ui/x-ui setting -webBasePath /
|
| 30 |
|
| 31 |
+
# Reset x-ui admin credentials
|
| 32 |
/usr/local/x-ui/x-ui setting -username prog10 -password 04091968
|
| 33 |
|
| 34 |
# Start x-ui in the foreground
|
| 35 |
+
echo "Starting x-ui panel..."
|
| 36 |
cd /usr/local/x-ui
|
| 37 |
./x-ui
|