Skip to content

Commit 24f9d5a

Browse files
Update Source.sh
1 parent 76059b6 commit 24f9d5a

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

Sing-Box_Config_Installer/Source.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,7 @@ install_ws() {
11441144
sed -i "s/PORT/$user_port/" /etc/ws/config.json
11451145

11461146
# replace "DOMAIM" in the config.json file
1147-
sed -i "s/DOMAIN/$DOMAIM/" /etc/ws/config.json
1147+
sed -i "s/DOMAIN/$DOMAIN/" /etc/ws/config.json
11481148

11491149
# replace "NAME" in the config.json file
11501150
sed -i "s/NAME/WebSocket/" /etc/ws/config.json
@@ -1178,8 +1178,8 @@ install_ws() {
11781178
fi
11791179

11801180
get_ssl
1181-
mv /etc/letsencrypt/live/"$DOMAIN"/fullchain.pem /etc/ws/server.crt
1182-
mv /etc/letsencrypt/live/"$DOMAIN"/privkey.pem /etc/ws/server.key
1181+
cp /etc/letsencrypt/live/"$DOMAIN"/fullchain.pem /etc/ws/server.crt
1182+
cp /etc/letsencrypt/live/"$DOMAIN"/privkey.pem /etc/ws/server.key
11831183

11841184
# Enable and start the sing-box service
11851185
sudo systemctl enable --now WS
@@ -1196,6 +1196,7 @@ install_ws() {
11961196
vless://UUID@$DOMAIN:$user_port?security=tls&sni=$DOMAIN&alpn=http/1.1&fp=firefox&type=ws&encryption=none#WebSocket"
11971197
echo -e "Config URL: \e[91m$result_url2\e[0m" >/etc/ws/config.txt
11981198

1199+
cat /etc/ws/user-config.txt
11991200
config=$(cat /etc/ws/user-config.txt)
12001201

12011202
echo Config:
@@ -1233,7 +1234,7 @@ modify_ws_config() {
12331234
sed -i "s/PORT/$user_port/" /etc/ws/config.json
12341235

12351236
# replace "DOMAIM" in the config.json file
1236-
sed -i "s/DOMAIN/$DOMAIM/" /etc/ws/config.json
1237+
sed -i "s/DOMAIN/$DOMAIN/" /etc/ws/config.json
12371238

12381239
# replace "NAME" in the config.json file
12391240
sed -i "s/NAME/WebSocket/" /etc/ws/config.json
@@ -1267,8 +1268,8 @@ modify_ws_config() {
12671268
fi
12681269

12691270
get_ssl
1270-
mv /etc/letsencrypt/live/"$DOMAIN"/fullchain.pem /etc/ws/server.crt
1271-
mv /etc/letsencrypt/live/"$DOMAIN"/privkey.pem /etc/ws/server.key
1271+
cp /etc/letsencrypt/live/"$DOMAIN"/fullchain.pem /etc/ws/server.crt
1272+
cp /etc/letsencrypt/live/"$DOMAIN"/privkey.pem /etc/ws/server.key
12721273

12731274
# Enable and start the sing-box service
12741275
sudo systemctl enable --now WS
@@ -1283,6 +1284,7 @@ modify_ws_config() {
12831284
vless://UUID@$DOMAIN:$user_port?security=tls&sni=$DOMAIN&alpn=http/1.1&fp=firefox&type=ws&encryption=none#WebSocket"
12841285
echo -e "Config URL: \e[91m$result_url2\e[0m" >/etc/ws/config.txt
12851286

1287+
cat /etc/ws/user-config.txt
12861288
config=$(cat /etc/ws/user-config.txt)
12871289

12881290
echo Config:
@@ -1496,6 +1498,7 @@ show_ws_config() {
14961498

14971499
sed "s/UUID/$user_uuid/g" /etc/ws/config.txt >/etc/ws/user-config.txt
14981500

1501+
cat /etc/ws/user-config.txt
14991502
config=$(cat /etc/ws/user-config.txt)
15001503

15011504
echo Config:

0 commit comments

Comments
 (0)