fix: some vless nodes not exported on loon

This commit is contained in:
Tsung Wu
2025-08-01 21:08:59 +08:00
parent 1624d0f10d
commit 80363459f2
2 changed files with 18 additions and 6 deletions

View File

@@ -37,7 +37,7 @@ RUN set -xe && \
cmake -DCMAKE_CXX_STANDARD=11 . && \ cmake -DCMAKE_CXX_STANDARD=11 . && \
make install -j $THREADS && \ make install -j $THREADS && \
cd .. && \ cd .. && \
git clone https://github.com/asdlokj1qpi233/subconverter --depth=1 && \ git clone https://github.com/ionull/subconverter --depth=1 && \
cd subconverter && \ cd subconverter && \
[ -n "$SHA" ] && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h;\ [ -n "$SHA" ] && sed -i 's/\(v[0-9]\.[0-9]\.[0-9]\)/\1-'"$SHA"'/' src/version.h;\
python3 -m ensurepip && \ python3 -m ensurepip && \

View File

@@ -2260,18 +2260,30 @@ proxyToLoon(std::vector<Proxy> &nodes, const std::string &base_conf,
break; break;
case ProxyType::VLESS: case ProxyType::VLESS:
if (flow != "xtls-rprx-vision") { if (flow != "xtls-rprx-vision") {
continue; if (transproto == "ws") {
proxy = "VLESS," + hostname + "," + port + ",\"" + id + "\"" +
",path=" + path + ",host=" + host + ",transproto=" + transproto +
",udp=" + (udp.get() ? "true" : "false") + ",over-tls=" + (
tlssecure ? "true" : "false") + ",sni=" + sni;
} else {
continue;
}
} else {
proxy = "VLESS," + hostname + "," + port + ",\"" + id + "\",flow=" + flow + ",public-key=\"" + pk +
"\",short-id=" + shortId + ",udp=" + (udp.get() ? "true" : "false") + ",over-tls=" + (
tlssecure ? "true" : "false") + ",sni=" + sni;
} }
proxy = "VLESS," + hostname + "," + port + ",\"" + id + "\",flow=" + flow + ",public-key=\"" + pk +
"\",short-id=" + shortId + ",udp=" + (udp.get() ? "true" : "false") + ",over-tls=" + (
tlssecure ? "true" : "false") + ",sni=" + sni;
switch (hash_(transproto)) { switch (hash_(transproto)) {
case "tcp"_hash: case "tcp"_hash:
proxy += ",transport=tcp"; proxy += ",transport=tcp";
break; break;
default: default:
continue; if (transproto != "ws") {
continue;
} else {
break;;
}
} }
if (!scv.is_undef()) if (!scv.is_undef())
proxy += ",skip-cert-verify=" + std::string(scv.get() ? "true" : "false"); proxy += ",skip-cert-verify=" + std::string(scv.get() ? "true" : "false");