forked from wnxd/docker-v2ray
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentrypoint.sh
47 lines (35 loc) · 1.44 KB
/
entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
rm -f /etc/motd
cat >>/etc/motd <<EOF
Author : wnxd <imiku@wnxd.me>
Project : https://hub.docker.com/r/wnxd/docker-v2ray/
Docker Image : wnxd/docker-v2ray
Linux Version : $(cat /etc/redhat-release)
Kernel Version : $(uname -r)
Hostname : $(uname -n)
Enjoy your Docker-Linux Node !
EOF
echo "root:${ROOT_PASSWORD}" | chpasswd
echo "Start Success !"
sed -i "s/\[SS_PORT\]/${SS_PORT}/g" /etc/v2ray/config.json
sed -i "s/\[SS_PASSWORD\]/${SS_PASSWORD}/g" /etc/v2ray/config.json
sed -i "s/\[SS_METHOD\]/${SS_METHOD}/g" /etc/v2ray/config.json
sed -i "s/\[VMESS_PORT\]/${VMESS_PORT}/g" /etc/v2ray/config.json
sed -i "s/\[VMESS_ID\]/${VMESS_ID}/g" /etc/v2ray/config.json
sed -i "s/\[VMESS_LEVEL\]/${VMESS_LEVEL}/g" /etc/v2ray/config.json
sed -i "s/\[VMESS_ALTERID\]/${VMESS_ALTERID}/g" /etc/v2ray/config.json
sed -i "s/\[KCP_PORT_VMESS\]/${KCP_PORT_VMESS}/g" /etc/v2ray/config.json
sed -i "s/\[KCP_MUT\]/${KCP_MUT}/g" /etc/v2ray/config.json
sed -i "s/\[KCP_TTI\]/${KCP_TTI}/g" /etc/v2ray/config.json
sed -i "s/\[KCP_UPLINK\]/${KCP_UPLINK}/g" /etc/v2ray/config.json
sed -i "s/\[KCP_DOWNLINK\]/${KCP_DOWNLINK}/g" /etc/v2ray/config.json
sed -i "s/\[KCP_READBUFF\]/${KCP_READBUFF}/g" /etc/v2ray/config.json
sed -i "s/\[KCP_WRITEBUFF\]/${KCP_WRITEBUFF}/g" /etc/v2ray/config.json
for i in "$@"; do
bash $i
done
cat /etc/v2ray/config.json
(/usr/sbin/sshd -D -e \
-o PermitRootLogin=yes \
-o Port=${SSH_PORT}) &
/usr/bin/v2ray/v2ray -config=/etc/v2ray/config.json