v2ray / discussion

For general discussion over Project V development and usage.
299 stars 34 forks source link

V2rayU 1.4.1 macOS Mojave 经常断流 同样的服务器 android ios 都正常使用 #442

Closed men9xuan closed 4 years ago

men9xuan commented 4 years ago

1) 你正在使用哪个版本的 V2Ray?(如果服务器和客户端使用了不同版本,请注明) V2rayU 1.4.1 mac 2) 你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。 V2rayU直接倒入 2333boy 的配置链接 看视频 fb 等 3) 你看到的不正常的现象是什么?(请描述具体现象,比如访问超时,TLS 证书错误等) 开始好用过一会几(十)分钟就无法链接 重启后正常 4) 你期待看到的正确表现是怎样的? 应该是mac 客户端自动导入的配置有问题 因为同样的小鸡配置 android ios 都没有断流的现象 希望大神帮忙看一下我的本地配置是不是有问题🙏 5) 请附上你的配置(提交 Issue 前请隐藏服务器端IP地址)。

服务器端配置:

    // 在这里附上服务器端配置文件
{
    "log": {
        "access": "/var/log/v2ray/access.log",
        "error": "/var/log/v2ray/error.log",
        "loglevel": "warning"
    },
    "inbounds": [
        {
            "port": 48061,
            "protocol": "vmess",
            "settings": {
                "clients": [
                    {
                        "id": "*******",
                        "level": 1,
                        "alterId": 233
                    }
                ]
            },
            "streamSettings": {
                "network": "ws"
            },
            "sniffing": {
                "enabled": true,
                "destOverride": [
                    "http",
                    "tls"
                ]
            }
        }
        //include_ss
        //include_socks
        //include_mtproto
        //include_in_config
        //
    ],
    "outbounds": [
        {
            "protocol": "freedom",
            "settings": {}
        },
        {
            "protocol": "blackhole",
            "settings": {},
            "tag": "blocked"
        },
        {
            "protocol": "freedom",
            "settings": {},
            "tag": "direct"
        },
        {
            "protocol": "mtproto",
            "settings": {},
            "tag": "tg-out"
        }
        //include_out_config
        //
    ],
    "dns": {
        "server": [
            "1.1.1.1",
            "1.0.0.1",
            "8.8.8.8",
            "8.8.4.4",
            "localhost"
        ]
    },
    "routing": {
        "domainStrategy": "IPOnDemand",
        "rules": [
            {
                "type": "field",
                "ip": [
                    "0.0.0.0/8",
                    "10.0.0.0/8",
                    "100.64.0.0/10",
                    "127.0.0.0/8",
                    "169.254.0.0/16",
                    "172.16.0.0/12",
                    "192.0.0.0/24",
                    "192.0.2.0/24",
                    "192.168.0.0/16",
                    "198.18.0.0/15",
                    "198.51.100.0/24",
                    "203.0.113.0/24",
                    "::1/128",
                    "fc00::/7",
                    "fe80::/10"
                ],
                "outboundTag": "blocked"
            },
            {
                "type": "field",
                "inboundTag": ["tg-in"],
                "outboundTag": "tg-out"
            }
            ,
            {
                "type": "field",
                "domain": [
                    "domain:epochtimes.com",
                    "domain:epochtimes.com.tw",
                    "domain:epochtimes.fr",
                    "domain:epochtimes.de",
                    "domain:epochtimes.jp",
                    "domain:epochtimes.ru",
                    "domain:epochtimes.co.il",
                    "domain:epochtimes.co.kr",
                    "domain:epochtimes-romania.com",
                    "domain:erabaru.net",
                    "domain:lagranepoca.com",
                    "domain:theepochtimes.com",
                    "domain:ntdtv.com",
                    "domain:ntd.tv",
                    "domain:ntdtv-dc.com",
                    "domain:ntdtv.com.tw",
                    "domain:minghui.org",
                    "domain:renminbao.com",
                    "domain:dafahao.com",
                    "domain:dongtaiwang.com",
                    "domain:falundafa.org",
                    "domain:wujieliulan.com",
                    "domain:ninecommentaries.com",
                    "domain:shenyun.com"
                ],
                "outboundTag": "blocked"
            }           ,
                {
                    "type": "field",
                    "protocol": [
                        "bittorrent"
                    ],
                    "outboundTag": "blocked"
                }
            //include_ban_ad
            //include_rules
            //
        ]
    },
    "transport": {
        "kcpSettings": {
            "uplinkCapacity": 100,
            "downlinkCapacity": 100,
            "congestion": true
        },
        "sockopt": {
            "tcpFastOpen": true
        }
    }
}

