EbrahimTahernejad / Tun2SocksKit

Tun2Socks Solution for Apple Devices
64 stars 42 forks source link

v2ray未能成功转发 #24

Open dhp5 opened 12 hours ago

dhp5 commented 12 hours ago

我的Tun2socks连接成功了。但是转发到v2ray服务器。解析出来的 全是EOF。请问这是什么问题呀?这是我服务端解析到的日志

[Info] common/mux: failed to read metadata > io: read/write on closed pipe [Info] common/mux: failed to read metadata > io: read/write on closed pipe [Info] [3411192088] transport/internet/udp: failed to handle UDP input > EOF [Info] common/mux: failed to read metadata > io: read/write on closed pipe [Info] [4159722323] transport/internet/udp: failed to handle UDP input > EOF [Info] [1537859122] transport/internet/udp: failed to handle UDP input > EOF

这是我的配置:

   tunnel:
        mtu: 8500

    socks5:
        port: 10808
        address: 127.0.0.1
        udp: 'udp'

    misc:
        task-stack-size: 81920
        connect-timeout: 5000
        read-write-timeout: 60000
        log-file: stderr
        log-level: debug
        limit-nofile: 65535
func getNetworkSettings(with mtu: Int) -> NEPacketTunnelNetworkSettings {
        let settings = NEPacketTunnelNetworkSettings(tunnelRemoteAddress: "254.1.1.1")
        settings.mtu = NSNumber(integerLiteral: mtu)
        settings.ipv4Settings = {
            let settings = NEIPv4Settings(addresses: ["198.18.0.1"], subnetMasks: ["255.255.255.0"])
            settings.includedRoutes = [NEIPv4Route.default()]
            return settings
        }()
        settings.ipv6Settings = {
            let settings = NEIPv6Settings(addresses: ["da26:2626::1"], networkPrefixLengths: [126])
            settings.includedRoutes = [NEIPv6Route.default()]
            return settings
        }()

        settings.dnsSettings = NEDNSSettings(servers: ["1.1.1.1", "8.8.8.8"])
        return settings
    }
dhp5 commented 12 hours ago

V2ray的日志。非常感谢

[Warning] failed to handler mux client connection > proxy/shadowsocks: failed to find an available destination > common/retry: [fail to protect] > common/retry: all retry attempts failed
[Info] common/mux: failed to read metadata > io: read/write on closed pipe
[Info] [1352113521] transport/internet/udp: failed to handle UDP input > EOF
[Warning] failed to handler mux client connection > proxy/shadowsocks: failed to find an available destination > common/retry: [fail to protect] > common/retry: all retry attempts failed
[Info] common/mux: failed to read metadata > io: read/write on closed pipe
[Warning] failed to handler mux client connection > proxy/shadowsocks: failed to find an available destination > common/retry: [fail to protect] > common/retry: all retry attempts failed
[Info] common/mux: failed to read metadata > io: read/write on closed pipe
[Info] [2274812711] transport/internet/udp: failed to handle UDP input > EOF
[Info] [2538165771] transport/internet/udp: failed to handle UDP input > EOF
[Info] [292530728] proxy/socks: client UDP connection from udp:127.0.0.1:51778
[Info] transport/internet/udp: establishing new connection for udp:8.8.8.8:53
[Warning] [292530728] app/dispatcher: default route for udp:8.8.8.8:53
[Info] [292530728] common/mux: dispatching request to udp:8.8.8.8:53
udp:127.0.0.1:51778 accepted udp:8.8.8.8:53 [proxy]
dhp5 commented 11 hours ago

大佬有时间的话,麻烦帮我看一下。谢谢

"inbounds": [
    {
      "listen": "127.0.0.1",
      "port": 10808,
      "protocol": "socks",
      "settings": {
        "auth": "noauth",
        "udp": true,
        "userLevel": 8
      },
      "sniffing": {
        "destOverride": [
          "http",
          "tls"
        ],
        "enabled": true
      },
      "tag": "socks"
    },
    {
      "listen": "127.0.0.1",
      "port": 10809,
      "protocol": "http",
      "settings": {
        "userLevel": 8
      },
      "tag": "http"
    }
  ]