mack-a / v2ray-agent

Xray、Tuic、hysteria2、sing-box 八合一一键脚本
https://www.592083.xyz
GNU Affero General Public License v3.0
14.15k stars 4.6k forks source link

Hysteria2 分流问题 #851

Closed dogpem closed 11 months ago

dogpem commented 11 months ago

不按照模版提交,一律关闭,反馈之前请仔细阅读脚本异常处理客户端使用教程、建议使用20卸载后重新尝试

1.问题描述

安装 Hysteria 后使用11.分流工具中的 wrap 分流,会使 Hysteria 全局走warp

2.安装失败的log或者截图

sing-box config

{
  "inbounds": [
    {
      "type": "hysteria2",
      "listen": "::",
      "listen_port": 8432,
      "up_mbps": 500,
      "down_mbps": 50,
      "users": [
        {
          "name": "tg-singbox_hysteria2",
          "password": "53b6c1a3-cbaa-4"
        }
      ],
      "tls": {
        "enabled": true,
        "server_name": "domain.com",
        "alpn": "h3",
        "certificate": [
          "-----BEGIN CERTIFICATE-----",
          "MIIE8jCCA9qgAwIBAgISBLAC1vfK8tqGe1obUZud/aFRMA0GCSqGSIb3DQEBCwUA",
          "MDIxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MQswCQYDVQQD",
          "EwJSMzAeFw0yMzEwMjkxNjQ1NTFaFw0yNDAxMjcxNjQ1NTBaMBcxFTATBgNVBAMM",
          "DCouaXBjYXQudGVjaDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKKz",
          "C6AtJpHS3KBsWo2Cr8DJdElpCb8RF4MiTcvp9ZT3Zl8ip3bg4aru8XOS2gbaukVn",
          "-----END CERTIFICATE-----"
        ],
        "certificate_path": "/etc/v2ray-agent/tls/domain.com.crt",
        "key": [
          "-----BEGIN RSA PRIVATE KEY-----",
          "MIIEowIBAAKCAQEAorMLoC0mkdLcoGxajYKvwMl0SWkJvxEXgyJNy+n1lPdmXyKn",
          "duDhqu7xc5LaBtq6RWd3KqkqrhMh0m+RclpRcNhhF/GIDU/pm/n/BF+Xzel/bMgE",
          "xk+nHME29PbICfu7ip3GoFE3w8LNymfduksAREPlbdgXBsAhtza5gJ/vBcFXObkQ",

          "-----END RSA PRIVATE KEY-----"
        ],
        "key_path": "/etc/v2ray-agent/tls/domain.com.key"
      }
    }
  ],
  "outbounds": [
    {
      "type": "direct",
      "tag": "wireguard_out_IPv4",
      "detour": "wireguard_out",
      "domain_strategy": "ipv4_only"
    },
    {
      "type": "wireguard",
      "tag": "wireguard_out",
      "local_address": [
        "172.16.0.2/32",
        "2606:4700:110:8dc9:6aba:31d4:ff2b:7f82/128"
      ],
      "private_key": "xxxxCbtCIr4tLik4=",
      "server": "162.xxx.192.1",
      "server_port": 2408,
      "peer_public_key": "bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=",
      "reserved": "o6N8",
      "mtu": 1280
    }
  ],
  "route": {
    "geosite": {
      "path": "/etc/v2ray-agent/sing-box/conf/geosite.db"
    },
    "rules": [
      {
        "domain": "ip.gs",
        "outbound": "wireguard_out_IPv4"
      }
    ]
  }
}

3.系统版本

Debian 11

4.脚本版本

v2.11.21

Jun-gle commented 11 months ago

解决了么?hy2同样的问题。

mack-a commented 11 months ago

你们的版本都是170吗

Jun-gle commented 11 months ago

最新版,我分流了openai,但是谷歌跳验证才发现,vmess就没有这个问题。

dogpem commented 11 months ago

你们的版本都是170吗

sing-box版本:v1.7.0

mack-a commented 11 months ago

https://github.com/mack-a/v2ray-agent/releases/tag/v2.11.22

dogpem commented 11 months ago

现在Hysteria2 的warp的分流无效了,即使设置了分流,所有流量也会直连 复现步骤:

  1. 卸载重新安装v2ray-agent
  2. 安装Hyteria 2
  3. 选择 11.分流工具 > 1.WARP分流 > 2.添加域名>安装warp-reg - y > 请按照上面示例录入域名:ip.sb > ---> 添加成功 ---> Xray关闭成功 ---> Xray启动成功 ---> sing-box关闭成功 ---> sing-box启动成功
  4. 查看IP image

Sing-Box Config

 "outbounds": [
    {
      "type": "direct",
      "tag": "direct"
    },
    {
      "type": "direct",
      "tag": "wireguard_out_IPv4",
      "detour": "wireguard_out",
      "domain_strategy": "ipv4_only"
    },
    {
      "type": "wireguard",
      "tag": "wireguard_out",
      "local_address": [
        "172.16.0.2/32",
        "2606:4700:110:8535:788c:3bc4:6287:5063/128"
      ],
      "private_key": "xxx",
      "server": "162.159.192.1",
      "server_port": 2408,
      "peer_public_key": "bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=",
      "reserved": "3woB",
      "mtu": 1280
    }
  ],
  "route": {
    "geosite": {
      "path": "/etc/v2ray-agent/sing-box/conf/geosite.db"
    },
    "rules": [
      {
        "domain": [
          "ip.gs",
          "ip.sb"
        ],
        "outbound": "wireguard_out_IPv4"
      }
    ]
  }
}
dogpem commented 11 months ago

https://github.com/mack-a/v2ray-agent/issues/851#issuecomment-1836629135

现在warp的分流对于Hysteria2 似乎无效了。 复现步骤:

  1. 卸载重新安装v2ray-agent
  2. 安装Hyteria 2
  3. 选择 11.分流工具 > 1.WARP分流 > 2.添加域名>安装warp-reg - y > 请按照上面示例录入域名:ip.sb > ---> 添加成功 ---> Xray关闭成功 ---> Xray启动成功 ---> sing-box关闭成功 ---> sing-box启动成功
  4. 查看IP image

Sing-Box Config

 "outbounds": [
    {
      "type": "direct",
      "tag": "direct"
    },
    {
      "type": "direct",
      "tag": "wireguard_out_IPv4",
      "detour": "wireguard_out",
      "domain_strategy": "ipv4_only"
    },
    {
      "type": "wireguard",
      "tag": "wireguard_out",
      "local_address": [
        "172.16.0.2/32",
        "2606:4700:110:8535:788c:3bc4:6287:5063/128"
      ],
      "private_key": "xxx",
      "server": "162.159.192.1",
      "server_port": 2408,
      "peer_public_key": "bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=",
      "reserved": "3woB",
      "mtu": 1280
    }
  ],
  "route": {
    "geosite": {
      "path": "/etc/v2ray-agent/sing-box/conf/geosite.db"
    },
    "rules": [
      {
        "domain": [
          "ip.gs",
          "ip.sb"
        ],
        "outbound": "wireguard_out_IPv4"
      }
    ]
  }
}

似乎还是route的问题? 我尝试使用一个本地sock代替 wireguard 的出站,也无法做到分流。