客户端配置:

    /{
  "log": {
    "error": "",
    "loglevel": "info",
    "access": ""
  },
  "inbounds": [
    {
      "listen": "127.0.0.1",
      "protocol": "socks",
      "settings": {
        "udp": false,
        "auth": "noauth",
        "timeout": 360
      },
      "port": "1080"
    },
    {
      "listen": "127.0.0.1",
      "protocol": "http",
      "settings": {
        "timeout": 360
      },
      "port": "1087"
    }
  ],
  "outbounds": [
    {
      "mux": {
        "enabled": false,
        "concurrency": 8
      },
      "protocol": "vmess",
      "streamSettings": {
        "wsSettings": {
          "path": "/",
          "headers": {
            "host": "***"
          }
        },
        "tlsSettings": {
          "allowInsecure": true
        },
        "security": "tls",
        "network": "ws"
      },
      "tag": "agentout",
      "settings": {
        "vnext": [
          {
            "address": "***",
            "users": [
              {
                "id": "*******",
                "alterId": 233,
                "level": 0,
                "security": "aes-128-gcm"
              }
            ],
            "port": 443
          }
        ]
      }
    },
    {
      "tag": "direct",
      "protocol": "freedom",
      "settings": {
        "domainStrategy": "AsIs",
        "userLevel": 0
      }
    },
    {
      "tag": "blockout",
      "protocol": "blackhole",
      "settings": {
        "response": {
          "type": "none"
        }
      }
    }
  ],
  "dns": {
    "servers": [
      "8.8.8.8"
    ]
  },
  "routing": {
    "strategy": "rules",
    "settings": {
      "domainStrategy": "IPIfNonMatch",
      "rules": [
        {
          "outboundTag": "direct",
          "type": "field",
          "ip": [
            "geoip:cn",
            "geoip:private"
          ],
          "domain": [
            "geosite:cn",
            "geosite:speedtest"
          ]
        }
      ]
    }
  }
}

6) 请附上出错时软件输出的错误日志。在 Linux 中,日志通常在 /var/log/v2ray/error.log 文件中。

服务器端错误日志: 昨天刚创建的时候有错误 今天无错误

    2019/11/23 19:58:01 [Warning] v2ray.com/core: V2Ray 4.21.3 started
2019/11/23 20:07:52 [Warning] v2ray.com/core/transport/internet/websocket: failed to serve http for WebSocket > accept tcp [::]:48061: use of closed network connection
2019/11/23 20:07:52 [Warning] v2ray.com/core: V2Ray 4.21.3 started
2019/11/23 23:17:29 [Warning] v2ray.com/core/transport/internet/websocket: failed to serve http for WebSocket > accept tcp [::]:48061: use of closed network connection
2019/11/23 23:17:29 [Warning] v2ray.com/core: V2Ray 4.21.3 started

客户端错误日志:

默认倒入的端口是1087 会报以下错误

    Failed to start v2ray.com/core/app/proxyman/inbound: failed to listen TCP on 1087 > v2ray.com/core/transport/internet: failed to listen on address: 127.0.0.1:1087 > listen tcp 127.0.0.1:1087: bind: address already in use

修改端口1082后 开始没有错误

V2Ray 4.21.3 (V2Fly, a community-driven edition of V2Ray.) Custom
A unified platform for anti-censorship.
2019/11/24 21:12:40 [Warning] v2ray.com/core: V2Ray 4.21.3 started

过了大概半个小时

