Skip to content

Commit 3289d46

Browse files
committed
Update blog
1 parent 19738dd commit 3289d46

1 file changed

Lines changed: 28 additions & 3 deletions

File tree

source/_posts/2023-06-17-基于-Proxmox-VE-的-All-in-One-服务器搭建.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ tags:
66
categories:
77
- 折腾
88
date: 2023-06-17 19:12:49
9-
updated: 2023-07-14 0:25:24
9+
updated: 2023-08-22 1:10:55
1010
toc: true
1111
thumbnail: /2023/06/17/基于-Proxmox-VE-的-All-in-One-服务器搭建/proxmox-logo.svg
1212
---
@@ -528,6 +528,31 @@ fi
528528

529529
两天后作者在 [d499374](https://github.com/vernesong/OpenClash/commit/d49937415c00c6d3f2519a382cd13be54d531e8b) 中修复了该 bug,发布于 `0.45.125` 版本中,等待合入 master。
530530

531+
##### 远程 Wireshark 抓包调试
532+
533+
有时配挂了需要抓包调试,可以使用远程主机上的 tcpdump + Windows 本机上的 wireshark 远程抓包分析。
534+
535+
给用户非 root 使用 tcpdump 权限:`sudo chmod u+s /usr/sbin/tcpdump`
536+
537+
然后 Windows 本机执行 `ssh ubuntu "tcpdump -i br-lan -l -w - 'port not 22'" | wireshark -k -i -` 即可开始抓包。
538+
539+
参考:<https://thiscute.world/posts/tcpdump-and-wireshark>
540+
541+
##### 配置 UDP 代理
542+
543+
使用 Redir-Host 兼容模式 + UDP tproxy 转发似乎并不能正常运行,所以还是得使用 TUN 模式。
544+
545+
LXC 启用 TUN 需要一点额外的配置,参考 <https://forum.proxmox.com/threads/how-to-enable-tun-tap-in-a-lxc-container.25339/>,在配置文件中添加如下内容:
546+
547+
``` conf
548+
lxc.cgroup.devices.allow: c 10:200 rwm
549+
lxc.mount.entry: /dev/net dev/net none bind,create=dir
550+
```
551+
552+
然后选用 Meta 内核,IPv4 和 IPv6 都启用 TUN 模式,即可代理 UDP 流量了。
553+
554+
还可以考虑开启 `仅允许常用端口流量` 来防止不必要的代理。具体地,此处所指的常用端口如下:`21 22 23 53 80 123 143 194 443 465 587 853 993 995 998 2052 2053 2082 2083 2086 2095 2096 5222 5228 5229 5230 8080 8443 8880 8888 8889`
555+
531556
#### 配置校园网认证
532557

533558
使用 [GoAuthing](https://github.com/z4yx/GoAuthing)
@@ -655,8 +680,8 @@ OpenWrt 默认的端口转发基于 iptables / nftables 实现,然而,配置
655680

656681
``` bash
657682
nft add table inet trace_debug
658-
nft add chain inet trace_debug trace_pre { type filter hook prerouting priority -200000; }
659-
nft insert rule inet trace_debug trace_pre ip saddr 192.168.22.118 ip daddr ??.??.??.?? tcp limit rate 1/second meta nftrace set 1
683+
nft 'add chain inet trace_debug trace_pre { type filter hook prerouting priority -200000; }'
684+
nft insert rule inet trace_debug trace_pre ip saddr 192.168.22.118 ip daddr ??.??.??.?? limit rate 1/second meta nftrace set 1
660685
```
661686

662687
然后 `nft monitor trace` 就可以跟踪了。

0 commit comments

Comments
 (0)