forked from syapik96/aws
-
Notifications
You must be signed in to change notification settings - Fork 0
/
websocketsshonly.sh
110 lines (93 loc) · 2.97 KB
/
websocketsshonly.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#!/bin/bash
# UPDATED 22-1-22
cd
# Installing Service ws edu-ovpn
wget -q -O /usr/local/bin/edu-ovpn "https://raw.githubusercontent.com/asheeka/aws/main/lain2/ovpn.py"
chmod +x /usr/local/bin/edu-ovpn
# Create system Service ws edu-ovpn
cat > /etc/systemd/system/edu-ovpn.service <<END
[Unit]
Description=Edu-Ovpn Python Over Websocket
Documentation=https://github.com/asheeka/aws
After=network.target nss-lookup.target
[Service]
Type=simple
User=root
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
NoNewPrivileges=true
ExecStart=/usr/bin/python -O /usr/local/bin/edu-ovpn 2099
Restart=on-failure
[Install]
WantedBy=multi-user.target
END
# Installing Service ws-dropbear
wget -q -O /usr/local/bin/ws-dropbear "https://raw.githubusercontent.com/asheeka/aws/main/lain2/dropbear-ws.py"
chmod +x /usr/local/bin/ws-dropbear
# Create system Service ws-dropbear
cat > /etc/systemd/system/ws-dropbear.service <<END
[Unit]
Description=Dropbear Python Over Websocket
Documentation=https://github.com/asheeka/aws
After=network.target nss-lookup.target
[Service]
Type=simple
User=root
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
NoNewPrivileges=true
ExecStart=/usr/bin/python -O /usr/local/bin/ws-dropbear
Restart=on-failure
[Install]
WantedBy=multi-user.target
END
# Installing Service ws-stunnel
wget -O /usr/local/bin/ws-stunnel "https://raw.githubusercontent.com/asheeka/aws/main/lain2/ws-stunnel.py"
chmod +x /usr/local/bin/ws-stunnel
# Create system Service ws-stunnel
cat > /etc/systemd/system/ws-stunnel.service <<END
[Unit]
Description=Python Ssl Proxy Websocket
Documentation=https://github.com/asheeka/aws
After=network.target nss-lookup.target
[Service]
Type=simple
User=root
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
NoNewPrivileges=true
ExecStart=/usr/bin/python -O /usr/local/bin/ws-stunnel
Restart=on-failure
[Install]
WantedBy=multi-user.target
END
# Installing Service edu-openssh
wget -O /usr/local/bin/edu-openssh "https://raw.githubusercontent.com/asheeka/aws/main/lain2/edu-openssh.py"
chmod +x /usr/local/bin/edu-openssh
# Create system Service edu-openssh
cat > /etc/systemd/system/edu-openssh.service <<END
[Unit]
Description=Python Openssh Proxy Websocket
Documentation=https://github.com/asheeka/aws
After=network.target nss-lookup.target
[Service]
Type=simple
User=root
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
NoNewPrivileges=true
ExecStart=/usr/bin/python -O /usr/local/bin/edu-openssh 100
Restart=on-failure
[Install]
WantedBy=multi-user.target
END
# ENABLE & START/RESTART SERVICE
systemctl daemon-reload
systemctl enable edu-ovpn
systemctl restart edu-ovpn
systemctl enable ws-dropbear
systemctl restart ws-dropbear
systemctl enable ws-stunnel
systemctl restart ws-stunnel
systemctl enable edu-openssh
systemctl restart edu-openssh