首页
Search
1
v2ray异常错误之二
3,310 阅读
2
linux时区设置
2,698 阅读
3
DB2常用操作
2,173 阅读
4
websphere修改jvm内存xmx和xms
1,929 阅读
5
nfs客户端文件属主为nobody的现象
1,552 阅读
技术
生活
运动
游戏
电影
登录
Search
标签搜索
docker
linux
troubleshooting
nginx
secure
truenas
mysql
windows
python
esxi
docker swarm
oracle
zabbix
tomcat
blog
dsm
群晖
rpa
freenas
db
yuc
累计撰写
291
篇文章
累计收到
0
条评论
首页
栏目
技术
生活
运动
游戏
电影
页面
搜索到
3
篇与
的结果
2024-03-12
v2ray错误之close 1000 (normal)以及域名解析问题
异常错误 在宽带更新后的一段时间内,一直都没有访问 NAS 的 v2ray,不确定好坏,今天终于访问测试了下,避免 emby 无法刮削电影元数据。但通过 curl 在本地测试发现确实无法访问,报错如下: yuc@ootoo:/volume1/SSD/v2ray$ curl -v --ipv4 --tlsv1.2 --insecure --socks5 127.0.0.1:1086 https://www.google.com * TLSv1.3 (OUT), TLS handshake, Client hello (1): * OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to google.com:443 curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to google.com:443 虽然没有使用图形化测试浏览器能否访问,但是这个报错基本上可以确定是不行的,于是分别上本地代理和服务器检查了下日志. 本地日志 2024/03/12 07:07:35 [Info] [1293472766] proxy/socks: TCP Connect request to tcp:[2a03:2880:f12d:83:face:b00c:0:25de]:443 2024/03/12 07:07:35 [Info] [1293472766] app/dispatcher: taking detour [68] for [tcp:[2a03:2880:f12d:83:face:b00c:0:25de]:443] 2024/03/12 07:07:35 [Info] [1293472766] transport/internet/websocket: creating connection to tcp:43.154.178.97:443 2024/03/12 07:07:35 [Info] [1293472766] transport/internet: dialing to tcp:43.154.178.97:443 via 0.0.0.0 2024/03/12 07:07:36 [Info] [1293472766] proxy/vmess/outbound: tunneling request to tcp:[2a03:2880:f12d:83:face:b00c:0:25de]:443 via 43.154.178.97:443 2024/03/12 07:07:52 [Info] [1293472766] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: connection ends > websocket: close 1000 (normal) 2024/03/12 07:07:52 [Info] [1293472766] app/proxyman/inbound: connection ends > proxy/socks: connection ends > proxy/socks: failed to transport all TCP response > io: read/write on closed pipe 服务端日志 2024/03/12 13:10:18 [Info] [659351786] app/proxyman/inbound: connection ends > proxy/vmess/inbound: connection ends > proxy/vmess/inbound: failed to transfer request > websocket: close 1006 (abnormal closure): unexpected EOF 这里因为测试比较多,都基本上是这个错误,只是时间复制的不同。从本地日志和服务端日志基本上没有看到明显的错误,但日志内可以看到时区显示不同,怀疑是时区问题,不过在设置时区后仍然相同错误没有解决 苦闷的排查 接下来分别测试了 baidu.com , facebook.com , x.com , google.com 发现只有 baidu 和 x 是正常的,另外两个存在一样的错误,通过本地日志观察到,当报错的时候整个流程使用的 ipv6 地址,而另外两个则是 ipv4 ,目前基本上可以确定是 ipv6 有影响。结合升级带宽以及设备支持 ipv6 这也是说的通的 那么接下来最重要的是如何解决这个问题。接下来检索了非常多的文档,关于 v2ray 如何关闭 ipv6 的解析,包括在配置中使用 "domainStrategy": "UseIPv4" 以及在 代理端和服务端 使用 net.ipv6.conf.all.disable_ipv6 = 1 禁用 ipv6,但是发现毫无效果,本地日志仍然使用 ipv6 于是我尝试在服务端使用ipv6地址测试能否访问,结果不行,如下: [root@VM-8-11-centos v2ray]# curl google.com -6 curl: (7) Failed to connect to 2404:6800:4005:808::200e: Network is unreachable 那么基本上可以确定整个流程最终无法访问的现象,代理端拿到了 ipv6 地址(通过解析),然后请求给 服务端,服务端通过此地址去访问,但是服务端本身不支持ipv6,导致根本无法访问,最终出现这个错误 根据现状,解析到了 ipv6 地址,但是服务端不支持,所以双栈同时运行的想法是行不通的,那就只能想办法关闭 解析到 ipv6 last 最后把以前部署过正常的配置文件拿过来使用。问题比较奇怪暂时还没有理解 v2ray 的 dns 是如何解析到 ipv6 地址的。后续再研究新旧配置的区别吧
2024年03月12日
8 阅读
0 评论
0 点赞
2023-08-04
v2ray/v2fly的安装使用以及加速
0x0 重点如下: 系统推荐 centos7.9 安装bbr魔改版加速(bbr和锐速lotserver二选一,推荐bbr) wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh 选择安装bbr/bbr魔改版,安装后重启 重启后仍然执行脚本 ./tcp.sh 选择使用bbr魔改版,之后下面会提示已经安装bbr和开启bbr加速模块则成功,或者可以使用以下命令确认 # 结果返回 tsunami 或 bbr sysctl net.core.default_qdisc # 结果返回 fq sysctl net.ipv4.tcp_available_congestion_control 安装v2ray curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh > install-release.sh # 默认安装最新版,可以指定版本 ./install-release.sh --version v5.1.0 v2ray配置参考 /usr/local/etc/v2ray/config.json { "log": { "loglevel": "info", "access": "/var/log/v2ray/access.log", "error": "/var/log/v2ray/error.log" }, "inbounds": [ { "port": 10000, "listen":"127.0.0.1",//只监听 127.0.0.1,避免除本机外的机器探测到开放了 10000 端口 "protocol": "vmess", "settings": { "clients": [ { "id": "7ec9de15-4147-4121-848b-1fcbb7fc5624", "alterId": 0 } ] }, "streamSettings": { "network": "ws", "wsSettings": { "path": "/xxx" } } } ], "outbounds": [ { "protocol": "freedom", "settings": {} } ] } 如果是安装较高的版本,可能提示系统版本太低,可以选择升级到较高版本 安装nginx,安装过程略,配置如下 server { listen 443 ssl; ssl_certificate /opt/domain.crt; ssl_certificate_key /opt/domainname.key; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers HIGH:!aNULL:!MD5; server_name fd.xxx.com; #与 V2Ray 配置中的 path 保持一致 location /xxx { proxy_redirect off; #假设WebSocket监听在环回地址的10000端口上 proxy_pass http://127.0.0.1:10000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } }
2023年08月04日
2 阅读
0 评论
0 点赞
2022-05-27
v2ray异常错误之二
无法连接之异常 机器过期忘记续费停机了一天,但续费后v2ray死活连不上,有如下报错 服务端: 2022/05/27 02:17:28 [Info] [50130167] app/proxyman/inbound: connection ends > proxy/vmess/inbound: invalid request from 58.48.189.174:0 > proxy/vmess/encoding: connection drained DrainSize = 1589 23 2 > proxy/vmess/encoding: invalid user: VMessAEAD is enforced and a non VMessAEAD connection is received. You can still disable this security feature with environment variable v2ray.vmess.aead.forced = false . You will not be able to enable legacy header workaround in the future. 2022/05/27 02:17:29 [Info] [2512890072] app/proxyman/inbound: connection ends > proxy/vmess/inbound: invalid request from 58.48.189.174:0 > proxy/vmess/encoding: connection drained DrainSize = 1589 23 20 > proxy/vmess/encoding: invalid user: VMessAEAD is enforced and a non VMessAEAD connection is received. You can still disable this security feature with environment variable v2ray.vmess.aead.forced = false . You will not be able to enable legacy header workaround in the future. 客户端 May 27 14:16:37 localhost v2ray: 2022/05/27 14:16:37 [Info] failed to handler mux client connection > v2ray.com/core/proxy/vmess/outbound: connection ends > v2ray.com/core/proxy/vmess/outbound: failed to read header > v2ray.com/core/proxy/vmess/encoding: failed to read response header > websocket: close 1000 (normal) May 27 14:16:37 localhost v2ray: 2022/05/27 14:16:37 [Info] v2ray.com/core/common/mux: failed to read metadata > io: read/write on closed pipe May 27 14:16:37 localhost v2ray: 2022/05/27 14:16:37 [Info] [924485881] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/socks: connection ends > context canceled 排查了客户端和服务端时间同步问题,再就是配置也没有动,突然就连不上了确实很奇怪。查了下资料按照如下方法解决: 1.执行 systemctl status v2ray 命令 2.若步骤1正常输出v2ray的信息 ,观察Drop-In:后面的路径 ,如: Drop-In: /etc/systemd/system/v2ray.service.d 3.进入上述路径 cd /etc/systemd/system/v2ray.service.d 4.执行 ls 命令看是否有一个 .conf后缀的文件,如 10-donot_touch_single_conf.conf 5.vim 修改这个文件: vim 10-donot_touch_single_conf.conf 6. 在[service]下添加一行信息: Environment="V2RAY_VMESS_AEAD_FORCED=false" 7. 文件修改保存后,再执行 systemctl daemon-reload 8. 执行 systemctl restart v2ray
2022年05月27日
3,310 阅读
0 评论
0 点赞