2019/11/24 22:08:38 [Info] [745552294] v2ray.com/core/proxy/socks: TCP Connect request to tcp:imap.*****.com:993
2019/11/24 22:08:38 tcp:127.0.0.1:57431 accepted tcp:imap.*****.com:993 [agentout] 
2019/11/24 22:08:38 [Info] [745552294] v2ray.com/core/app/dispatcher: default route for tcp:imap.*****.com:993
2019/11/24 22:08:38 [Info] [745552294] v2ray.com/core/transport/internet/websocket: creating connection to tcp:****.****:443
2019/11/24 22:08:42 [Info] [3018187034] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/socks: connection ends > context canceled
2019/11/24 22:08:42 [Info] [3018187034] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/vmess/outbound: connection ends > context canceled
2019/11/24 22:08:43 [Info] [745552294] v2ray.com/core/proxy/vmess/outbound: tunneling request to tcp:imap.*****.com:993 via tcp:****.****:443
2019/11/24 22:10:20 [Info] [128713329] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/vmess/outbound: connection ends > websocket: close 1006 (abnormal closure): unexpected EOF
2019/11/24 22:10:20 [Info] [128713329] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/socks: connection ends > v2ray.com/core/proxy/socks: failed to transport all TCP response > io: read/write on closed pipe
2019/11/24 22:13:42 [Info] [3550216937] v2ray.com/core/proxy/socks: TCP Connect request to tcp:imap.*****.com:993
2019/11/24 22:13:42 [Info] [3550216937] v2ray.com/core/app/dispatcher: default route for tcp:imap.*****.com:993
2019/11/24 22:13:42 [Info] [3550216937] v2ray.com/core/transport/internet/websocket: creating connection to tcp:****.****:443
2019/11/24 22:13:42 tcp:127.0.0.1:57611 accepted tcp:imap.*****.com:993 [agentout] 
2019/11/24 22:13:42 [Info] [94844667] v2ray.com/core/proxy/socks: TCP Connect request to tcp:p58-imap.mail.*******:993
2019/11/24 22:13:42 [Info] [94844667] v2ray.com/core/app/dispatcher: default route for tcp:p58-imap.mail.*******:993
2019/11/24 22:13:42 tcp:127.0.0.1:57612 accepted tcp:p58-imap.mail.*******:993 [agentout] 
2019/11/24 22:13:42 [Info] [94844667] v2ray.com/core/transport/internet/websocket: creating connection to tcp:****.****:443
2019/11/24 22:13:42 [Info] [94844667] v2ray.com/core/proxy/vmess/outbound: tunneling request to tcp:p58-imap.mail.*******:993 via tcp:****.****:443
2019/11/24 22:13:43 [Info] [3550216937] v2ray.com/core/proxy/vmess/outbound: tunneling request to tcp:imap.*****.com:993 via tcp:****.****:443
2019/11/24 22:13:45 [Info] [3679251793] v2ray.com/core/proxy/socks: TCP Connect request to tcp:imap.*****.com:993
2019/11/24 22:13:45 [Info] [3679251793] v2ray.com/core/app/dispatcher: default route for tcp:imap.*****.com:993
2019/11/24 22:13:45 [Info] [3679251793] v2ray.com/core/transport/internet/websocket: creating connection to tcp:****.****:443
2019/11/24 22:13:45 tcp:127.0.0.1:57633 accepted tcp:imap.*****.com:993 [agentout] 
2019/11/24 22:13:46 [Info] [3679251793] v2ray.com/core/proxy/vmess/outbound: tunneling request to tcp:imap.*****.com:993 via tcp:****.****:443
2019/11/24 22:15:25 [Info] [94844667] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/vmess/outbound: connection ends > websocket: close 1006 (abnormal closure): unexpected EOF
2019/11/24 22:15:25 [Info] [94844667] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/socks: connection ends > v2ray.com/core/proxy/socks: failed to transport all TCP response > io: read/write on closed pipe
2019/11/24 22:15:28 [Info] [3550216937] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/vmess/outbound: connection ends > websocket: close 1006 (abnormal closure): unexpected EOF
2019/11/24 22:15:28 [Info] [3550216937] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/socks: connection ends > v2ray.com/core/proxy/socks: failed to transport all TCP response > io: read/write on closed pipe
2019/11/24 22:18:43 [Info] [2888799135] v2ray.com/core/proxy/socks: TCP Connect request to tcp:p58-imap.mail.*******:993
2019/11/24 22:18:43 tcp:127.0.0.1:57845 accepted tcp:p58-imap.mail.*******:993 [agentout] 
2019/11/24 22:18:43 [Info] [2888799135] v2ray.com/core/app/dispatcher: default route for tcp:p58-imap.mail.*******:993
2019/11/24 22:18:43 [Info] [2888799135] v2ray.com/core/transport/internet/websocket: creating connection to tcp:****.****:443
2019/11/24 22:18:43 [Info] [2619971011] v2ray.com/core/proxy/socks: TCP Connect request to tcp:p58-imap.mail.*******:993
2019/11/24 22:18:43 [Info] [2619971011] v2ray.com/core/app/dispatcher: default route for tcp:p58-imap.mail.*******:993
2019/11/24 22:18:43 tcp:127.0.0.1:57847 accepted tcp:p58-imap.mail.*******:993 [agentout] 
2019/11/24 22:18:43 [Info] [2619971011] v2ray.com/core/transport/internet/websocket: creating connection to tcp:****.****:443
2019/11/24 22:18:43 [Info] [748173690] v2ray.com/core/proxy/socks: TCP Connect request to tcp:imap.*****.com:993
2019/11/24 22:18:43 [Info] [748173690] v2ray.com/core/app/dispatcher: default route for tcp:imap.*****.com:993
2019/11/24 22:18:43 [Info] [748173690] v2ray.com/core/transport/internet/websocket: creating connection to tcp:****.****:443
2019/11/24 22:18:43 tcp:127.0.0.1:57848 accepted tcp:imap.*****.com:993 [agentout] 
2019/11/24 22:18:44 [Info] [748173690] v2ray.com/core/proxy/vmess/outbound: tunneling request to tcp:imap.*****.com:993 via tcp:****.****:443
2019/11/24 22:18:45 [Info] [2619971011] v2ray.com/core/proxy/vmess/outbound: tunneling request to tcp:p58-imap.mail.*******:993 via tcp:****.****:443
2019/11/24 22:18:45 [Info] [2888799135] v2ray.com/core/proxy/vmess/outbound: tunneling request to tcp:p58-imap.mail.*******:993 via tcp:****.****:443
2019/11/24 22:18:46 [Info] [3143068138] v2ray.com/core/proxy/socks: TCP Connect request to tcp:imap.*****.com:993
2019/11/24 22:18:46 [Info] [3143068138] v2ray.com/core/app/dispatcher: default route for tcp:imap.*****.com:993
2019/11/24 22:18:46 [Info] [3143068138] v2ray.com/core/transport/internet/websocket: creating connection to tcp:****.****:443
2019/11/24 22:18:46 tcp:127.0.0.1:57866 accepted tcp:imap.*****.com:993 [agentout] 
2019/11/24 22:18:46 [Info] [3143068138] v2ray.com/core/proxy/vmess/outbound: tunneling request to tcp:imap.*****.com:993 via tcp:****.****:443
2019/11/24 22:18:48 [Info] [2888799135] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/socks: connection ends > context canceled
2019/11/24 22:18:48 [Info] [2888799135] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/vmess/outbound: connection ends > context canceled
2019/11/24 22:20:27 [Info] [748173690] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/vmess/outbound: connection ends > websocket: close 1006 (abnormal closure): unexpected EOF
2019/11/24 22:20:27 [Info] [748173690] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/socks: connection ends > v2ray.com/core/proxy/socks: failed to transport all TCP response > io: read/write on closed pipe
2019/11/24 22:20:30 [Info] [2619971011] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/vmess/outbound: connection ends > websocket: close 1006 (abnormal closure): unexpected EOF
2019/11/24 22:20:30 [Info] [2619971011] v2ray.com/core/app/proxyman/inbound: connection ends > v2ray.com/core/proxy/socks: connection ends > v2ray.com/core/proxy/socks: failed to transport all TCP response > io: read/write on closed pipe

7) 请附上访问日志。在 Linux 中,日志通常在 /var/log/v2ray/access.log 文件中。

    // 有点长 暂时先不放了 都是我访问的网站信息

8) 其它相关的配置文件(如 Nginx)和相关日志。

9) 如果 V2Ray 无法启动,请附上 --test 输出。

通常的命令为 /usr/bin/v2ray/v2ray --test --config /etc/v2ray/config.json。请按实际情况修改。

10) 如果 V2Ray 服务运行不正常,请附上 journal 日志。

通常的命令为 journalctl -u v2ray

请预览一下你填的内容再提交。

github-actions[bot] commented 4 years ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days

furacas commented 2 years ago

同,相同的服务器,ios上面的客户端访问正常,但是mac 频繁断流

furacas commented 2 years ago

mac断流期间,ios访问正常