Skip to content

Commit ddfd6ad

Browse files
committed
up:v1.4.4
1 parent 72aaa25 commit ddfd6ad

File tree

5 files changed

+40
-6
lines changed

5 files changed

+40
-6
lines changed

Changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
KoolCenter RustDesk Server Changelog
22
===========================================
3+
1.4.4
4+
- update 增加IPv6支持,同步开启IPv6防火墙端口。
5+
36
1.4.3
47
- update rustdesk_server二进制v1.1.10-3版本
58

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@
55

66

77
## 项目地址
8+
RustDesk:
89
https://github.com/rustdesk/rustdesk
910

11+
RustDesk Server:
12+
https://github.com/rustdesk/rustdesk-server
13+
14+
1015
## 官方信息
1116

1217
官网地址:https://rustdesk.com/

config.json.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
"module": "rustdesk",
88
"tags": "穿透",
99
"title": "RustDesk Server",
10-
"version": "1.4.3"
10+
"version": "1.4.4"
1111
}

rustdesk/scripts/rustdesk_config.sh

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,29 +258,55 @@ open_port() {
258258
echo_date "ℹ️加载xt_comment.ko内核模块!"
259259
insmod /lib/modules/${OS}/kernel/net/netfilter/xt_comment.ko
260260
fi
261-
# 3.open port
261+
# 3.open v4 port
262262
local HBBSMATCH=$(iptables -t filter -S INPUT | grep "rustdesk_rule")
263263
if [ -z "${HBBSMATCH}" ]; then
264-
echo_date "🧱添加防火墙入站规则..."
265-
echo_date "🧱打开 RustDesk 服务端口${hbbs_used_port1} ${hbbs_used_port} ${hbbr_used_port} ${hbbs_used_port2} ${hbbr_used_port1}"
264+
echo_date "🧱添加IPV4防火墙入站规则..."
265+
echo_date "🧱打开 RustDesk IPV4服务端口${hbbs_used_port1} ${hbbs_used_port} ${hbbr_used_port} ${hbbs_used_port2} ${hbbr_used_port1}"
266266
iptables -I INPUT -p tcp --dport ${hbbs_used_port1} -j ACCEPT -m comment --comment "rustdesk_rule" >/dev/null 2>&1
267267
iptables -I INPUT -p tcp --dport ${hbbs_used_port} -j ACCEPT -m comment --comment "rustdesk_rule" >/dev/null 2>&1
268268
iptables -I INPUT -p udp --dport ${hbbs_used_port} -j ACCEPT -m comment --comment "rustdesk_rule" >/dev/null 2>&1
269269
iptables -I INPUT -p tcp --dport ${hbbs_used_port2} -j ACCEPT -m comment --comment "rustdesk_rule" >/dev/null 2>&1
270270
iptables -I INPUT -p tcp --dport ${hbbr_used_port} -j ACCEPT -m comment --comment "rustdesk_rule" >/dev/null 2>&1
271271
iptables -I INPUT -p tcp --dport ${hbbr_used_port1} -j ACCEPT -m comment --comment "rustdesk_rule" >/dev/null 2>&1
272272
fi
273+
#检测ip6tables是否存在
274+
local IP6T=$(which ip6tables)
275+
if [ -n "${IP6T}" ]; then
276+
# 4.open v6 port
277+
local HBBSMATCH6=$(ip6tables -t filter -S INPUT | grep "rustdesk_rule")
278+
if [ -z "${HBBSMATCH6}" ]; then
279+
echo_date "🧱添加IPV6防火墙入站规则..."
280+
echo_date "🧱打开 RustDesk IPV6服务端口:${hbbs_used_port1} ${hbbs_used_port} ${hbbr_used_port} ${hbbs_used_port2} ${hbbr_used_port1}"
281+
ip6tables -I INPUT -p tcp --dport ${hbbs_used_port1} -j ACCEPT -m comment --comment "rustdesk_rule" >/dev/null 2>&1
282+
ip6tables -I INPUT -p tcp --dport ${hbbs_used_port} -j ACCEPT -m comment --comment "rustdesk_rule" >/dev/null 2>&1
283+
ip6tables -I INPUT -p udp --dport ${hbbs_used_port} -j ACCEPT -m comment --comment "rustdesk_rule" >/dev/null 2>&1
284+
ip6tables -I INPUT -p tcp --dport ${hbbs_used_port2} -j ACCEPT -m comment --comment "rustdesk_rule" >/dev/null 2>&1
285+
ip6tables -I INPUT -p tcp --dport ${hbbr_used_port} -j ACCEPT -m comment --comment "rustdesk_rule" >/dev/null 2>&1
286+
ip6tables -I INPUT -p tcp --dport ${hbbr_used_port1} -j ACCEPT -m comment --comment "rustdesk_rule" >/dev/null 2>&1
287+
fi
288+
fi
273289
}
274290

275291
close_port() {
292+
#1.close v4 port
276293
local IPTS=$(iptables -t filter -S | grep "rustdesk_rule" | sed 's/-A/iptables -t filter -D/g')
277294
if [ -n "${IPTS}" ]; then
278-
echo_date "🧱关闭本插件在防火墙上打开的所有端口!"
295+
echo_date "🧱关闭本插件在IPV4防火墙上打开的所有端口!"
279296
iptables -t filter -S | grep "rustdesk_rule" | sed 's/-A/iptables -t filter -D/g' >/tmp/rustdesk_clean.sh
280297
chmod +x /tmp/rustdesk_clean.sh
281298
sh /tmp/rustdesk_clean.sh >/dev/null 2>&1
282299
rm /tmp/rustdesk_clean.sh
283300
fi
301+
#2.close v6 port
302+
local IP6TS=$(ip6tables -t filter -S | grep "rustdesk_rule" | sed 's/-A/ip6tables -t filter -D/g')
303+
if [ -n "${IP6TS}" ]; then
304+
echo_date "🧱关闭本插件在IPV6防火墙上打开的所有端口!"
305+
ip6tables -t filter -S | grep "rustdesk_rule" | sed 's/-A/ip6tables -t filter -D/g' >/tmp/rustdesk_clean.sh
306+
chmod +x /tmp/rustdesk_clean.sh
307+
sh /tmp/rustdesk_clean.sh >/dev/null 2>&1
308+
rm /tmp/rustdesk_clean.sh
309+
fi
284310
}
285311

286312
check_status() {

rustdesk/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.4.3
1+
1.4.4

0 commit comments

Comments
 (0)