Repository navigation
How to setup VLESS mKCP over DNS #6838
kokoromagic
started this conversation in
General
Replies: 1 comment
|
worked, thank you, |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Ever found yourself in a shopping mall, cafe, or airport connected to a public Wi-Fi network, only to be blocked by a captive portal requiring SMS verification, payment, or account sign-in?
Often, these networks block all standard traffic until you log in, but they frequently leave UDP Port 53 (DNS traffic) open or unmanaged to allow domain resolution. By tunneling VLESS and mKCP inside DNS queries using xDNS, you can disguise your traffic as normal DNS requests and bypass these captive portal restrictions.
In this guide, we will walk through setting up a VLESS + mKCP over xDNS server and generating the corresponding v2rayNG client configuration.
Technical Overview
To trick the captive portal firewall:
TXTrecord queries).Domain Prerequisites
You need a domain with custom DNS records set up on your DNS provider (e.g., Cloudflare, Namecheap):
vps.yourdomain.comns1.yourdomain.comvps.yourdomain.com.(For the configuration below, replace
huskydg.io.vnwith your actual domain).Server Configuration
Install Xray-core. Paste the following JSON configuration into your server config file (e.g.,
/usr/local/etc/xray/config.json).{ "log": { "loglevel": "debug" }, "inbounds": [ { "port": 53, "listen": "0.0.0.0", "protocol": "vless", "sniffing": { "enabled": false }, "settings": { "clients": [ { "id": "<YOUR-UUID>", "level": 0 } ], "decryption": "none" }, "streamSettings": { "network": "mkcp", "security": "none", "kcpSettings": { "mtu": 900, "tti": 20, "uplinkCapacity": 5, "downlinkCapacity": 20, "congestion": false, "readBufferSize": 2, "writeBufferSize": 2 }, "finalmask": { "udp": [ { "type": "xdns", "settings": { "domains": ["ns1.huskydg.io.vn:txt"] } } ] } } } ], "outbounds": [ { "protocol": "freedom", "settings": { "domainStrategy": "UseIPv4" } } ] }Replace
<YOUR-UUID>with a newly generated UUID (you can generate one usingxray uuidoruuidgen).Client Link (v2rayNG / V2rayN)
To quickly import this setup into v2rayNG (Android) or v2rayN (Windows), copy the URI link below and import it via clipboard:
URL Parameter Breakdown
1.1.1.1:53(Can be changed to the public DNS server or direct gateway DNS allowed by the local network).{ "udp": [ { "type": "xdns", "settings": { "resolvers": [ "ns1.huskydg.io.vn+udp://1.1.1.1:53" ] } } ] }How to Test
Disclaimer: This guide is provided for educational and research purposes regarding network protocols and firewall mechanics.
All reactions