Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2ray域名无法正常解析(怀疑配置文件错了) #64

Closed
greenhandzdl opened this issue Aug 16, 2024 · 6 comments
Closed

v2ray域名无法正常解析(怀疑配置文件错了) #64

greenhandzdl opened this issue Aug 16, 2024 · 6 comments

Comments

@greenhandzdl
Copy link

greenhandzdl commented Aug 16, 2024

v2ray配置(v2fly导出):

{
  "dns": {
    "hosts": {
      "domain:googleapis.cn": "googleapis.com"
    },
    "servers": [
      "1.1.1.1"
    ]
  },
  "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"
    }
  ],
  "log": {
    "loglevel": "warning"
  },
  "outbounds": [
    {
      "mux": {
        "concurrency": 8,
        "enabled": false
      },
      "protocol": "vless",
      "settings": {
        "vnext": [
          {
            "address": "",
            "port": 443,
            "users": [
              {
                "encryption": "none",
                "flow": "",
                "id": "",
                "level": 8,
                "security": "auto"
              }
            ]
          }
        ]
      },
      "streamSettings": {
        "network": "ws",
        "security": "tls",
        "tlsSettings": {
          "allowInsecure": false,
          "serverName": ""
        },
        "wsSettings": {
          "headers": {
            "Host": ""
          },
          "path": "/?ed=2048"
        }
      },
      "tag": "proxy"
    },
    {
      "protocol": "freedom",
      "settings": {},
      "tag": "direct"
    },
    {
      "protocol": "blackhole",
      "settings": {
        "response": {
          "type": "http"
        }
      },
      "tag": "block"
    }
  ],
  "policy": {
    "levels": {
      "8": {
        "connIdle": 300,
        "downlinkOnly": 1,
        "handshake": 4,
        "uplinkOnly": 1
      }
    },
    "system": {
      "statsOutboundUplink": true,
      "statsOutboundDownlink": true
    }
  },
  "routing": {
    "domainMatcher": "mph",
    "domainStrategy": "IPIfNonMatch",
    "rules": [
      {
        "ip": [
          "1.1.1.1"
        ],
        "outboundTag": "proxy",
        "port": "53",
        "type": "field"
      }
    ]
  },
  "stats": {}
}

box4magisk配置:

#!/system/bin/sh

bin_name="v2ray"

redir_port="7891"
tproxy_port="1536"
clash_dns_port="1053"
clash_dns_listen="0.0.0.0:${clash_dns_port}"
fake_ip_range_v4="198.18.0.0/15"
fake_ip_range_v6="fc00::/18"
tun_device="tun0"

box_user_group="root:net_admin"
# If you want to change the user or group, you must make the Box core in the /system/bin directory, otherwise the changes will not take effect.
# If you are using Magisk, you can copy the Box core files (sing-box, clash, etc.) to /data/adb/modules/bin_files/system/bin/ and reboot the phone
bin_name_list=("sing-box" "clash" "mihomo" "xray" "v2ray" "hysteria")
box_path="/data/adb/box"
bin_path="${box_path}/bin/${bin_name}"
run_path="${box_path}/run"
pid_file="${run_path}/${bin_name}.pid"


intranet=(0.0.0.0/8 10.0.0.0/8 100.0.0.0/8 127.0.0.0/8 169.254.0.0/16 192.0.0.0/24 192.0.2.0/24 192.88.99.0/24 192.168.0.0/16 198.51.100.0/24 203.0.113.0/24 224.0.0.0/4 240.0.0.0/4 255.255.255.255/32)
# The use of 100.0.0.0/8 instead of 100.64.0.0/10 is purely due to a mistake by China Telecom's service provider, and you can change it back.
intranet6=(::/128 ::1/128 ::ffff:0:0/96 100::/64 64:ff9b::/96 2001::/32 2001:10::/28 2001:20::/28 2001:db8::/32 2002::/16 fe80::/10 ff00::/8)

ipv6="disable"

proxy_method="TPROXY"
# REDIRECT: TCP only / TPROXY: TCP + UDP / MIXED: REDIRECT TCP + TUN UDP

proxy_mode="blacklist"
# blacklist / whitelist / core
user_packages_list=()
# Android User:Package Name, For example:
# user_packages_list=("0:com.android.captiveportallogin" "10:com.tencent.mm")

gid_list=()
# The gid in the list will be bypassed or proxied according to the proxy_mode configuration, and the gid can be arbitrarily specified by the busybox setuidgid command

ap_list=("wlan+" "ap+" "rndis+")
ignore_out_list=()


是哪里写错了吗

@greenhandzdl greenhandzdl changed the title v2ray域名无法正常解析 v2ray域名无法正常解析(怀疑配置文件错了) Aug 16, 2024
@CHIZI-0618
Copy link
Owner

v2ray 导出的文件你并没有添加 tproxy 入站,请自行查看 v2fly 文档。

@greenhandzdl
Copy link
Author

参考这里的配置吗?
我只需要加上这个?

 "streamSettings": {
        "sockopt": {
          "tproxy": "tproxy", // 透明代理使用 TPROXY 方式
          "mark":255
        }
      }
    },

@CHIZI-0618
Copy link
Owner

不需要 mark

@CHIZI-0618
Copy link
Owner

且需要仔细配置 DNS 模块,预防 鸡蛋 问题

@greenhandzdl
Copy link
Author

很疑惑的是加上了tproxy,还是用不了,大佬能给一份v2ray全局代理的配置文件吗?(我是vless)

@CHIZI-0618 CHIZI-0618 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 17, 2024
@greenhandzdl
Copy link
Author

好吧,看起来我并不是这个模块的面向用户,感谢大佬的帮助。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants