How to prevent DNS leak using Xray-Reality-Vision?

I’ve created my server using Xray-Reality-Vision but I realized that it is leaking my DNS using the ipleak.net test. How can I stop it from DNS leaking?

What I’ve tried:

  • Add 1.1.1.1 and 8.8.8.8 in xray config.json dns list.
  • Use bypasscn_private_apple routing in V2RayXS.

But the problem still persists.

Also extra question for those who could help: How can I access to ChatGPT using Xray? The page cannot load due to VPN detection.

Information on my setup:

VPS: Google Cloud Platform VM

OS: MacOS

Xray GUI: V2RayXS

Config generated with reality-ezpz one-click script.

Hey it’s you again!

  1. Regarding the dns leak: it could be because your internal macOS system could be using its own dns resolver instead of handling dns requests through your V2Ray. When you run ipleak.net do your ISPs dns show up?

  2. ChatGPT should not block you on the sole reason you are using a VPN.
    Chances are, you set up a Google cloud VM in Hong Kong. ChatGPT does not allow users from China/Hong Kong IP addresses to use its service, and the great firewall also bans ChatGPT domains within mainland china anyway. You might want to spin up a VM in Tokyo to work around this

I am log in to my instance and I’m changing my VM dns.
It is solved the problem for me.
The problem is Vless with Reality TCP with TUN(VPN Mode) in my pc.
So I changed my vps dns.

Hey! Yep it’s me again :sweat_smile: Thank you for answering again!

When I run ipleak.net it does indeed show both of my ISP in different locations. I also tried to add 1.1.1.1 and 8.8.8.8 in my MacOS network configuration but it still gives the same result…

As for chatGPT, I can use it without loading my xray-core to my VPS, but shows “Unable to load site” “If you are using a VPN, try to turn it off” as soon as I enable it. I’m not in China yet.

Is your dns being routed through the vps or are some of your dns requests being leaked, or none of your dns requests are going through the vps

Also, it’s normal that ChatGPT doesn’t load through your vpn because your vps ip is in Hong Kong which ChatGPT blocks because they don’t serve the Chinese market. Other gcp locations like Tokyo and Singapore don’t see the same issue.

Thanks, I just changed my server address to Tokyo and ChatGPT works now.
As for the DNS, how can I make sure that everything is routed through my VPS? It seems is indeed leaking DNS requests right now.

That’s great! Recommend you keep both servers up for greater reliability since based on itdog.cn tests, Hong Kong servers has much better ping time and performance than Tokyo ones.

As for DNS: which browser are you using? Were you using chrome to test?

Yep, I definitely should spin up both servers!
I’m using FireFox to test, also webRTC is disabled.

Did you check if your Firefox has a secure dns server setting or is configured to use another dns server. You may want to open another browser to see if the issue can be isolated to firefox

Thank you very much, it turned out that only FireFox is leaking my DNS and the issues were its enabled DNS-over-HTTP setting and uBlock Origin “uncloak canonical names” option. After turning both off my ISPs seem to become only Google and Cloudflare, which I set on my V2RayXS configurations.

However, can other applications that also use WiFi leak DNS, such as Discord and VSCode?

Unlikely, most apps should obey your dns settings. But you should check nonetheless, as you should be the most familiar with your setup.

Thanks, I just ensured that everything respects my DNS settings by using dnsmasq to forward every DNS request through 127.0.0.1 to my desired DNS.