http:
前缀才能识别重定向,具体在1.2.16文件夹里有说明这个重定向版是我在原版的基础上问AI进行修改的,使客户端支持-s
服务器地址支持重定向地址,方便使用stun打洞(lucky
natmap
)自建服务器,由于动态的IP地址和动态的端口,利用脚本每次变化后更新记录到域名进行重定向到动态的IP和端口。重定向版客户端就会优先去获取-s
参数的域名的重定向地址作为服务器地址,获取不到重定向地址也不影响正常域名。
lhc.us.kg/vnt01
以UDP协议连接vnts服务端tcp://lhc.us.kg/vnt02
以TCP协议连接vnts服务端地址格式 | 例如 | 协议 | 原版 | 重定向版 |
---|---|---|---|---|
域名:端口号 | vnt.wherewego.top:29872 | UDP TCP | ✅ | ✅ |
txt:域名 | txt:text.liaoh.dedyn.io | UDP TCP | ✅ | ✅ |
域名/后缀 | 1hc.us.kg/vnt01 | UDP | ❌ | ✅ |
tcp://域名/后缀 | tcp://1hc.us.kg/vnt02 | TCP | ❌ | ✅ |
ws://域名/后缀 | ws://lhc.us.kg/vnt03 | TCP | ☑ | ✅ |
ws://域名 | ws://vnt.wherewego.top:29872 | TCP | ✅ | ✅ |
wss://域名 | wss://vnt.wherewego.top | TCP | ☑ | ✅ |
⚠️注意:原版的WS
WSS
协议的重定向需要以ws
或wss
的头才能支持重定向,普通重定向的头一般是http
https
,目前有1hc.us.kg和pgy.us.kg短链接服务才支持这种WS头的重定向。
重定向版则没有任何限制。
192.168.60.1:29872————natmap/lucky————125.94.158.166:58500
natmap/lucky带动脚本将 125.94.158.166:58500
提交到短链接服务网站,如:1hc.us.kg
可自定义后缀(vnt01
),生成 1hc.us.kg/vnt01
使用时直接输入:1hc.us.kg/vnt01
192.168.60.1:29872————natmap/lucky————125.94.158.166:58544
natmap/lucky带动脚本将 125.94.158.166:58544
提交到短链接服务网站,如:1hc.us.kg
自定义后缀(vnt02
),生成 1hc.us.kg/vnt02
使用时直接输入: tcp://1hc.us.kg/vnt02
192.168.60.1:29872————natmap/lucky————125.94.158.166:58544
natmap/lucky带动脚本将 125.94.158.166:58544
提交到特制短链接服务网站,如:1hc.us.kg
自定义后缀(vnt03
),生成 1hc.us.kg/vnt03
使用时直接输入: ws://1hc.us.kg/vnt03
vnt/src/util/dns_query.rs
对应文件在上方 dns_query.rs
vnt/Cargo.toml
找到[dependencies]
在下方增加两个 如下
[dependencies]
http_req = { git = "https://github.com/lmq8267/http_req.git", default-features = false, features = ["rust-tls"] }
// 替换协议前缀
if redirect.starts_with("http://") {
url = redirect.replacen("http://", "ws://", 1);
} else if redirect.starts_with("https://") {
url = redirect.replacen("https://", "wss://", 1);
} else {
url = redirect.to_string();
}
println!("Location:{}", url);
log::info!("修改后的重定向地址: {}", url);
.github/workflows
文件夹内linux程序:编译vnt-cli.yml
安卓端 vntAPP-Android.yml
Windows端 vntAPP-Windows.yml
Actions
需要先在你fork的VntApp
项目里将这个地址 改为你 fork 的 vnt
仓库地址
然后再编译 源码地址写你fork的VntApp
项目