HynoR
f35b0deb29
refactor(firewall): extract port forwarding subsystem ( #13347 )
...
Port forwarding no longer shares the filter client. FilterClient keeps only
filter capabilities, and forwarding gets its own adapter, service and boot
replay:
- utils/firewall/forwarding holds the provider adapters. firewalld uses native
forward-port, ufw and iptables share the NAT implementation moved out of
client/iptables/forward.go.
- service/forwarding.go owns base info, search, operate, enable and replay.
The API keeps its routes and dispatches on name/type/operate.
- init/firewall replays forwarding through that service instead of loading NAT
rule files inline.
Also adds 1PANEL_FORWARD to the IptablesOp name enum: the frontend already
sends {"name":"1PANEL_FORWARD","operate":"init-forward"} and the validator
rejected it with 400 before reaching the service. Besides that, the only
observable difference is that a forward-tab search no longer triggers the
port/address record cleanup goroutine on the side.
2026-07-30 14:07:41 +08:00
ssongliu
d55982bde0
refactor: update agent and core utilities ( #12621 )
2026-05-21 12:35:09 +08:00
MonkeyCode-AI
a95d9aa27a
fix: Add CheckIllegal validation to prevent command injection in 8 API endpoints ( #11857 )
...
- SSH log query: validate req.Info before grep concatenation
- iptables rule search: validate chain param in ReadFilterRulesByChain/LoadDefaultStrategy
- Firewalld port forward: validate port/protocol/targetIP/targetPort params
- Pure-FTPd user management: validate username/path in UserAdd/UserDel/SetPath/SetStatus
- PostgreSQL remote backup/recover: validate password/address/user/dbname
- MySQL remote backup/recover: validate password/address/user/dbname/format
- Website Composer: validate user/mirror/command/extCommand
- Disk operations: validate device/mountPoint/filesystem in Partition/Mount/Unmount
2026-02-10 18:32:42 +08:00
ssongliu
d8a08a6c0c
fix: Fix iptables rule display abnormality issue ( #11555 )
2026-01-05 14:48:49 +08:00
ssongliu
50947f4ddc
feat: ICMP ping disable compatibility with Debian 13 ( #11514 )
...
Refs #11472
2025-12-29 09:35:36 +00:00
ssongliu
c08e83e5d4
fix: Fix firewalld range port forwarding failure issue ( #11390 )
2025-12-18 09:21:13 +00:00
ssongliu
6aca579854
fix: Fix ufw IPv6 rule configuration issue ( #11349 )
...
Refs #11211
2025-12-16 08:31:59 +00:00
endymx
ce3fa94708
feat(iptables): range forward ( #11188 )
2025-12-08 16:35:01 +08:00
ssongliu
b3350b54b3
fix: Add iptables execution timeout ( #11176 )
2025-12-04 11:22:25 +08:00
ssongliu
3b306f990a
chore: Optimize iptables initial state loading speed ( #11085 )
2025-11-26 22:29:48 +08:00
ssongliu
c3cc26a136
fix: Fix the issue of abnormal iptables persistence loading ( #11066 )
2025-11-25 14:21:24 +08:00
ssongliu
496c0b50b4
fix: Fix the issue of abnormal iptables rule persistence ( #11056 )
...
Refs #11027
2025-11-24 14:33:15 +00:00
ssongliu
e4fbd3cf86
fix: Fix the issue of abnormal ufw status loading ( #10949 )
2025-11-13 21:36:35 +08:00
ssongliu
55cbf572e0
fix: Fix the issue where deleting rules in iptables advanced settings… ( #10942 )
...
… fails
2025-11-13 06:38:47 +00:00
ssongliu
0bc9e85734
fix: Fix the issue of abnormal iptables range port addition ( #10938 )
2025-11-12 22:26:59 +08:00
KOMATA
afd62e8539
fix: Fix bug in iptables firewall module ( #10927 )
2025-11-12 11:49:24 +08:00
ssongliu
102f7c316d
fix: display iptables default allowed ports ( #10922 )
2025-11-11 14:22:42 +00:00
KOMATA
02d22ba63f
feat: refactor regex usage across multiple files and centralize patterns in a new utility ( #10896 )
2025-11-11 16:14:09 +08:00
ssongliu
6db79f4b7b
feat: support iptables firewall control ( #10903 )
2025-11-10 21:17:53 +08:00
ssongliu
c06ba18023
feat: compatible with openrc and sysvinit ( #10723 )
2025-10-22 18:32:42 +08:00
双向极端
d0bb9165bf
feat: Add inbound interface restriction option for ufw forward rules ( #10345 ) ( #10549 )
...
* 修复https防窜站关闭时修改默认站点报错的问题
* feat: Add inbound interface restriction option for ufw forward rules (#10345 )
---------
Co-authored-by: live <Anxys@outlook.com >
2025-10-02 20:33:20 +08:00
ssongliu
80ce60c56c
fix: Fix port forwarding error issues ( #9700 )
...
Refs #9658
2025-07-28 08:29:40 +00:00
蘭
71193cc912
ref: Optimize IPv4 forwarding and preset chain existence check ( #9592 )
2025-07-21 11:04:42 +00:00
蘭
d68a0b076b
feat: transfer some code ( #9124 )
...
refs #9067
2025-06-17 03:56:53 +00:00
ssongliu
c59105f050
feat: Encapsulate command execution methods ( #8401 )
2025-04-15 22:15:18 +08:00
ssongliu
949e3c25a7
feat: The application installation jumps to the script library ( #8317 )
2025-04-03 16:15:57 +00:00
ssongliu
8283cd7d02
feat: adjust internationalization errors and the positions of global … ( #7767 )
2025-01-24 03:00:07 +00:00
ssongliu
b90a90c0c8
feat: Merge code from dev ( #7726 )
2025-01-15 06:24:24 +00:00
ssongliu
55a6cdcf10
feat: uniform application service status return ( #7426 )
2024-12-18 10:06:15 +00:00
ssongliu
a627aa9915
feat: merge from dev ( #7366 )
...
* feat: merge from dev
* feat: Merge mobile style code from the dev branch
2024-12-17 15:59:21 +08:00
ssongliu
8d28b7db94
pref: backend 重命名 agent
2024-07-23 14:48:37 +08:00