Closed edisonleung1 closed 5 months ago
正常,多分点内存吧。golang占用内存多。再多分几个核。
dns是不是回环了,你用的主路由地址dns,然后iptables规则局域网53端口不直连。
不建议新手上来就学dns 53端口劫持,很容易掉坑里去。客户端设置一下dns又不是很难。
dns是不是回环了,你用的主路由地址dns,然后iptables规则局域网53端口不直连。
不建议新手上来就学dns 53端口劫持,很容易掉坑里去。客户端设置一下dns又不是很难。
因为要看iqiyi和有些客户端不支持设置DNS等原因还是希望使用DNS劫持,谢谢你的建议但是如果能提出解决方案就更好了
系统配置
Esxi虚拟机 Intel(R) Xeon(R) CPU E5-2689 0 @ 2.60GHz 1G RAM
Linux ubnt.cmdschool.org 4.19.0-20-amd64 #1 SMP Debian 4.19.235-1 (2022-03-17) x86_64 GNU/Linux
DNS服务器使用主网关的
1) 你正在使用哪个版本的 XRay?(如果服务器和客户端使用了不同版本,请注明)
● xray.service - Xray Service Loaded: loaded (/etc/systemd/system/xray.service; enabled; vendor preset: enabled) Drop-In: /etc/systemd/system/xray.service.d └─10-donot_touch_single_conf.conf Active: active (running) since Sun 2022-06-05 16:14:52 EDT; 7s ago Docs: https://github.com/xtls Main PID: 19121 (xray) Tasks: 9 (limit: 1147) Memory: 41.9M CGroup: /system.slice/xray.service └─19121 /usr/local/bin/xray run -config /usr/local/etc/xray/config.json
Jun 05 16:14:52 ubnt.cmdschool.org systemd[1]: Started Xray Service. Jun 05 16:14:52 ubnt.cmdschool.org xray[19121]: Xray 1.5.5 (Xray, Penetrates Everything.) Custom (go1.18.1 linux/amd64) Jun 05 16:14:52 ubnt.cmdschool.org xray[19121]: A unified platform for anti-censorship. Jun 05 16:14:52 ubnt.cmdschool.org xray[19121]: 2022/06/05 16:14:52 [Info] infra/conf/serial: Reading config: /usr/local/etc/xray/config.json
2) 你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。
家用透明代理无缝访问各个地区资源
3) 你看到的不正常的现象是什么?(请描述具体现象,比如访问超时,TLS 证书错误等)
CPU占用率长期接近满,CPU从1核心加到4核情况都复现 已经参照https://github.com/v2ray/v2ray-core/issues/2621 增加 iptables -t mangle -A V2RAY -j RETURN -m mark --mark 0xff CPU占用率依然居高不下
4) 你期待看到的正确表现是怎样的?
5) 请附上你的配置(提交 Issue 前请隐藏服务器端IP地址)。
服务器端配置:
客户端配置:
6) 请附上出错时软件输出的错误日志。在 Linux 中,日志通常在
/var/log/v2ray/error.log
文件中。服务器端错误日志:
7) 请附上访问日志。在 Linux 中,日志通常在
/var/log/v2ray/access.log
文件中。8) 其它相关的配置文件(如 Nginx)和相关日志。
Iptables
设置策略路由
ip rule add fwmark 1 table 100 ip route add local 0.0.0.0/0 dev lo table 100
代理局域网设备
iptables -t mangle -N V2RAY iptables -t mangle -A V2RAY -d 127.0.0.1/32 -j RETURN iptables -t mangle -A V2RAY -d 224.0.0.0/4 -j RETURN iptables -t mangle -A V2RAY -d 255.255.255.255/32 -j RETURN iptables -t mangle -A V2RAY -d -p tcp -j RETURN # 直连局域网,避免 V2Ray 无法启动时无法连网关的 SSH,如果你配置的是其他网段(如 10.x.x.x 等),则修改成自己的 iptables -t mangle -A V2RAY -d -p udp ! --dport 53 -j RETURN # 直连局域网,53 端口除外(因为要使用 V2Ray 的 iptables -t mangle -A V2RAY -p udp -j TPROXY --on-port --tproxy-mark 1 # 给 UDP 打标记 1,转发至 12345 端口 iptables -t mangle -A V2RAY -p tcp -j TPROXY --on-port --tproxy-mark 1 # 给 TCP 打标记 1,转发至 12345 端口 iptables -t mangle -A PREROUTING -j V2RAY # 应用规则